Пример #1
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (selectCustomerAdvertising != null)
     {
         CustomerAdvertisingController.CallAddEditForm(new AddCustomerAdvertising(selectCustomerAdvertising));
     }
 }
Пример #2
0
 private void dataGridCustomerAdvertising_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     selectCustomerAdvertising = new CustomerAdvertisingModel();
     setCustomerAdvertisingModel(dataGridCustomerAdvertising.SelectedRows[0]);
     if (e.ColumnIndex == 0 && e.RowIndex >= 0)
     {
         CustomerAdvertisingController.CallAddEditForm(new AddCustomerAdvertising(selectCustomerAdvertising)); // call form as edit data form.
         ReloadDataGridView();                                                                                 // Reload data in datagridview
     }
 }
Пример #3
0
 private void btnAddForm_Click(object sender, EventArgs e)
 {
     CustomerAdvertisingController.CallAddEditForm(new AddCustomerAdvertising());
     ReloadDataGridView();
 }