private void btnThenNCC_BaseMH_BH_Click(object sender, EventArgs e) { fThemNCC ncc = new fThemNCC(); ncc.ShowDialog(); leKH.Properties.DataSource = BUS_NhaCungCap.LayNhaCC(); leMaKH.Properties.DataSource = BUS_NhaCungCap.LayNhaCC(); }
private void BtnSua_ItemClick(object sender, ItemClickEventArgs e) { int rowIndex = gvMain.FocusedRowHandle; CNhaCC ncc = new CNhaCC { MaNCC = gvMain.GetRowCellValue(rowIndex, "Customer_ID").ToString(), TenNCC = gvMain.GetRowCellValue(rowIndex, "CustomerName").ToString(), KhuVuc = gvMain.GetRowCellValue(rowIndex, "Customer_Group_ID").ToString(), LienHe = gvMain.GetRowCellValue(rowIndex, "Contact").ToString(), ChucVu = gvMain.GetRowCellValue(rowIndex, "Position").ToString(), DiaChi = gvMain.GetRowCellValue(rowIndex, "CustomerAddress").ToString(), DienThoai = gvMain.GetRowCellValue(rowIndex, "Tel").ToString(), DiDong = gvMain.GetRowCellValue(rowIndex, "Mobile").ToString(), Fax = gvMain.GetRowCellValue(rowIndex, "Fax").ToString(), ConQL = bool.Parse(gvMain.GetRowCellValue(rowIndex, "Active").ToString()) }; fThemNCC sua = new fThemNCC(false, ncc, LoadData); sua.ShowDialog(); }
private void BtnThem_ItemClick(object sender, ItemClickEventArgs e) { fThemNCC ncc = new fThemNCC(true, null, LoadData); ncc.ShowDialog(); }