Example #1
0
        private void buttonCreateNew_Click(object sender, EventArgs e)
        {
            StatementEditor E = new StatementEditor("insert");

            E.ShowDialog();
            this.Focus();
        }
Example #2
0
 private void buttonOK_Click(object sender, EventArgs e)
 {
     try
     {
         //возвращаем стоимость работ родителю
         StatementEditor edit = (StatementEditor)Application.OpenForms["StatementEditor"];
         edit.SendCost.Text = Cost().ToString();
         this.Close();
     }
     catch (Exception err) { MessageBox.Show(err.Message, err.Source); }
 }
Example #3
0
 private void buttonEdit_Click(object sender, EventArgs e)
 {
     try
     {
         if (dGVOrders.CurrentRow != null)
         {
             StatementEditor E = new StatementEditor(Convert.ToInt32(dGVOrders.CurrentRow.Cells[0].Value), "update");
             E.ShowDialog();
             this.Focus();
             //dTOrders.LoadDataRow();
             //dTOrders.Select("");
             //for(int i=0;i<10;i++)
             //listBox1.Items.Add(1);
         }
     }
     catch { MessageBox.Show("Ошибка на форме(возможно при её запуске) редактирования или дальше."); }
 }