Exemplo n.º 1
0
 //xinz
 private void button3_Click(object sender, EventArgs e)
 {
     if (button3.Text == "新增")
     {
         //textBox1.ReadOnly = textBox2.ReadOnly = false;
         //textBox1.Text = textBox2.Text = "";
         comboBox1.Enabled = comboBox2.Enabled = comboBox3.Enabled = true;
         comboBox1.Text    = comboBox2.Text = comboBox3.Text = "--请选择--";
         button3.Text      = "保存";
         button1.Enabled   = button2.Enabled = button5.Enabled = button4.Enabled = false;
     }
     else
     {
         Int32 a = 0, b = 0;
         try
         {
             a = Convert.ToInt32(comboBox2.SelectedValue);
             b = Convert.ToInt32(comboBox3.SelectedValue);
         }
         catch { MessageBox.Show("请选择站点工序"); }
         if (a != 0 && b != 0)
         {
             m_dst.InsertSeqbund(a, b, comboBox1.SelectedValue.ToString());
             MessageBox.Show("成功");
             m_dst.GetSeqbund();
             //  button1_Click(null,null);
         }
         // textBox1.ReadOnly = textBox2.ReadOnly = true;
         comboBox1.Enabled = comboBox2.Enabled = comboBox3.Enabled = false;
         button3.Text      = "新增";
         button1.Enabled   = button2.Enabled = button5.Enabled = button4.Enabled = true;
     }
 }