コード例 #1
0
        public static bool Add(FlowProcessInfo flowProcessInfo, string statusCodes, string roleIds)
        {
            bool[] flagArray = new bool[] { true, true, true };
            bool   flag      = false;

            if (Add(flowProcessInfo))
            {
                if (!string.IsNullOrEmpty(statusCodes))
                {
                    flagArray[1] = AddStatusCodeToProcessStatusCode(flowProcessInfo.FlowId, flowProcessInfo.ProcessId, statusCodes);
                }
                if (!string.IsNullOrEmpty(roleIds))
                {
                    flagArray[2] = AddGroupToProcessGroup(flowProcessInfo.FlowId, flowProcessInfo.ProcessId, roleIds);
                }
            }
            else
            {
                flagArray[0] = false;
            }
            if ((flagArray[0] && flagArray[1]) && flagArray[2])
            {
                flag = true;
            }
            return(flag);
        }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         string action      = BasePage.RequestString("Action", "Add");
         int    workFlowsId = BasePage.RequestInt32("FlowId");
         int    processId   = BasePage.RequestInt32("ProcessID");
         this.HdnFlowId.Value = workFlowsId.ToString();
         string flowName = WorkFlow.GetWorkFlowsById(workFlowsId).FlowName;
         this.ListStatusCodeDataBind(1);
         this.DropStatusCodeDataBind(this.DropPassActionStatus, 2);
         this.DropStatusCodeDataBind(this.DropRejectActionStatus, 3);
         this.RolesList(action, workFlowsId, processId);
         this.SmpNavigator.CurrentNode = " " + flowName;
         this.LblWorkFlows.Text        = flowName;
         if (action == "Modify")
         {
             FlowProcessInfo flowProcessById = FlowProcess.GetFlowProcessById(workFlowsId, processId);
             if (!flowProcessById.IsNull)
             {
                 this.TxtProcessName.Text = flowProcessById.ProcessName;
                 this.TxtDescription.Text = flowProcessById.Description;
             }
             this.GetProcessStatusCodeList(workFlowsId, processId);
             this.EChklProcessGroup.SetSelectValue(FlowProcess.GetGroupIdByProcessIdAndFlowId(flowProcessById.FlowId, flowProcessById.ProcessId));
             this.TxtPassActionName.Text             = flowProcessById.PassActionName;
             this.DropPassActionStatus.SelectedValue = flowProcessById.PassActionStatus.ToString();
             this.TxtRejectActionName.Text           = flowProcessById.RejectActionName;
             this.DropRejectActionStatus.Text        = flowProcessById.RejectActionStatus.ToString();
             this.HdnAction.Value    = action;
             this.HdnProcessId.Value = flowProcessById.ProcessId.ToString();
         }
     }
 }
コード例 #3
0
        public bool Update(FlowProcessInfo flowProcessInfo)
        {
            Parameters parms = new Parameters();

            GetParameters(flowProcessInfo, parms);
            string strSql = "UPDATE PE_FlowProcess SET ProcessID = @ProcessId, FlowID = @FlowId, ProcessName = @ProcessName, Description = @Description, PassActionName = @PassActionName, PassActionStatus = @PassActionStatus, RejectActionName = @RejectActionName, RejectActionStatus = @RejectActionStatus WHERE ProcessID = @ProcessId AND FlowID = @FlowID";

            return(DBHelper.ExecuteSql(strSql, parms));
        }
コード例 #4
0
        public static bool Add(FlowProcessInfo flowProcessInfo)
        {
            bool flag = false;

            if (flowProcessInfo.FlowId > 0)
            {
                flag = dal.Add(flowProcessInfo);
            }
            return(flag);
        }
コード例 #5
0
        public bool Add(FlowProcessInfo flowProcessInfo)
        {
            Parameters parms = new Parameters();

            flowProcessInfo.ProcessId = GetMaxProcessId() + 1;
            GetParameters(flowProcessInfo, parms);
            string strSql = "INSERT INTO PE_FlowProcess(ProcessID, FlowID, ProcessName, Description, PassActionName, PassActionStatus, RejectActionName, RejectActionStatus) VALUES (@ProcessId, @FlowId, @ProcessName, @Description, @PassActionName, @PassActionStatus, @RejectActionName, @RejectActionStatus)";

            return(DBHelper.ExecuteSql(strSql, parms));
        }
コード例 #6
0
 private static void GetParameters(FlowProcessInfo flowProcessInfo, Parameters parms)
 {
     parms.AddInParameter("@ProcessId", DbType.Int32, flowProcessInfo.ProcessId);
     parms.AddInParameter("@FlowId", DbType.Int32, flowProcessInfo.FlowId);
     parms.AddInParameter("@ProcessName", DbType.String, flowProcessInfo.ProcessName);
     parms.AddInParameter("@Description", DbType.String, flowProcessInfo.Description);
     parms.AddInParameter("@PassActionName", DbType.String, flowProcessInfo.PassActionName);
     parms.AddInParameter("@PassActionStatus", DbType.Int32, flowProcessInfo.PassActionStatus);
     parms.AddInParameter("@RejectActionName", DbType.String, flowProcessInfo.RejectActionName);
     parms.AddInParameter("@RejectActionStatus", DbType.Int32, flowProcessInfo.RejectActionStatus);
 }
コード例 #7
0
 private static void FlowProcessFromrdr(FlowProcessInfo flowProcessInfo, NullableDataReader rdr)
 {
     flowProcessInfo.ProcessId          = rdr.GetInt32("ProcessID");
     flowProcessInfo.FlowId             = rdr.GetInt32("FlowID");
     flowProcessInfo.ProcessName        = rdr.GetString("ProcessName");
     flowProcessInfo.Description        = rdr.GetString("Description");
     flowProcessInfo.PassActionName     = rdr.GetString("PassActionName");
     flowProcessInfo.PassActionStatus   = rdr.GetInt32("PassActionStatus");
     flowProcessInfo.RejectActionName   = rdr.GetString("RejectActionName");
     flowProcessInfo.RejectActionStatus = rdr.GetInt32("RejectActionStatus");
 }
コード例 #8
0
        public static bool Copy(int flowId)
        {
            bool          flag          = false;
            WorkFlowsInfo workFlowsById = new WorkFlowsInfo();
            WorkFlowsInfo workFlowsInfo = new WorkFlowsInfo();

            workFlowsById             = GetWorkFlowsById(flowId);
            workFlowsInfo.FlowId      = GetMaxId() + 1;
            workFlowsInfo.FlowName    = workFlowsById.FlowName + "复制";
            workFlowsInfo.Description = workFlowsById.Description;
            if (!Add(workFlowsInfo))
            {
                return(flag);
            }
            string str = "";
            IList <FlowProcessInfo> flowProcessList = FlowProcess.GetFlowProcessList(flowId);

            for (int i = 0; i < flowProcessList.Count; i++)
            {
                FlowProcessInfo flowProcessInfo = new FlowProcessInfo();
                flowProcessInfo.FlowId             = workFlowsInfo.FlowId;
                flowProcessInfo.Description        = flowProcessList[i].Description;
                flowProcessInfo.PassActionName     = flowProcessList[i].PassActionName;
                flowProcessInfo.PassActionStatus   = flowProcessList[i].PassActionStatus;
                flowProcessInfo.ProcessId          = flowProcessList[i].ProcessId;
                flowProcessInfo.ProcessName        = flowProcessList[i].ProcessName;
                flowProcessInfo.RejectActionName   = flowProcessList[i].RejectActionName;
                flowProcessInfo.RejectActionStatus = flowProcessList[i].RejectActionStatus;
                IList <StatusInfo> processStatusCodeList = FlowProcess.GetProcessStatusCodeList(flowProcessList[i].FlowId, flowProcessList[i].ProcessId);
                StringBuilder      sb = new StringBuilder();
                for (int j = 0; j < processStatusCodeList.Count; j++)
                {
                    StringHelper.AppendString(sb, processStatusCodeList[j].StatusCode.ToString());
                }
                IList <RoleInfo> processRoleList = FlowProcess.GetProcessRoleList(flowProcessList[i].FlowId, flowProcessList[i].ProcessId);
                for (int k = 0; k < processRoleList.Count; k++)
                {
                    if (string.IsNullOrEmpty(str))
                    {
                        str = processRoleList[k].RoleId.ToString();
                    }
                    else
                    {
                        str = str + "," + processRoleList[k].RoleId;
                    }
                }
                if (!FlowProcess.Add(flowProcessInfo, sb.ToString(), str))
                {
                    break;
                }
            }
            return(true);
        }
コード例 #9
0
        private static FlowProcessInfo FlowProcessInfoFromrdataReader(NullableDataReader rdr)
        {
            FlowProcessInfo info = new FlowProcessInfo();

            info.ProcessId          = rdr.GetInt32("ProcessId");
            info.FlowId             = rdr.GetInt32("FlowId");
            info.ProcessName        = rdr.GetString("ProcessName");
            info.Description        = rdr.GetString("Description");
            info.PassActionName     = rdr.GetString("PassActionName");
            info.PassActionStatus   = rdr.GetInt32("PassActionStatus");
            info.RejectActionName   = rdr.GetString("RejectActionName");
            info.RejectActionStatus = rdr.GetInt32("RejectActionStatus");
            return(info);
        }
コード例 #10
0
        private static int UserPass(int workFlowId)
        {
            string[]        strArray = PEContext.Current.Admin.Roles.Split(new char[] { ',' });
            FlowProcessInfo info     = new FlowProcessInfo(true);

            foreach (string str in strArray)
            {
                FlowProcessInfo flowProcessByRoles = FlowProcess.GetFlowProcessByRoles(workFlowId, DataConverter.CLng(str));
                if (flowProcessByRoles.PassActionStatus > info.PassActionStatus)
                {
                    info = flowProcessByRoles;
                }
            }
            return(info.PassActionStatus);
        }
コード例 #11
0
 protected void EBtnSubmit_Click(object sender, EventArgs e)
 {
     if (this.Page.IsValid)
     {
         if (this.DropPassActionStatus.SelectedValue == this.DropRejectActionStatus.SelectedValue)
         {
             AdminPage.WriteErrMsg("<li>“通过后的状态”与“打回后的状态”必须不同!</li>");
         }
         FlowProcessInfo flowProcessInfo = new FlowProcessInfo();
         if (this.HdnAction.Value == "Modify")
         {
             flowProcessInfo.ProcessId = BasePage.RequestInt32("ProcessID");
             flowProcessInfo.FlowId    = BasePage.RequestInt32("FlowID");
         }
         flowProcessInfo.FlowId             = DataConverter.CLng(this.HdnFlowId.Value);
         flowProcessInfo.ProcessName        = this.TxtProcessName.Text;
         flowProcessInfo.Description        = this.TxtDescription.Text;
         flowProcessInfo.PassActionName     = this.TxtPassActionName.Text;
         flowProcessInfo.PassActionStatus   = DataConverter.CLng(this.DropPassActionStatus.SelectedValue);
         flowProcessInfo.RejectActionName   = this.TxtRejectActionName.Text;
         flowProcessInfo.RejectActionStatus = DataConverter.CLng(this.DropRejectActionStatus.SelectedValue);
         StringBuilder listControl = this.GetListControl(this.ListProcessStatusCode, "请选择可以执行操作的状态码!");
         string        roleIds     = this.EChklProcessGroup.SelectList();
         bool          flag        = false;
         if (this.HdnAction.Value == "Modify")
         {
             flag = FlowProcess.Update(flowProcessInfo, listControl.ToString(), roleIds);
         }
         else if (!FlowProcess.ExistFlowProcess(flowProcessInfo.FlowId, flowProcessInfo.ProcessName))
         {
             flag = FlowProcess.Add(flowProcessInfo, listControl.ToString(), roleIds);
         }
         else
         {
             AdminPage.WriteErrMsg("<li>存在相同的步骤名!</li>");
         }
         if (flag)
         {
             AdminPage.WriteSuccessMsg("<li>保存流程数据成功!</li>", "FlowProcessManage.aspx?FlowId=" + BasePage.RequestString("FlowId") + "&ProcessID=" + BasePage.RequestString("FlowId"));
         }
         else
         {
             AdminPage.WriteErrMsg("<li>保存流程数据失败!</li>");
         }
     }
 }
コード例 #12
0
        public FlowProcessInfo GetFlowProcessByRoles(int flowId, string roleIdArr)
        {
            Parameters cmdParams = new Parameters();

            cmdParams.AddInParameter("@FlowId", DbType.Int32, flowId);
            string strCommand = "SELECT TOP 1 * FROM PE_FlowProcess WHERE FlowID = @FlowId AND ProcessID IN (SELECT ProcessID FROM PE_Process_Roles WHERE FlowID = @FlowID AND RoleId IN (" + roleIdArr + ")) ORDER BY PassActionStatus DESC";

            using (NullableDataReader reader = DBHelper.ExecuteReader(CommandType.Text, strCommand, cmdParams))
            {
                if (reader.Read())
                {
                    FlowProcessInfo flowProcessInfo = new FlowProcessInfo();
                    FlowProcessFromrdr(flowProcessInfo, reader);
                    return(flowProcessInfo);
                }
                return(new FlowProcessInfo(true));
            }
        }
コード例 #13
0
        public FlowProcessInfo GetFlowProcessByRoles(int flowId, int roleId)
        {
            Parameters cmdParams = new Parameters();

            cmdParams.AddInParameter("@FlowId", DbType.Int32, flowId);
            cmdParams.AddInParameter("@RoleId", DbType.Int32, roleId);
            string strCommand = "SELECT * FROM PE_FlowProcess WHERE FlowID = @FlowId AND ProcessID = (SELECT ProcessID FROM PE_Process_Roles WHERE FlowID = @FlowID AND RoleId = @RoleId)";

            using (NullableDataReader reader = DBHelper.ExecuteReader(CommandType.Text, strCommand, cmdParams))
            {
                if (reader.Read())
                {
                    FlowProcessInfo flowProcessInfo = new FlowProcessInfo();
                    FlowProcessFromrdr(flowProcessInfo, reader);
                    return(flowProcessInfo);
                }
                return(new FlowProcessInfo(true));
            }
        }
コード例 #14
0
        public static bool Update(FlowProcessInfo flowProcessInfo, string statusCodes, string roleIds)
        {
            bool[] flagArray = new bool[] { true, true, true };
            bool   flag      = false;

            if (flowProcessInfo != null)
            {
                flagArray[0] = Update(flowProcessInfo);
            }
            if ((flowProcessInfo != null) && !string.IsNullOrEmpty(statusCodes))
            {
                flagArray[1] = UpdateStatusCodeInProcessStatusCode(flowProcessInfo.FlowId, flowProcessInfo.ProcessId, statusCodes);
            }
            if ((flowProcessInfo != null) && !string.IsNullOrEmpty(roleIds))
            {
                flagArray[2] = UpdateRoleInProcessRole(flowProcessInfo.FlowId, flowProcessInfo.ProcessId, roleIds);
            }
            if ((flagArray[0] && flagArray[1]) && flagArray[2])
            {
                flag = true;
            }
            return(flag);
        }
コード例 #15
0
        private void InitPage()
        {
            this.Path = this.Page.Request.ApplicationPath.Equals("/") ? string.Empty : this.Page.Request.ApplicationPath;
            this.Path = this.Page.Request.Url.Scheme + "://" + this.Page.Request.Url.Authority + this.Path;
            if (base.Request.UrlReferrer != null)
            {
                this.ViewState["UrlReferrer"] = base.Request.UrlReferrer.ToString();
            }
            this.contentDataTable = ContentManage.GetContentDataById(this.m_GeneralId);
            if ((this.contentDataTable == null) || (this.contentDataTable.Rows.Count == 0))
            {
                AdminPage.WriteErrMsg("<li>指定项目不存在!</li>");
            }
            int       nodeId        = DataConverter.CLng(this.contentDataTable.Rows[0]["NodeId"]);
            ModelInfo modelInfoById = ModelManager.GetModelInfoById(DataConverter.CLng(this.contentDataTable.Rows[0]["ModelID"].ToString()));

            if (modelInfoById.IsEshop)
            {
                this.m_IsEshop = true;
                this.TabTitle5.Style.Add("display", "none");
            }
            else
            {
                this.m_IsEshop = false;
                if (!modelInfoById.EnableCharge)
                {
                    this.TabTitle5.Style.Add("display", "none");
                }
                if (!modelInfoById.EnableSignIn)
                {
                    this.TabTitle6.Style.Add("display", "none");
                }
                this.InitSigin(this.m_GeneralId, modelInfoById.EnableSignIn);
            }
            if (!this.Page.IsPostBack)
            {
                int             nodeWorkFlowId     = EasyOne.Contents.Nodes.GetNodeWorkFlowId(nodeId);
                string          roles              = PEContext.Current.Admin.Roles;
                FlowProcessInfo flowProcessByRoles = FlowProcess.GetFlowProcessByRoles(nodeWorkFlowId, roles);
                int             passActionStatus   = 0;
                if (PEContext.Current.Admin.IsSuperAdmin || (nodeWorkFlowId == -1))
                {
                    passActionStatus = 0x63;
                }
                else if (!flowProcessByRoles.IsNull)
                {
                    passActionStatus = flowProcessByRoles.PassActionStatus;
                }
                else
                {
                    this.EBtnCheck.Visible = false;
                }
                if ((passActionStatus > 0) && (passActionStatus > DataConverter.CLng(this.contentDataTable.Rows[0]["Status"])))
                {
                    this.EBtnCheck.CommandArgument = passActionStatus.ToString();
                    this.EBtnCheck.Text            = "审核通过";
                }
                else
                {
                    this.EBtnCheck.CommandArgument = "0";
                    this.EBtnCheck.Text            = "取消审核";
                }
            }
            this.InitContent();
        }
コード例 #16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.m_Administrator = PEContext.Current.Admin.IsSuperAdmin;
     this.m_NodeId        = BasePage.RequestInt32("NodeID");
     foreach (StatusInfo info in Status.GetStatusList())
     {
         if (!this.m_StatusDictionary.ContainsKey(info.StatusCode))
         {
             this.m_StatusDictionary.Add(info.StatusCode, info.StatusName);
         }
     }
     if (!base.IsPostBack)
     {
         int nodeWorkFlowId = Nodes.GetNodeWorkFlowId(this.m_NodeId);
         if (this.m_Administrator)
         {
             this.EBtnPass.Text = "终审通过";
         }
         else
         {
             string[]        strArray = PEContext.Current.Admin.Roles.Split(new char[] { ',' });
             FlowProcessInfo info2    = new FlowProcessInfo(true);
             foreach (string str in strArray)
             {
                 FlowProcessInfo flowProcessByRoles = FlowProcess.GetFlowProcessByRoles(nodeWorkFlowId, DataConverter.CLng(str));
                 if (flowProcessByRoles.PassActionStatus > info2.PassActionStatus)
                 {
                     info2 = flowProcessByRoles;
                 }
                 bool isNull = info2.IsNull;
             }
             if (info2.IsNull)
             {
                 this.EBtnPass.Visible       = false;
                 this.EBtnCancelPass.Visible = false;
             }
             else
             {
                 this.EBtnPass.Text = info2.PassActionName;
             }
         }
         this.DropRescentQuery.SelectedValue = BasePage.RequestStringToLower("ListType");
         this.HdnListType.Value         = BasePage.RequestStringToLower("ListType");
         this.RadlContent.SelectedValue = BasePage.RequestStringToLower("status", "100");
         this.HdnStatus.Value           = BasePage.RequestStringToLower("status", "100");
         if (this.m_NodeId > 0)
         {
             this.SmpNavigator.CurrentNode    = "<a href=\"ContentManage.aspx\">栏目信息管理</a>";
             this.SmpNavigator.AdditionalNode = Nodes.ShowNodeNavigation(this.m_NodeId);
             if (!string.IsNullOrEmpty(this.SmpNavigator.AdditionalNode))
             {
                 this.SmpNavigator.AdditionalNode = this.SmpNavigator.AdditionalNode.Replace("根节点 >>", "");
             }
             IList <FieldInfo> nodeFieldList = ModelManager.GetNodeFieldList(this.m_NodeId);
             if (nodeFieldList != null)
             {
                 foreach (FieldInfo info4 in nodeFieldList)
                 {
                     if (info4.EnableShowOnSearchForm && (info4.FieldName != "Title"))
                     {
                         this.DrpSearchType.Items.Add(new ListItem(info4.FieldAlias, info4.FieldName));
                     }
                 }
             }
         }
     }
     if (!this.m_Administrator)
     {
         this.m_arrNodeIdShow   = RolePermissions.GetRoleNodeId(PEContext.Current.Admin.Roles, OperateCode.NodeContentPreview);
         this.m_arrNodeIdCheck  = RolePermissions.GetRoleNodeId(PEContext.Current.Admin.Roles, OperateCode.NodeContentCheck);
         this.m_arrNodeIdManage = RolePermissions.GetRoleNodeId(PEContext.Current.Admin.Roles, OperateCode.NodeContentManage);
         if (this.m_NodeId > 0)
         {
             string   findStr       = this.m_NodeId.ToString();
             NodeInfo cacheNodeById = Nodes.GetCacheNodeById(this.m_NodeId);
             if (cacheNodeById.IsNull)
             {
                 AdminPage.WriteErrMsg("当前栏目不存在,可能被删除了请返回!");
             }
             if (cacheNodeById.ParentId > 0)
             {
                 findStr = findStr + "," + cacheNodeById.ParentPath;
             }
             this.m_isCheck  = StringHelper.FoundCharInArr(this.m_arrNodeIdCheck, findStr);
             this.m_isManage = StringHelper.FoundCharInArr(this.m_arrNodeIdManage, findStr);
         }
         else
         {
             this.m_isCheck  = RolePermissions.AccessCheckNodePermission(OperateCode.NodeContentCheck, -1);
             this.m_isManage = RolePermissions.AccessCheckNodePermission(OperateCode.NodeContentManage, -1);
         }
         if (!this.m_isManage)
         {
             this.EBtnBatchDelete.Enabled = false;
             this.EBtnBatchSet.Enabled    = false;
             this.BatchSpecialSet.Enabled = false;
             this.BatchNodeSet.Enabled    = false;
             this.EBtnBatchMove.Enabled   = false;
             this.BtnArchiving.Enabled    = false;
         }
         if (!this.m_isCheck)
         {
             this.EBtnPass.Enabled       = false;
             this.EBtnCancelPass.Enabled = false;
         }
     }
     else
     {
         this.LblContentAdvancedSearch.Visible = true;
     }
 }
コード例 #17
0
 public static bool Update(FlowProcessInfo flowProcessInfo)
 {
     return(dal.Update(flowProcessInfo));
 }
コード例 #18
0
        private void InitPage()
        {
            this.m_GeneralId = BasePage.RequestInt32("GeneralID");
            if (base.Request.UrlReferrer != null)
            {
                this.ViewState["UrlReferrer"] = base.Request.UrlReferrer.ToString();
            }
            this.contentDataTable = ContentManage.GetContentDataById(this.m_GeneralId);
            if ((this.contentDataTable == null) || (this.contentDataTable.Rows.Count == 0))
            {
                AdminPage.WriteErrMsg("<li>指定项目不存在!</li>");
            }
            this.InitContent();
            int nodeId = DataConverter.CLng(this.contentDataTable.Rows[0]["NodeId"]);

            if (!PEContext.Current.Admin.IsSuperAdmin)
            {
                bool   flag       = false;
                string roleNodeId = RolePermissions.GetRoleNodeId(PEContext.Current.Admin.Roles, OperateCode.NodeContentManage);
                if (nodeId > 0)
                {
                    string   findStr       = nodeId.ToString();
                    NodeInfo cacheNodeById = EasyOne.Contents.Nodes.GetCacheNodeById(nodeId);
                    if (cacheNodeById.IsNull)
                    {
                        AdminPage.WriteErrMsg("当前栏目不存在,可能被删除了请返回!");
                    }
                    if (!RolePermissions.AccessCheckNodePermission(OperateCode.NodeContentPreview, cacheNodeById.NodeId))
                    {
                        AdminPage.WriteErrMsg("您没有查看该信息的权限!");
                    }
                    if (cacheNodeById.ParentId > 0)
                    {
                        findStr = findStr + "," + cacheNodeById.ParentPath;
                    }
                    flag = StringHelper.FoundCharInArr(roleNodeId, findStr);
                }
                else
                {
                    flag = RolePermissions.AccessCheckNodePermission(OperateCode.NodeContentManage, -1);
                }
                if (!flag)
                {
                    this.EBtnModify.Enabled = false;
                    this.EBtnDelete.Enabled = false;
                }
            }
            CommonModelInfo prevInfo = ContentManage.GetPrevInfo(nodeId, this.m_GeneralId);

            if (!prevInfo.IsNull)
            {
                this.LnkGetPrevInfo.Text        = prevInfo.Title;
                this.LnkGetPrevInfo.NavigateUrl = ModelManager.GetModelInfoById(prevInfo.ModelId).PreviewInfoFilePath + "?GeneralID=" + prevInfo.GeneralId.ToString();
            }
            else
            {
                this.LnkGetPrevInfo.Text = "没有了";
            }
            CommonModelInfo nextInfo = ContentManage.GetNextInfo(nodeId, this.m_GeneralId);

            if (!nextInfo.IsNull)
            {
                this.LnkGetNextInfo.Text        = nextInfo.Title;
                this.LnkGetNextInfo.NavigateUrl = ModelManager.GetModelInfoById(prevInfo.ModelId).PreviewInfoFilePath + "?GeneralID=" + nextInfo.GeneralId.ToString();
            }
            else
            {
                this.LnkGetNextInfo.Text = "没有了";
            }
            this.SmpNavigator.AdditionalNode = EasyOne.Contents.Nodes.ShowNodeNavigation(nodeId);
            if (!string.IsNullOrEmpty(this.SmpNavigator.AdditionalNode))
            {
                this.SmpNavigator.AdditionalNode = this.SmpNavigator.AdditionalNode.Replace("根节点 >>", "");
            }
            if (!this.Page.IsPostBack)
            {
                int             nodeWorkFlowId     = EasyOne.Contents.Nodes.GetNodeWorkFlowId(nodeId);
                string          roles              = PEContext.Current.Admin.Roles;
                FlowProcessInfo flowProcessByRoles = FlowProcess.GetFlowProcessByRoles(nodeWorkFlowId, roles);
                int             passActionStatus   = 0;
                if (PEContext.Current.Admin.IsSuperAdmin || (nodeWorkFlowId == -1))
                {
                    passActionStatus = 0x63;
                }
                else if (!flowProcessByRoles.IsNull)
                {
                    passActionStatus = flowProcessByRoles.PassActionStatus;
                }
                else
                {
                    this.EBtnCheck.Visible = false;
                }
                if ((passActionStatus > 0) && (passActionStatus > DataConverter.CLng(this.contentDataTable.Rows[0]["Status"])))
                {
                    this.EBtnCheck.CommandArgument = passActionStatus.ToString();
                    this.EBtnCheck.Text            = "审核通过";
                }
                else
                {
                    this.EBtnCheck.CommandArgument = "0";
                    this.EBtnCheck.Text            = "取消审核";
                }
            }
        }
コード例 #19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         int nodeId = DataConverter.CLng(HttpContext.Current.Request["NodeId"]);
         if (nodeId == 0)
         {
             nodeId = ContentManage.GetContentNodeId(DataConverter.CLng(HttpContext.Current.Request["GeneralId"]));
         }
         if (base.IsAdminManage)
         {
             int             nodeWorkFlowId     = Nodes.GetNodeWorkFlowId(nodeId);
             string          roles              = PEContext.Current.Admin.Roles;
             FlowProcessInfo flowProcessByRoles = FlowProcess.GetFlowProcessByRoles(nodeWorkFlowId, roles);
             if (BaseUserControl.RequestStringToLower("Action") == "modify")
             {
                 ListItem item  = new ListItem("草稿", "-1");
                 ListItem item2 = new ListItem("不改变当前状态", this.FieldValue);
                 item2.Selected = true;
                 if (PEContext.Current.Admin.IsSuperAdmin)
                 {
                     ListItem item3 = new ListItem("退稿", "-2");
                     this.RadlStatus.Items.Add(item);
                     this.RadlStatus.Items.Add(item3);
                     if (this.FieldValue == "99")
                     {
                         item2.Text = "终审通过";
                         this.RadlStatus.Items.Add(item2);
                     }
                     else
                     {
                         this.RadlStatus.Items.Add(item2);
                         ListItem item4 = new ListItem("终审通过", "99");
                         this.RadlStatus.Items.Add(item4);
                     }
                 }
                 else if (!flowProcessByRoles.IsNull)
                 {
                     ListItem item5 = new ListItem(flowProcessByRoles.RejectActionName, flowProcessByRoles.RejectActionStatus.ToString());
                     ListItem item6 = new ListItem(flowProcessByRoles.PassActionName, flowProcessByRoles.PassActionStatus.ToString());
                     this.RadlStatus.Items.Add(item5);
                     if (this.FieldValue == flowProcessByRoles.PassActionStatus.ToString())
                     {
                         item2.Text = flowProcessByRoles.PassActionName;
                         this.RadlStatus.Items.Add(item2);
                     }
                     else
                     {
                         this.RadlStatus.Items.Add(item2);
                         this.RadlStatus.Items.Add(item6);
                     }
                 }
                 else
                 {
                     this.RadlStatus.Items.Add(item2);
                 }
             }
             else
             {
                 ListItem item7 = new ListItem("草稿", "-1");
                 ListItem item8 = new ListItem("待审核", "0");
                 this.RadlStatus.Items.Add(item7);
                 this.RadlStatus.Items.Add(item8);
                 item8.Selected = true;
                 if (PEContext.Current.Admin.IsSuperAdmin)
                 {
                     ListItem item9 = new ListItem("终审通过", "99");
                     item9.Selected = true;
                     this.RadlStatus.Items.Add(item9);
                 }
                 else if (!flowProcessByRoles.IsNull)
                 {
                     ListItem item10 = new ListItem(flowProcessByRoles.PassActionName, flowProcessByRoles.PassActionStatus.ToString());
                     item10.Selected = true;
                     this.RadlStatus.Items.Add(item10);
                 }
             }
         }
         else if (PEContext.Current.User.Identity.IsAuthenticated)
         {
             if (HttpContext.Current.Request["Action"] == "Modify")
             {
                 ListItem item11 = new ListItem("草稿", "-1");
                 ListItem item12 = new ListItem("不改变当前状态", this.FieldValue);
                 if (this.FieldValue == "-1")
                 {
                     item11.Selected = true;
                     item12.Text     = "投稿";
                     item12.Value    = "0";
                 }
                 else
                 {
                     item12.Selected = true;
                 }
                 this.RadlStatus.Items.Add(item11);
                 this.RadlStatus.Items.Add(item12);
             }
             else
             {
                 ListItem item13 = new ListItem("草稿", "-1");
                 ListItem item14 = new ListItem("投稿", "0");
                 this.RadlStatus.Items.Add(item13);
                 this.RadlStatus.Items.Add(item14);
                 item14.Selected = true;
             }
         }
         else
         {
             ListItem item15 = new ListItem("投稿", "0");
             this.RadlStatus.Items.Add(item15);
             item15.Selected = true;
         }
         this.RadlStatus.RepeatLayout    = RepeatLayout.Flow;
         this.RadlStatus.RepeatDirection = RepeatDirection.Horizontal;
     }
     else
     {
         this.FieldValue = this.RadlStatus.SelectedValue;
     }
 }