//private void GetAllGDVanBanDen() //{ // try // { // using (quanLyCongViecEntities = new QuanLyCongViecEntities()) // { // var _GetAllGDVanBanDen = quanLyCongViecEntities.GetAllGDVanBanDen().ToList(); // grcTienDoCongViec.DataSource = _GetAllGDVanBanDen; // //var _getall = quanLyCongViecEntities.GetAllTheoDoiVanBan1().ToList(); // //grcYKienGiamDoc.DataSource = _getall; // } // } // catch (Exception) // { // XtraMessageBox.Show("Lỗi kết nối với cơ sở dữ liệu"); // } //} private void BtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { KhoiTaoCongViec frm = new KhoiTaoCongViec(); frm._Edit = false; frm.ShowDialog(); }
private void BtnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { int id = (int)grvTienDoCongViec.GetFocusedRowCellValue("Id"); KhoiTaoCongViec frm = new KhoiTaoCongViec(); frm._Edit = true; frm.IdEdit = id; frm.ShowDialog(); }
private void GrvTienDoCongViec_DoubleClick(object sender, EventArgs e) { int id = (int)grvTienDoCongViec.GetFocusedRowCellValue("Id"); KhoiTaoCongViec frm = new KhoiTaoCongViec(); frm._Edit = true; frm.IdEdit = id; frm.ShowDialog(); }