private void btnEdit_Click(object sender, EventArgs e) { if (SelectWarehouseInfomation != null) { WarehouseInformationController.CallAddEditForm(new AddWarehouseInformation(SelectWarehouseInfomation)); // call form as edit data form. } }
private void dataGridWarehouseInfomation_CellClick(object sender, DataGridViewCellEventArgs e) { SelectWarehouseInfomation = new WarehouseInformationModel(); setWarehouseInformationModel(dataGridWarehouseInfomation.SelectedRows[0]); if (e.ColumnIndex == 0 && e.RowIndex >= 0) { WarehouseInformationController.CallAddEditForm(new AddWarehouseInformation(SelectWarehouseInfomation)); // call form as edit data form. ReloadDataGridView(); // Reload data in datagridview } }
//call form warehouseInfomation private void btnAddForm_Click(object sender, EventArgs e) { WarehouseInformationController.CallAddEditForm(new AddWarehouseInformation()); // call form as add data form. ReloadDataGridView(); }