Exemple #1
0
 //Редактирование услуги, обновление данных в связанных таблицах
 private void saveServiceBtn_Click(object sender, EventArgs e)
 {
     try
     {
         if (name.Text == "" || cost.Text == "" || info.Text == "")
         {
             MessageBox.Show("Заполните все поля!");
             return;
         }
         DBConnection.EditServiceInGroup(Services.serviceID, name.Text, info.Text, cost.Text);
         DBConnection.GetServicesInGroup(Services.serviceGroupID);
         Services.formDescriptor.servicesTable.DataSource = DBConnection.dtServicesInGroup;
         Services.ReadServicesTableRow(0);
         this.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }