コード例 #1
0
        protected void Infomation_Load()
        {
            int WorkID = int.Parse(Request.QueryString["WorkID"].ToString());

            BWork Bobj = new BWork();
            OWork obj  = new OWork();

            obj = Bobj.GetWork(WorkID).First();

            lblName.Text        = obj.Name;
            lblNgayTao.Text     = obj.CreateDate.ToString("dd/MM/yyyy");
            lblNgayBatDau.Text  = obj.StartProcess.ToString("dd/MM/yyyy");
            lblNgayKetThuc.Text = obj.EndProcess.ToString("dd/MM/yyyy");
            lblYeuCau.Text      = obj.Description;

            rptListUser.DataSource = Bobj.GetUserProcess(WorkID);
            rptListUser.DataBind();

            //Lấy file Attachs
            string list = obj.Attachs.ToString();

            string[] item;
            item = list.Split(',');

            rptFiles.DataSource = Bobj.GetAttachs(WorkID);
            rptFiles.DataBind();

            if (obj.Attachs == "" || obj.Attachs == ",")
            {
                lblThongBao.Text = "Không có file đính kèm!";
            }
        }
コード例 #2
0
        protected void InitData()
        {
            ddlWorkGroup_Load();
            BindDepartment();

            BWork _BWork = new BWork();
            OWork _OWork = new OWork();
            int   WorkID = int.Parse(Request.QueryString["WorkID"].ToString());

            _OWork = _BWork.GetWork(WorkID).First();
            ddlWorkGroup.SelectedValue = _OWork.IDWorkGroup.ToString();
            txtWorkName.Text           = _OWork.Name;
            txtContent.Text            = _OWork.Content;
            txtDescription.Text        = _OWork.Description;
            txtStartDate.Text          = _OWork.StartProcess.ToString("dd/MM/yyyy");
            txtEndDate.Text            = _OWork.EndProcess.ToString("dd/MM/yyyy");

            //Lấy file Attachs
            string list = _OWork.Attachs.ToString();

            string[] item;
            item = list.Split(',');

            rptFiles.DataSource = _BWork.GetAttachs(WorkID);
            rptFiles.DataBind();

            if (_OWork.Attachs == "" || _OWork.Attachs == ",")
            {
                lblThongBao.Text = "Không có file đính kèm!";
            }

            hdfUserJoin.Value = _OWork.IDUserProcess;
        }
コード例 #3
0
        public bool Add(OWork obj)
        {
            SqlParameter[] sqlPara = new SqlParameter[12];
            sqlPara[0]        = new SqlParameter("@Name", SqlDbType.NVarChar);
            sqlPara[0].Value  = obj.Name;
            sqlPara[1]        = new SqlParameter("@Description", SqlDbType.NVarChar);
            sqlPara[1].Value  = obj.Description;
            sqlPara[2]        = new SqlParameter("@Content", SqlDbType.NVarChar);
            sqlPara[2].Value  = obj.Content;
            sqlPara[3]        = new SqlParameter("@Attachs", SqlDbType.VarChar);
            sqlPara[3].Value  = obj.Attachs;
            sqlPara[4]        = new SqlParameter("@IDUserCreate", SqlDbType.Int);
            sqlPara[4].Value  = obj.IDUserCreate;
            sqlPara[5]        = new SqlParameter("@IDUserProcess", SqlDbType.VarChar);
            sqlPara[5].Value  = obj.IDUserProcess;
            sqlPara[6]        = new SqlParameter("@CreateDate", SqlDbType.DateTime);
            sqlPara[6].Value  = obj.CreateDate;
            sqlPara[7]        = new SqlParameter("@StartProcess", SqlDbType.DateTime);
            sqlPara[7].Value  = obj.StartProcess;
            sqlPara[8]        = new SqlParameter("@EndProcess", SqlDbType.DateTime);
            sqlPara[8].Value  = obj.EndProcess;
            sqlPara[9]        = new SqlParameter("@Status", SqlDbType.VarChar);
            sqlPara[9].Value  = obj.Status;
            sqlPara[10]       = new SqlParameter("@Priority", SqlDbType.VarChar);
            sqlPara[10].Value = obj.Priority;
            sqlPara[11]       = new SqlParameter("@IDWorkGroup", SqlDbType.Int);
            sqlPara[11].Value = obj.IDWorkGroup;


            return(RunProcudure("sp_tblWork_add", sqlPara));
        }
コード例 #4
0
        protected void btnGiaoViec_Click(object sender, EventArgs e)
        {
            int   UserID = Global.UserInfo.UserID;
            BWork obj    = new BWork();
            OWork _OWork = new OWork();

            foreach (GridViewRow row in grvWork.Rows)
            {
                CheckBox checkbox = (CheckBox)row.FindControl("MyCheckBox");

                if (checkbox.Checked == true)
                {
                    int Id = Convert.ToInt32(grvWork.DataKeys[row.RowIndex].Value);
                    _OWork = obj.GetWork(Id).First();
                    if (_OWork.Status == "CHUA_GIAO")
                    {
                        if (!obj.Update(Id, "DANG_THUC_HIEN", UserID))
                        {
                            RegisterClientScriptBlock("NOTE", "<script>alert('Công việc chưa được giao !');</script>");
                        }
                    }
                }
            }
            grvWork_Load();
        }
コード例 #5
0
        protected string BindNgayTao(string WorkID)
        {
            string time    = string.Empty;
            BWork  obj     = new BWork();
            OWork  objWork = new OWork();

            objWork = obj.GetWork(int.Parse(WorkID)).First();
            time    = objWork.CreateDate.Day.ToString() + "/" + objWork.CreateDate.Month.ToString() + "/" + objWork.CreateDate.Year.ToString();
            return(time);
        }
コード例 #6
0
 public void rptItemCommand(object sender, RepeaterCommandEventArgs e)
 {
     //Response.Write(e.CommandName);
     //Response.Write(e.CommandArgument);
     if (e.CommandName == "Download")
     {
         try
         {
             HttpContext.Current.Response.ContentType =
                 "application/octet-stream";
             HttpContext.Current.Response.AddHeader("Content-Disposition",
                                                    "attachment; filename=" + System.IO.Path.GetFileName(Server.MapPath(e.CommandArgument.ToString())));
             HttpContext.Current.Response.Clear();
             HttpContext.Current.Response.WriteFile(Server.MapPath(e.CommandArgument.ToString()));
             HttpContext.Current.Response.End();
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
     if (e.CommandName == "Delete")
     {
         int     WorkID       = int.Parse(Request.QueryString["WorkID"].ToString());
         OAttach objAttach    = new OAttach();
         BAttach BobjAttach   = new BAttach();
         BWork   BobjWork     = new BWork();
         OWork   objWork      = BobjWork.GetWork(WorkID).First();
         int     IDUserCreate = int.Parse(objWork.IDUserCreate.ToString());
         string  listAttach   = objWork.Attachs.ToString();
         objAttach = BobjAttach.Get(int.Parse(e.CommandArgument.ToString())).First();
         string AttachId = objAttach.AttachID.ToString();
         try
         {
             FileInfo TheFile = new FileInfo(Server.MapPath(objAttach.Path));
             if (TheFile.Exists)
             {
                 File.Delete(Server.MapPath(objAttach.Path)); //Xóa file Attach
                 BobjAttach.Delete(objAttach.AttachID);       //Xóa file Attach trong CSDL
                 string newListAttach = listAttach.Replace("," + AttachId + ",", ",");
                 BobjWork.UpdateAttach(WorkID, newListAttach, IDUserCreate);
                 Infomation_Load();
             }
             else
             {
                 throw new FileNotFoundException();
             }
         }
         catch (Exception ex)
         {
             //throw new FileNotFoundException();
         }
     }
 }
コード例 #7
0
        /// <summary>
        /// Hàm ghép chuỗi thời gian bắt đầu và kết thúc
        /// </summary>
        /// <param name="WorkID"></param>
        /// <returns></returns>
        protected string BindThoiGian(string WorkID)
        {
            string time    = string.Empty;
            BWork  obj     = new BWork();
            OWork  objWork = new OWork();

            objWork = obj.GetWork(int.Parse(WorkID)).First();
            time    = objWork.StartProcess.Day.ToString() + "/" + objWork.StartProcess.Month.ToString() + "/" + objWork.StartProcess.Year.ToString();
            time   += " - " + objWork.EndProcess.Day.ToString() + "/" + objWork.EndProcess.Month.ToString() + "/" + objWork.EndProcess.Year.ToString();
            return(time);
        }
コード例 #8
0
        /// <summary>
        /// Lấy ra trạng thái công việc giao tương ứng với công việc
        /// </summary>
        /// <param name="WorkID"></param>
        /// <returns></returns>
        protected string BindTrangThai(string WorkID)
        {
            string status  = string.Empty;
            BWork  obj     = new BWork();
            OWork  objWork = new OWork();

            objWork = obj.GetWork(int.Parse(WorkID)).First();
            NameValueCollection appSettings = WebConfigurationManager.AppSettings as NameValueCollection;

            status = appSettings[objWork.Status];
            return(status);
        }
コード例 #9
0
        protected string BindTrangThai(string WorkID)
        {
            string status  = string.Empty;
            BWork  obj     = new BWork();
            OWork  objWork = new OWork();

            objWork = obj.GetWork(int.Parse(WorkID)).First();
            if (objWork.Status == "CONG_VIEC_DA_XU_LY")
            {
                status = "Công việc đã xử lý";
            }
            if (objWork.Status == "DANG_THUC_HIEN")
            {
                status = "Công việc cần xử lý";
            }

            return(status);
        }
コード例 #10
0
        protected void lbtnForward_Click(object sender, EventArgs e)
        {
            // Retrieve control
            LinkButton lbtnForward = sender as LinkButton;

            int WorkID = Int32.Parse(lbtnForward.CommandArgument);

            BWork _BWork = new BWork();
            OWork _OWork = new OWork();

            _OWork = _BWork.GetWork(WorkID).First();
            if (_OWork.Status == "CHUA_GIAO")
            {
                Response.Redirect("EditAssignment.aspx?WorkID=" + WorkID);
            }
            else
            {
                Response.Redirect("WorkAssignmentDetail.aspx?WorkID=" + WorkID);
            }
        }
コード例 #11
0
        protected void btnCapNhat_Click(object sender, EventArgs e)
        {
            BWork BobjWork = new BWork();
            //Lấy IDWWork
            int WorkID = int.Parse(Request.QueryString["WorkID"].ToString());
            //Lấy IDUserCreate
            string IDUserCreate = Global.UserInfo.UserName;//Lấy lại sau
            //Lấy nội dung xử lý
            string Content = txtContent.Text;
            //Upload File
            DateTime CurrentTime = DateTime.Now;
            string   day         = CurrentTime.Day.ToString();
            string   month       = CurrentTime.Month.ToString();
            string   year        = CurrentTime.Year.ToString();
            string   hour        = CurrentTime.Hour.ToString();
            string   minute      = CurrentTime.Minute.ToString();
            string   millisecond = CurrentTime.Millisecond.ToString();
            string   str         = "-" + day + "-" + month + "-" + year + "-" + "-" + hour + "-" + minute + "-" + millisecond;
            //Lấy danh sách file đính kèm
            BAttach            Bobj = new BAttach();
            HttpFileCollection hfc  = Request.Files;
            int    n        = hfc.Count;
            string listFile = ",";

            if (n > 0)
            {
                try
                {
                    // Get the HttpFileCollection

                    for (int i = 0; i < hfc.Count; i++)
                    {
                        HttpPostedFile hpf = hfc[i];
                        if (hpf.ContentLength > 0)
                        {
                            hpf.SaveAs(Server.MapPath("/MyFiles") + "/" + System.IO.Path.GetFileNameWithoutExtension(hpf.FileName).Replace(" ", "_") + str + System.IO.Path.GetExtension(hpf.FileName));
                            OAttach obj = new OAttach();
                            obj.Name        = System.IO.Path.GetFileName(hpf.FileName);
                            obj.Path        = "~/MyFiles" + "/" + System.IO.Path.GetFileNameWithoutExtension(hpf.FileName).Replace(" ", "_") + str + System.IO.Path.GetExtension(hpf.FileName);
                            obj.Description = "";
                            Bobj.Add(obj);
                            listFile += Bobj.GetLast().FirstOrDefault().AttachID.ToString() + ",";
                        }
                    }
                }
                catch (Exception ex)
                {
                }
            }
            //Lấy danh sách người chuyển tiếp
            string UserJoin = hdfUsers.Value;

            if (UserJoin == ",")
            {
                UserJoin = "";
            }

            //////////////////////////////////////////////
            //Tạo Comment mới
            BComment BobjComment = new BComment();
            OComment objComment  = new OComment();

            objComment.CommentID    = WorkID.ToString() + "" + CurrentTime.ToString();
            objComment.Title        = "Xử lý công việc: " + BobjWork.GetWork(WorkID).First().Name;
            objComment.Content      = Content;
            objComment.IDUserCreate = IDUserCreate;
            objComment.IDDocument   = "";
            objComment.IDWork       = WorkID;
            objComment.Attachs      = listFile;
            objComment.CreateDate   = CurrentTime;

            BobjComment.Add(objComment);

            //Thêm danh sách người chuyển tiếp nếu có chuyển tiếp

            if (UserJoin != "")
            {
                OWork objWork = new OWork();
                objWork = BobjWork.GetWork(WorkID).First();
                //Xử lý người chuyển tiếp trùng lặp
                string CurrentList = objWork.IDUserProcess;

                string[] divUser = UserJoin.Split(',');

                for (int i = 0; i < divUser.Count(); i++)
                {
                    divUser[i]  = "," + divUser[i] + ",";
                    CurrentList = CurrentList.Replace(divUser[i], ",");
                }
                string newlistUserProcess = CurrentList + UserJoin;
                BobjWork.UpdateUserProcess(WorkID, newlistUserProcess, objWork.IDUserCreate);   //Lấy IDUserCreate sau
            }

            Page.Response.Redirect(HttpContext.Current.Request.Url.ToString(), true);
        }
コード例 #12
0
        protected void btnForward_Click(object sender, EventArgs e)
        {
            int         WorkID  = int.Parse(Request.QueryString["WorkID"].ToString());
            CultureInfo culture = new CultureInfo("fr-FR", true);

            //Upload File
            DateTime CurrentTime = DateTime.Now;
            string   day         = CurrentTime.Day.ToString();
            string   month       = CurrentTime.Month.ToString();
            string   year        = CurrentTime.Year.ToString();
            string   hour        = CurrentTime.Hour.ToString();
            string   minute      = CurrentTime.Minute.ToString();
            string   millisecond = CurrentTime.Millisecond.ToString();
            string   str         = "-" + day + "-" + month + "-" + year + "-" + "-" + hour + "-" + minute + "-" + millisecond;

            //Lấy danh sách file Attach
            BAttach            Bobj = new BAttach();
            HttpFileCollection hfc  = Request.Files;
            int    n        = hfc.Count;
            string listFile = ",";

            try
            {
                // Get the HttpFileCollection

                for (int i = 0; i < hfc.Count; i++)
                {
                    HttpPostedFile hpf = hfc[i];
                    if (hpf.ContentLength > 0)
                    {
                        hpf.SaveAs(Server.MapPath("/MyFiles") + "/" + System.IO.Path.GetFileNameWithoutExtension(hpf.FileName).Replace(" ", "_") + str + System.IO.Path.GetExtension(hpf.FileName));
                        OAttach obj = new OAttach();
                        obj.Name        = System.IO.Path.GetFileName(hpf.FileName);
                        obj.Path        = "~/MyFiles" + "/" + System.IO.Path.GetFileNameWithoutExtension(hpf.FileName).Replace(" ", "_") + str + System.IO.Path.GetExtension(hpf.FileName);
                        obj.Description = "";
                        Bobj.Add(obj);
                        listFile += Bobj.GetLast().FirstOrDefault().AttachID.ToString() + ",";
                    }
                }
            }
            catch (Exception ex)
            {
            }


            //Lấy danh sách người thực hiện công việc

            string UserJoin = hdfUsers.Value;

            if (UserJoin == ",")
            {
                UserJoin = "";
            }
            else
            {
                UserJoin = "," + UserJoin;
            }
            //Lấy mức độ ưu tiên
            string Priority = string.Empty;

            if (rdoPrior1.Checked == true)
            {
                Priority = "RAT_QUAN_TRONG";
            }
            else if (rdoPrior2.Checked == true)
            {
                Priority = "QUAN_TRONG";
            }
            else
            {
                Priority = "BINH_THUONG";
            }

            // Cập nhật công việc
            OWork objWork = new OWork();
            BWork _BWork  = new BWork();

            objWork = _BWork.GetWork(WorkID).First();

            string Name        = txtWorkName.Text;
            string Description = txtDescription.Text;
            string Content     = txtContent.Text;
            string Attachs     = objWork.Attachs;

            if (listFile != ",")
            {
                Attachs = Attachs.Remove(Attachs.Length - 1, 1) + listFile;
            }
            int    IDUserCreate  = objWork.IDUserCreate;
            string IDUserProcess = "";
            //-- Kiểm tra quyền giao việc
            BUser ctl = new BUser();

            if (ctl.HasPermission(Global.UserInfo.UserID, PermissionCode.WorkAssignment.ToString()) || Global.IsAdmin())
            {
                IDUserProcess = UserJoin;
            }
            else
            {
                IDUserProcess = "," + Global.UserInfo.UserName + ",";
            }
            int      IDWorkGroup = int.Parse(ddlWorkGroup.SelectedValue);
            DateTime CreateDate  = objWork.CreateDate;
            string   Status      = "DANG_THUC_HIEN";
            // Priority = Priority;
            DateTime StartProcess = DateTime.Parse(txtStartDate.Text, culture, DateTimeStyles.NoCurrentDateDefault);
            DateTime EndProcess   = DateTime.Parse(txtEndDate.Text, culture, DateTimeStyles.NoCurrentDateDefault);

            BWork BobjWork = new BWork();

            if (BobjWork.Update(WorkID, Name, Description, Content, Attachs, IDUserCreate, IDUserProcess, CreateDate, StartProcess, EndProcess, Status, Priority, IDWorkGroup))
            {
                Response.Redirect("WorkAssignment.aspx");
            }
            else
            {
                RegisterClientScriptBlock("NOTE", "<script>alert('Giao việc không thành công');</script>");
            }
        }
コード例 #13
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            CultureInfo culture = new CultureInfo("fr-FR", true);

            //Upload File
            DateTime CurrentTime = DateTime.Now;
            string   day         = CurrentTime.Day.ToString();
            string   month       = CurrentTime.Month.ToString();
            string   year        = CurrentTime.Year.ToString();
            string   hour        = CurrentTime.Hour.ToString();
            string   minute      = CurrentTime.Minute.ToString();
            string   millisecond = CurrentTime.Millisecond.ToString();
            string   str         = "-" + day + "-" + month + "-" + year + "-" + "-" + hour + "-" + minute + "-" + millisecond;

            //Lấy danh sách file Attach
            BAttach            Bobj = new BAttach();
            HttpFileCollection hfc  = Request.Files;
            int    n        = hfc.Count;
            string listFile = ",";

            try
            {
                // Get the HttpFileCollection

                for (int i = 0; i < hfc.Count; i++)
                {
                    HttpPostedFile hpf = hfc[i];
                    if (hpf.ContentLength > 0)
                    {
                        hpf.SaveAs(Server.MapPath("/MyFiles") + "/" + System.IO.Path.GetFileNameWithoutExtension(hpf.FileName).Replace(" ", "_") + str + System.IO.Path.GetExtension(hpf.FileName));
                        OAttach obj = new OAttach();
                        obj.Name        = System.IO.Path.GetFileName(hpf.FileName);
                        obj.Path        = "~/MyFiles" + "/" + System.IO.Path.GetFileNameWithoutExtension(hpf.FileName).Replace(" ", "_") + str + System.IO.Path.GetExtension(hpf.FileName);
                        obj.Description = "";
                        Bobj.Add(obj);
                        listFile += Bobj.GetLast().FirstOrDefault().AttachID.ToString() + ",";
                    }
                }
            }
            catch (Exception ex)
            {
            }


            //Lấy danh sách người thực hiện công việc

            string UserJoin = hdfUsers.Value;

            if (UserJoin == ",")
            {
                UserJoin = "";
            }
            else
            {
                UserJoin = "," + UserJoin;
            }
            //Lấy mức độ ưu tiên
            string Priority = string.Empty;

            if (rdoPrior1.Checked == true)
            {
                Priority = "RAT_QUAN_TRONG";
            }
            else if (rdoPrior2.Checked == true)
            {
                Priority = "QUAN_TRONG";
            }
            else
            {
                Priority = "BINH_THUONG";
            }

            //Lưu công việc mới
            OWork objWork = new OWork();

            objWork.Name         = txtWorkName.Text;
            objWork.Description  = txtDescription.Text;
            objWork.Content      = txtContent.Text;
            objWork.Attachs      = listFile;
            objWork.IDUserCreate = Global.UserInfo.UserID;
            BUser ctl = new BUser();

            //-- Kiểm tra quyền giao việc
            if (ctl.HasPermission(Global.UserInfo.UserID, PermissionCode.WorkAssignment.ToString()) || Global.IsAdmin())
            {
                objWork.IDUserProcess = UserJoin;
            }
            else
            {
                objWork.IDUserProcess = "," + Global.UserInfo.UserName + ",";
            }

            objWork.IDWorkGroup  = int.Parse(ddlWorkGroup.SelectedValue);
            objWork.CreateDate   = CurrentTime;
            objWork.Status       = "CHUA_GIAO";
            objWork.Priority     = Priority;
            objWork.StartProcess = DateTime.Parse(txtStartDate.Text, culture, DateTimeStyles.NoCurrentDateDefault);
            objWork.EndProcess   = DateTime.Parse(txtEndDate.Text, culture, DateTimeStyles.NoCurrentDateDefault);

            BWork BobjWork = new BWork();

            BobjWork.Add(objWork);
            Response.Redirect("WorkAssignment.aspx");
        }
コード例 #14
0
        protected void btnForward_Click(object sender, EventArgs e)
        {
            //Gửi thông báo tới người thực hiện công việc


            //Upload File
            CultureInfo culture = new CultureInfo("fr-FR", true);

            //Upload File
            DateTime CurrentTime = DateTime.Now;
            string   day         = CurrentTime.Day.ToString();
            string   month       = CurrentTime.Month.ToString();
            string   year        = CurrentTime.Year.ToString();
            string   hour        = CurrentTime.Hour.ToString();
            string   minute      = CurrentTime.Minute.ToString();
            string   millisecond = CurrentTime.Millisecond.ToString();
            string   str         = "-" + day + "-" + month + "-" + year + "-" + "-" + hour + "-" + minute + "-" + millisecond;

            //Lấy danh sách file Attach
            BAttach            Bobj = new BAttach();
            HttpFileCollection hfc  = Request.Files;
            int    n        = hfc.Count;
            string listFile = ",";

            try
            {
                // Get the HttpFileCollection

                for (int i = 0; i < hfc.Count; i++)
                {
                    HttpPostedFile hpf = hfc[i];
                    if (hpf.ContentLength > 0)
                    {
                        hpf.SaveAs(Server.MapPath("/MyFiles") + "/" + System.IO.Path.GetFileNameWithoutExtension(hpf.FileName).Replace(" ", "_") + str + System.IO.Path.GetExtension(hpf.FileName));
                        OAttach obj = new OAttach();
                        obj.Name        = System.IO.Path.GetFileName(hpf.FileName);
                        obj.Path        = "~/MyFiles" + "/" + System.IO.Path.GetFileNameWithoutExtension(hpf.FileName).Replace(" ", "_") + str + System.IO.Path.GetExtension(hpf.FileName);
                        obj.Description = "";
                        Bobj.Add(obj);
                        listFile += Bobj.GetLast().FirstOrDefault().AttachID.ToString() + ",";
                    }
                }
            }
            catch (Exception ex)
            {
            }


            //Lấy danh sách người thực hiện công việc

            string UserJoin = hdfUsers.Value;

            if (UserJoin == ",")
            {
                UserJoin = "";
            }
            else
            {
                UserJoin = "," + UserJoin;
            }
            //Lấy mức độ ưu tiên
            string Priority = string.Empty;

            if (rdoPrior1.Checked == true)
            {
                Priority = "RAT_QUAN_TRONG";
            }
            else if (rdoPrior2.Checked == true)
            {
                Priority = "QUAN_TRONG";
            }
            else
            {
                Priority = "BINH_THUONG";
            }

            //Lưu công việc mới
            OWork objWork = new OWork();

            objWork.Name          = txtWorkName.Text;
            objWork.Description   = txtDescription.Text;
            objWork.Content       = txtContent.Text;
            objWork.Attachs       = listFile;
            objWork.IDUserCreate  = Global.UserInfo.UserID;  //--Lấy IDUserCreate sau
            objWork.IDUserProcess = UserJoin;
            objWork.IDWorkGroup   = int.Parse(ddlWorkGroup.SelectedValue);
            objWork.CreateDate    = CurrentTime;
            objWork.Status        = "DANG_THUC_HIEN";
            objWork.Priority      = Priority;
            objWork.StartProcess  = DateTime.Parse(txtStartDate.Text, culture, DateTimeStyles.NoCurrentDateDefault);
            objWork.EndProcess    = DateTime.Parse(txtEndDate.Text, culture, DateTimeStyles.NoCurrentDateDefault);

            BWork BobjWork = new BWork();

            BobjWork.Add(objWork);

            //Reset Field
            ResetField();
            RegisterClientScriptBlock("NOTE", "<script>alert('Công việc đã được giao !');</script>");
        }