📄 form2.cs
字号:
{
MessageBox.Show("没有删除成功");
}
MessageBox.Show("恭喜您,删除成功!");
}
catch (Exception e2)
{
MessageBox.Show(e2.Message);
}
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.ReadOnly = false;
textBox2.ReadOnly = false;
textBox1.Text = "";
textBox2.Text = "";
button23.Visible = true;
button7.Visible = true;
}
private void tabPage1_Enter(object sender, EventArgs e)
{
gl();
gl1();
}
private void Form2_Load(object sender, EventArgs e)
{
this.skinEngine1.SkinFile = "Wave.ssk";
// TODO: 这行代码将数据加载到表“dataDataSet.products”中。您可以根据需要移动或移除它。
this.productsTableAdapter.Fill(this.dataDataSet.products);
}
private void listBox1_MouseCaptureChanged(object sender, EventArgs e)
{
gl1();
}
private void Form2_FormClosed(object sender, FormClosedEventArgs e)
{
Application.Exit();
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.ReadOnly = false;
textBox2.ReadOnly = false;
button5.Visible = true;
button7.Visible = true;
label5.Visible = true;
}
private void button6_Click(object sender, EventArgs e)
{
try
{
this.productsTableAdapter.Update(this.dataDataSet.products);
MessageBox.Show("操作成功!");
}
catch (Exception e2)
{
MessageBox.Show(e2.Message);
return;
}
}
private void button4_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void button5_Click(object sender, EventArgs e)
{
have();
if (a != 1)
{
xg();
}
else
{
MessageBox.Show("该用户已存在,请重新输入!");
a = 0;
textBox1.Clear();
textBox2.Clear();
}
gl();
gl1();
textBox1.ReadOnly = true;
textBox2.ReadOnly = true;
button5.Visible = false;
button7.Visible = false;
label5.Visible = false;
}
private void button7_Click(object sender, EventArgs e)
{
textBox1.ReadOnly = true;
textBox2.ReadOnly = true;
button5.Visible = false;
button7.Visible = false;
button23.Visible = false;
label5.Visible = false;
gl1();
}
private void button3_Click(object sender, EventArgs e)
{
if (listBox1.Items.Count > 1)
{
sc();
gl();
gl1();
}
else
{
MessageBox.Show("请保证始终最少有一个用户!");
}
}
private void button8_Click(object sender, EventArgs e)
{
Form3 f3 = new Form3();
f3.text = listBox2.SelectedItem.ToString();
f3.ShowDialog();
}
private void tabPage3_Enter(object sender, EventArgs e)
{
listBox2.Items.Clear();
cx();
}
private void button12_Click(object sender, EventArgs e)
{
listBox2.Items.Clear();
cx1();
}
private void button9_Click(object sender, EventArgs e)
{
Form5 f5 = new Form5();
f5.text1 = listBox2.SelectedItem.ToString();
f5.ShowDialog();
}
private void button10_Click(object sender, EventArgs e)
{
Form6 f6 = new Form6();
f6.text2 = listBox2.SelectedItem.ToString();
f6.ShowDialog();
}
private void button11_Click(object sender, EventArgs e)
{
Form7 f7 = new Form7();
f7.text3 = listBox2.SelectedItem.ToString();
f7.ShowDialog();
}
private void tabPage4_Enter(object sender, EventArgs e)
{
listBox3.Items.Clear();
cx2();
try
{
textBox5.Text = listBox3.SelectedItem.ToString();
ck();
have2();
}
catch (Exception e2)
{
MessageBox.Show(e2.Message);
}
}
private void button13_Click(object sender, EventArgs e)
{
listBox3.Items.Clear();
cx3();
}
private void button14_Click(object sender, EventArgs e)
{
textBox8.Text = "";
have1();
have2();
textBox6.ReadOnly = true;
textBox7.ReadOnly = true;
}
private void button17_Click(object sender, EventArgs e)
{
xiugai();
button15.Enabled = false;
button17.Enabled = false;
button18.Enabled = false;
textBox6.ReadOnly = true;
textBox7.ReadOnly = true;
try
{
textBox5.Text = listBox3.SelectedItem.ToString();
ck();
have2();
}
catch (Exception e2)
{
MessageBox.Show(e2.Message);
}
}
private void button15_Click(object sender, EventArgs e)
{
textBox6.ReadOnly = false;
textBox7.ReadOnly = false;
button17.Enabled = true;
button18.Enabled = true;
}
private void button16_Click(object sender, EventArgs e)
{
shanchu();
try
{
textBox5.Text = listBox3.SelectedItem.ToString();
textBox6.Text = "";
textBox7.Text = "";
textBox8.Text = "";
have2();
}
catch (Exception e2)
{
MessageBox.Show(e2.Message);
}
}
private void listBox3_MouseCaptureChanged(object sender, EventArgs e)
{
textBox6.Text = "";
textBox7.Text = "";
textBox8.Text = "";
try
{
textBox5.Text = listBox3.SelectedItem.ToString();
ck();
have2();
}
catch (Exception e2)
{
MessageBox.Show(e2.Message);
}
}
private void button18_Click(object sender, EventArgs e)
{
textBox6.ReadOnly = true;
textBox7.ReadOnly = true;
button17.Enabled = false;
button18.Enabled = false;
}
private void button19_Click(object sender, EventArgs e)
{
button20.Visible = true;
button21.Visible = true;
button22.Visible = true;
}
private void button20_Click(object sender, EventArgs e)
{
this.skinEngine1.SkinFile = "WaveColor1.ssk";
button20.Visible = false;
button21.Visible = false;
button22.Visible = false;
}
private void button21_Click(object sender, EventArgs e)
{
this.skinEngine1.SkinFile = "vista1.ssk";
button20.Visible = false;
button21.Visible = false;
button22.Visible = false;
}
private void button22_Click(object sender, EventArgs e)
{
this.skinEngine1.SkinFile = "Wave.ssk";
button20.Visible = false;
button21.Visible = false;
button22.Visible = false;
}
private void button23_Click(object sender, EventArgs e)
{
have3();
if (b != 1)
{
tj();
}
else
{
MessageBox.Show("该用户已存在,请重新输入!");
b = 0;
textBox1.Clear();
textBox2.Clear();
}
textBox1.ReadOnly = true;
textBox2.ReadOnly = true;
button23.Visible = false;
button7.Visible = false;
gl();
gl1();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -