private void btnXoa_Click(object sender, EventArgs e) { if (fg.Row < fg.Rows.Fixed) { BaseMessages.ShowInformationMessage("Chưa chọn công việc!"); return; } if (BaseMessages.ShowDeleteQuestionMessage() == DialogResult.No) { return; } clsCongViec cls = new clsCongViec(); cls.ID_CongViec = Convert.ToInt32(fg[fg.Row, "ID_CongViec"]); cls.TonTai = false; cls.Update(); BaseMessages.ShowInformationMessage("Xóa thành công!"); Loadfg(); fg.ApplyFilters(); }
private void mnuDangThuHien_Click(object sender, EventArgs e) { if (fgDaNhan.Row < fgDaNhan.Rows.Fixed && fgDaXong.Row < fgDaXong.Rows.Fixed) { return; } if (fgDaNhan.Row >= fgDaNhan.Rows.Fixed) { cls.ID_CongViec = fgDaNhan.GetIntValue(fgDaNhan.Row, "ID_CongViec"); cls.SelectOne(); cls.ID_TrangThai = 3; cls.Ngay_BatDau = GlobalVariables.GetCurrentDateTime(); cls.Update(); } else { iID_CongViec = fgDaXong.GetIntValue(fgDaXong.Row, "ID_CongViec"); //cls.UpdateTrangThai(iID_CongViec, 3); } Load_fgDaNhan(); Load_fgDangLam(); Load_fgDaXong(); }