예제 #1
0
        private void BtnNhanViec_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            int id = (int)GrvCongViecChuaNhan.GetFocusedRowCellValue("Id_tbl_AccountSupport");
            try
            {
                using (_TheoDoiVanBanEntities = new TheoDoiVanBanEntities())
                {
                    var checkreceived = _TheoDoiVanBanEntities.checkreceived(id).FirstOrDefault();
                    if (checkreceived.StatusReceived == false)
                    {
                        _TheoDoiVanBanEntities.UpdateNhanViec(id, DinhDanhAccount.Id_Account, true, DateTime.Now);
                        XtraMessageBox.Show("Đã nhận việc");
                    }
                    else
                    {
                        XtraMessageBox.Show("Công việc đã được nhận");
                    }
                }

            }
            catch (Exception)
            {
                XtraMessageBox.Show("Nhận việc thất bại");
                //throw;
            }
        }
예제 #2
0
 private void GrvCongViecChuaNhan_DoubleClick(object sender, EventArgs e)
 {
     int idcongviec = (int)GrvCongViecChuaNhan.GetFocusedRowCellValue("Id_tbl_AccountSupport");
     int idAccountSupport = (int)GrvCongViecChuaNhan.GetFocusedRowCellValue("Id_AccountTiepNhan");
     HoanThanhCongViec HoanThanh = new HoanThanhCongViec();
     HoanThanh.IdEdit = idcongviec;
     HoanThanh.idAccountSupport = idAccountSupport;
     HoanThanh.ShowDialog();
 }