Exemple #1
0
        private void BtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int id = (int)GrvCreateJob.GetFocusedRowCellValue("Id_CongViec");

            try
            {
                using (_theoDoiVanBanEntities = new TheoDoiVanBanEntities())
                {
                    var _exits = _theoDoiVanBanEntities.GetOneCongViec(id).FirstOrDefault();
                    if (_exits.StatusForward == true)
                    {
                        XtraMessageBox.Show("Công việc đã được giao.\nKhông thể xóa");
                    }
                    else
                    {
                        _theoDoiVanBanEntities.DeleteCreateJob(id);
                        XtraMessageBox.Show("Xóa thông tin thành công");
                    }
                }
                GetCreateJob();
            }
            catch (Exception)
            {
                XtraMessageBox.Show("Vui lòng xóa ở bảng dưới trước khi xóa ở đây");
            }
        }
Exemple #2
0
        private void BtnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int id = (int)GrvCreateJob.GetFocusedRowCellValue("Id_CongViec");

            KhoiTaoCongViec frm = new KhoiTaoCongViec();

            frm._Edit  = true;
            frm.IdEdit = id;
            frm.ShowDialog();
        }
Exemple #3
0
        private void GrvTienDoCongViec_DoubleClick(object sender, EventArgs e)
        {
            int id = (int)GrvCreateJob.GetFocusedRowCellValue("Id_CongViec");

            KhoiTaoCongViec frm = new KhoiTaoCongViec();

            frm._Edit  = true;
            frm.IdEdit = id;
            frm.ShowDialog();
        }
Exemple #4
0
 private void BtnComment_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         int      id        = (int)GrvCreateJob.GetFocusedRowCellValue("Id_CongViec");
         GiaoViec _giaoViec = new GiaoViec();
         _giaoViec.Id_tbl_congviec = id;
         _giaoViec.ShowDialog();
     }
     catch (Exception)
     {
         XtraMessageBox.Show("Kiểm tra lại thông tin đã nhập");
     }
 }
Exemple #5
0
        private void RepositoryItemHyperLinkEdit1_Click(object sender, EventArgs e)
        {
            string tailieudinhkem = (string)GrvCreateJob.GetFocusedRowCellValue("tailieu");

            if (tailieudinhkem != null)
            {
                //ViewPdf view = new ViewPdf();
                //view.FileNamePdf = (string)grvTienDoCongViec.GetFocusedRowCellValue("tailieu");
                //view.ShowDialog();
            }
            else
            {
                XtraMessageBox.Show("Không có tài liệu đính kèm");
            }
        }
Exemple #6
0
        private void GrcCreateJob_Click(object sender, EventArgs e)
        {
            try

            {
                int i = GrvCreateJob.FocusedRowHandle;
                if (i < 0)
                {
                    return;
                }
                int id = (int)GrvCreateJob.GetFocusedRowCellValue("Id_CongViec");

                using (_theoDoiVanBanEntities = new TheoDoiVanBanEntities())
                {
                    var _list = _theoDoiVanBanEntities.GetForwardCreateJob(id).ToList();
                    GrcChuyenVanBan.DataSource = _list;
                }
            }
            catch (Exception)
            {
                XtraMessageBox.Show("Có lỗi xảy ra");
                //throw;
            }
        }