protected override void OnNew() { var f = new FrmThongTinTuVan(string.Empty); if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) { OnReload(); } ReloadButtons(); }
//double click lên tư vấn treo private void customGridView4_DoubleClick(object sender, EventArgs e) { var tv = customGridView4.GetFocusedDataRow() as CRMData.TuVanRow; if (tv == null) { return; } if (tv.TrangThai != (int)TrangThaiTuVan.Pending) { return; } FrmThongTinTuVan f = new FrmThongTinTuVan(tv.ID); f.ShowDialog(); }
protected override void OnEdit() { var p = customGridView1.GetFocusedDataRow() as CRMData.TuVanRow; if (p == null) { return; } var f = new FrmThongTinTuVan(p.ID); if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) { OnReload(); } ReloadButtons(); }
private void btnAddTV_Click(object sender, EventArgs e) { var k = data.KhachHang.FirstOrDefault(); if (k == null) { return; } if (Data.IsNewRow(k)) { MsgBox.ShowWarningDialog("Khách hàng chưa được tạo, không thể thực hiện thao tác này"); return; } FrmThongTinTuVan f = new FrmThongTinTuVan(string.Empty); f.SetKhachHang(k.MaKH); if (f.ShowDialog() == DialogResult.OK) { customGridControl4.DataSource = tuVanTableAdapter1.GetDataByKhachHang(_maKH); } }