private void btnAddCust_Click(object sender, EventArgs e) { FrmCustDescription frm = new FrmCustDescription(dao, false); frm.ShowDialog(); ReloadDGVData(); }
private void btnEditCust_Click(object sender, EventArgs e) { if (this.dgvCustData.Rows.Count >= 1) { FrmCustDescription frm = new FrmCustDescription(dao, true, dao.GetCustomerByID(dgvCustData.SelectedRows[0].Cells[0].Value.ToString())); frm.ShowDialog(); ReloadDGVData(); } else { MessageBox.Show("Maaf, masih tidak ada data.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }