Exemple #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         Met7 m = new Met7();
         m.Delete(comboBox1.Items[comboBox1.SelectedIndex].ToString());
         this.Close();
     }
     catch { MessageBox.Show("Error"); }
 }
Exemple #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         Met7     m7  = new Met7();
         Met3     d   = new Met3();
         string[] str = comboBox1.Items[comboBox1.SelectedIndex].ToString().Split(new char[] { ' ' });
         d.ADD(Convert.ToInt32(str[0]), Convert.ToInt32(numericUpDown1.Value), Convert.ToInt32(temp));
         m7.Spisania(Convert.ToInt32(numericUpDown1.Value), Convert.ToInt32(str[0]));
         m7.Poisk_min();
         this.Close();
     }
     catch (ArgumentOutOfRangeException) { MessageBox.Show("Не все поля заполнены"); }
     //catch { MessageBox.Show("Error"); }
 }
Exemple #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         Met7 d  = new Met7();
         var  ec = from n2 in db10.Postavshik
                   where n2.Name == comboBox1.Items[comboBox1.SelectedIndex].ToString()
                   select n2;
         foreach (var i in ec)
         {
             temp = i.ID;
         }
         d.ADD(textBox1.Text, Convert.ToInt32(textBox2.Text), temp, Convert.ToInt32(textBox4.Text), Convert.ToInt32(textBox5.Text), Convert.ToInt32(textBox6.Text), textBox7.Text, textBox8.Text);
         d.Poisk_min();
         this.Close();
     }
     catch (ArgumentOutOfRangeException) { MessageBox.Show("Не все поля заполнены"); }
     catch { MessageBox.Show("Error"); }
 }
Exemple #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                Met7     m7  = new Met7();
                Met3     d   = new Met3();
                string[] str = comboBox2.Items[comboBox2.SelectedIndex].ToString().Split(new char[] { ' ' });
                var      ec  = from n in db.IspolRabot
                               where n.ID == Convert.ToInt32(comboBox1.Items[comboBox1.SelectedIndex])
                               select n;
                foreach (var i in ec)
                {
                    m7.Spisania(Convert.ToInt32(numericUpDown1.Value) - i.Kolichestvo, Convert.ToInt32(str[0]));
                }
                d.Edit(Convert.ToInt32(comboBox1.Items[comboBox1.SelectedIndex]), Convert.ToInt32(str[0]), Convert.ToInt32(numericUpDown1.Value), operac.RRabot.IDRabot);

                m7.Poisk_min();
                this.Close();
            }
            catch (ArgumentOutOfRangeException) { MessageBox.Show("Не все поля заполнены"); }
            catch { MessageBox.Show("Error"); }
        }