Пример #1
0
 private void customerAddEditFormToolStripMenuItem_Click(object sender, EventArgs e)
 {
     CustomerAddEditForm caef = new CustomerAddEditForm("Добавить заказчика",data:globalDS.Tables["customer"].Rows[0].ItemArray);
     caef.Show();
 }
Пример #2
0
 private void changeOrderButton_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedIndex != -1)
     {
         CustomerAddEditForm caef = new CustomerAddEditForm(
             "Редактировать заказчика",
             buttonCaption: "Редактировать",
             data: dataSet1.Tables["customer"].Select("id=" + listBox1.SelectedValue.ToString())[0].ItemArray);
         if (caef.ShowDialog() == DialogResult.OK)
         {
             dataSet1.Tables["customer"].Select("id=" + listBox1.SelectedValue.ToString())[0].ItemArray = caef.Result;
             if (postgreConnection.UpdateDB("customer", dataSet1, 2))
                 DrawData();
         }
     }
 }
Пример #3
0
 private void menuItemWithAccessLevel20_Click(object sender, EventArgs e)
 {
     CustomerAddEditForm caef = new CustomerAddEditForm("Добавить заказчика");
     if (caef.ShowDialog() == DialogResult.OK)
     {
         globalDS.Tables["customer"].Rows.Add(caef.Result);
         postgreConnection.UpdateDB("customer", globalDS, 1);
     }
 }
Пример #4
0
 private void buttonWithAccessLevel11_Click(object sender, EventArgs e)
 {
     CustomerAddEditForm caef = new CustomerAddEditForm("Добавить заказчика");
     if(caef.ShowDialog()==DialogResult.OK)
     {
         dataSet1.Tables["customer"].Rows.Add(caef.Result);
         postgreConnection.UpdateDB("customer", dataSet1, 1);
     }
 }