Exemple #1
0
        private void SavePriorities()
        {
            string StrTitle = "";

            StrTitle = this.txtcontent.Text.Trim().ToString();
            if (CheckPriority())
            {
                if (!string.IsNullOrEmpty(StrTitle))
                {
                    RefreshUI(RefreshedTypes.ProgressBar);
                    if (action == Action.Add)
                    {
                        tmpProritityT.PRIORITIESID = System.Guid.NewGuid().ToString();
                        tmpProritityT.PRIORITIES   = StrTitle;

                        tmpProritityT.CREATEDATE = System.DateTime.Now;

                        tmpProritityT.OWNERCOMPANYID     = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                        tmpProritityT.OWNERDEPARTMENTID  = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                        tmpProritityT.OWNERID            = Common.CurrentLoginUserInfo.EmployeeID;
                        tmpProritityT.OWNERNAME          = Common.CurrentLoginUserInfo.EmployeeName;
                        tmpProritityT.OWNERPOSTID        = Common.CurrentLoginUserInfo.UserPosts[0].PostID;
                        tmpProritityT.CREATECOMPANYID    = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                        tmpProritityT.CREATEDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                        tmpProritityT.CREATEUSERNAME     = Common.CurrentLoginUserInfo.EmployeeName;
                        tmpProritityT.CREATEPOSTID       = Common.CurrentLoginUserInfo.UserPosts[0].PostID;
                        tmpProritityT.CREATEUSERID       = Common.CurrentLoginUserInfo.EmployeeID;

                        tmpProritityT.UPDATEUSERNAME = "";
                        tmpProritityT.UPDATEDATE     = null;
                        tmpProritityT.UPDATEUSERID   = "";


                        PrioritityClient.DocPriorityAddAsync(tmpProritityT);
                    }
                    if (action == Action.Edit)
                    {
                        tmpProritityT.PRIORITIES = StrTitle;

                        tmpProritityT.OWNERCOMPANYID    = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                        tmpProritityT.OWNERDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                        tmpProritityT.OWNERID           = Common.CurrentLoginUserInfo.EmployeeID;
                        tmpProritityT.OWNERNAME         = Common.CurrentLoginUserInfo.EmployeeName;
                        tmpProritityT.OWNERPOSTID       = Common.CurrentLoginUserInfo.UserPosts[0].PostID;

                        tmpProritityT.UPDATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName;
                        tmpProritityT.UPDATEDATE     = System.DateTime.Now;
                        tmpProritityT.UPDATEUSERID   = Common.CurrentLoginUserInfo.EmployeeID;
                        PrioritityClient.DocPriorityInfoUpdateAsync(tmpProritityT);
                    }
                }
            }
        }