private void load() { gridDSDichVu.DataSource = DichVu_Info.SelectAllTable(); dsDichVuKe = DichVu_Info.SelectAllTable(); gridDSDichVuKe.DataSource = dsDichVuKe; dsDichVuKe.Rows.Clear(); }
private void btn_ThemDV_Click(object sender, EventArgs e) { frmDichVu f = new frmDichVu(); f.ShowDialog(); gridDSDichVu.DataSource = DichVu_Info.SelectAllTable(); txtMaDichVu.Select(); }
private void load() { gridDanhSach.DataSource = DichVu_Info.SelectAllTable(); Util.FormHandler.SetSourceForGridCustomCollumns(gridDanhSach, new string[] { "MaDichVu", "TenDichVu", "DonViTinh", "DonGia" }, new string[] { "Mã dịch vụ", "Tên dịch vụ", "Đơn vị tính", "Đơn giá" }); Util.ResetControl.ReadOnly_Control(this); isInsert = 0; }
private bool check2() { if (isInsert == 1) { DataTable b = DichVu_Info.SelectAllTable(); foreach (DataRow r in b.Rows) { if (r["MaDichVu"].ToString() == txtMaDV.Text) { error.SetError(txtMaDV, "Trùng mã"); txtMaDV.Select(); return(false); } } } ArrayList list = new ArrayList(); list.Add(txtMaDV); list.Add(cbx_Phong); list.Add(txtTenDV); list.Add(txtDonGia); return(Util.ResetControl.CheckValue(list, error)); }