Esempio n. 1
0
        private void SaveComments(string action)
        {
            if (action == "Edit")
            {
                return;
            }
            var comment = ProjectComment.GetSavedComment(Id, "RebuildConsInfo", LastUpdateUserAccount);

            if (comment != null)
            {
                comment.Content = Comments;
                comment.Action  = string.IsNullOrEmpty(action) ? "Save" : action;
                comment.Status  = string.IsNullOrEmpty(action) ? ProjectCommentStatus.Save : ProjectCommentStatus.Submit;
                comment.Update();
            }
            else
            {
                comment                    = new ProjectComment();
                comment.Action             = string.IsNullOrEmpty(action) ? "Save" : action;
                comment.ActivityName       = "";
                comment.Content            = Comments;
                comment.CreateTime         = DateTime.Now;
                comment.CreateUserAccount  = LastUpdateUserAccount;
                comment.CreateUserNameENUS = LastUpdateUserNameENUS;
                comment.CreateUserNameZHCN = LastUpdateUserNameZHCN;
                comment.UserAccount        = LastUpdateUserAccount;
                comment.UserNameENUS       = LastUpdateUserNameENUS;
                comment.UserNameZHCN       = LastUpdateUserNameZHCN;
                comment.RefTableId         = Id;
                comment.Id                 = Guid.NewGuid();
                comment.RefTableName       = "RebuildConsInfo";
                comment.SourceCode         = FlowCode.Rebuild;
                comment.SourceNameZHCN     = FlowCode.Rebuild;
                comment.SourceNameENUS     = FlowCode.Rebuild;
                comment.TitleNameENUS      = ClientCookie.TitleENUS;
                comment.TitleNameZHCN      = ClientCookie.TitleENUS;
                comment.Status             = string.IsNullOrEmpty(action) ? ProjectCommentStatus.Save : ProjectCommentStatus.Submit;
                comment.ProcInstID         = ProcInstID;
                comment.Add();
            }
        }
Esempio n. 2
0
        private void SaveComments(string action)
        {
            var comment = ProjectComment.GetSavedComment(Id, "MajorLeaseLegalReview", ClientCookie.UserCode);

            if (comment != null)
            {
                comment.Content = Comments;
                comment.Action  = string.IsNullOrEmpty(action) ? "Save" : action;
                comment.Status  = string.IsNullOrEmpty(action) ? ProjectCommentStatus.Save : ProjectCommentStatus.Submit;
                comment.Update();
            }
            else
            {
                comment                    = new ProjectComment();
                comment.Action             = string.IsNullOrEmpty(action) ? "Save" : action;
                comment.ActionDesc         =
                    comment.ActivityName   = "";
                comment.Content            = Comments;
                comment.CreateTime         = DateTime.Now;
                comment.CreateUserAccount  = ClientCookie.UserCode;
                comment.CreateUserNameENUS = ClientCookie.UserNameENUS;
                comment.CreateUserNameZHCN = ClientCookie.UserNameZHCN;
                comment.UserAccount        = ClientCookie.UserCode;
                comment.UserNameENUS       = ClientCookie.UserNameENUS;
                comment.UserNameZHCN       = ClientCookie.UserNameZHCN;
                comment.RefTableId         = Id;
                comment.Id                 = Guid.NewGuid();
                comment.RefTableName       = "MajorLeaseLegalReview";
                comment.SourceCode         = FlowCode.MajorLease;
                comment.SourceNameZHCN     = FlowCode.MajorLease;
                comment.SourceNameENUS     = FlowCode.MajorLease;
                comment.TitleNameENUS      = ClientCookie.TitleENUS;
                comment.TitleNameZHCN      = ClientCookie.TitleENUS;
                comment.Status             = string.IsNullOrEmpty(action) ? ProjectCommentStatus.Save : ProjectCommentStatus.Submit;
                comment.ProcInstID         = ProcInstID;
                comment.Add();
            }
        }