예제 #1
0
        private void AddFieldRows()
        {
            Dictionary <int, IList <EasyOne.Model.CommonModel.FieldInfo> > dictionary = new Dictionary <int, IList <EasyOne.Model.CommonModel.FieldInfo> >();
            List <ProductDetailInfo> productInfoList = this.ProductInfoList;
            bool flag = false;

            foreach (ProductDetailInfo info in productInfoList)
            {
                if ((info.ModelId != 0) && !dictionary.ContainsKey(info.ModelId))
                {
                    dictionary.Add(info.ModelId, Field.GetFieldList(info.ModelId));
                    if (!flag)
                    {
                        this.NewCategoryRow("详细参数");
                        flag = true;
                    }
                }
            }
            List <DataTable> list2 = new List <DataTable>();

            for (int i = 0; i < productInfoList.Count; i++)
            {
                list2.Add(ContentManage.GetContentDataById(productInfoList[i].ProductId));
            }
            foreach (KeyValuePair <int, IList <EasyOne.Model.CommonModel.FieldInfo> > pair in dictionary)
            {
                foreach (EasyOne.Model.CommonModel.FieldInfo info2 in pair.Value)
                {
                    if (info2.FieldType != FieldType.Property)
                    {
                        TableRow row = this.NewRow();
                        row.CssClass = "tdbg";
                        row.Cells.Add(NewTitleCell(info2.FieldAlias + ":"));
                        for (int j = 0; j < productInfoList.Count; j++)
                        {
                            if (productInfoList[j].ModelId == pair.Key)
                            {
                                TableCell cell = NewCell(list2[j].Rows[0][info2.FieldName].ToString());
                                cell.HorizontalAlign = HorizontalAlign.Center;
                                row.Cells.Add(cell);
                            }
                            else
                            {
                                row.Cells.Add(NewCell(string.Empty));
                            }
                        }
                        this.TbProduct.Rows.Add(row);
                    }
                }
            }
        }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.m_GeneralId      = BaseUserControl.RequestInt32("GeneralID");
     this.contentDataTable = ContentManage.GetContentDataById(this.m_GeneralId);
     if (this.contentDataTable.Rows.Count > 0)
     {
         ModelInfo modelInfoById = ModelManager.GetModelInfoById(DataConverter.CLng(this.contentDataTable.Rows[0]["ModelID"].ToString()));
         this.InitSigin(this.m_GeneralId, modelInfoById.EnableSignIn);
     }
     else
     {
         BaseUserControl.WriteErrMsg("对不起,错误的参数!", SiteConfig.SiteInfo.VirtualPath + "Default.aspx");
     }
 }
예제 #3
0
        private string ParseDownLoadPath(int urlid, int id, int serverid)
        {
            DataTable contentDataById = ContentManage.GetContentDataById(id);

            if (contentDataById.Rows.Count <= 0)
            {
                DynamicPage.WriteErrMsg("此资源不存在!", SiteConfig.SiteInfo.VirtualPath + "Default.aspx");
            }
            string         str            = "";
            DownServerInfo downServerById = DownServer.GetDownServerById(serverid);
            string         weburl         = "";

            if (contentDataById.Rows.Count > 0)
            {
                str = contentDataById.Rows[0]["DownloadUrl"].ToString();
                int num = 0;
                foreach (string str3 in str.Split(new string[] { "$$$" }, StringSplitOptions.RemoveEmptyEntries))
                {
                    string[] strArray2 = str3.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries);
                    if (num == urlid)
                    {
                        weburl = strArray2[1];
                    }
                    num++;
                }
            }
            if (downServerById.IsNull)
            {
                this.downloadurl = Utility.ConvertAbsolutePath(SiteConfig.SiteInfo.VirtualPath + SiteConfig.SiteOption.UploadDir + "/", weburl, true);
                return(weburl);
            }
            string str4 = downServerById.ServerUrl.ToString();

            if (!str4.StartsWith("http://", StringComparison.OrdinalIgnoreCase))
            {
                str4 = "http://" + str4;
            }
            if (!str4.EndsWith("/", StringComparison.Ordinal))
            {
                str4 = str4 + "/";
            }
            if (weburl.StartsWith("/", StringComparison.Ordinal) || weburl.Contains("://"))
            {
                this.downloadurl = weburl;
                return(weburl);
            }
            this.downloadurl = str4 + weburl;
            return(weburl);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         int    generalId = BasePage.RequestInt32("GeneralID");
         string str       = BasePage.RequestString("fieldName");
         if (!string.IsNullOrEmpty(str))
         {
             DataTable contentDataById = ContentManage.GetContentDataById(generalId);
             if ((contentDataById == null) || (contentDataById.Rows.Count == 0))
             {
                 AdminPage.WriteErrMsg("<li>指定项目不存在!</li>");
             }
             this.LitContent.Text = this.ConversionCode(contentDataById.Rows[0][str].ToString());
         }
     }
 }
        protected void EBtnSubmit_Click(object sender, EventArgs e)
        {
            bool      flag            = true;
            int       num             = BasePage.RequestInt32("type");
            int       generalId       = BasePage.RequestInt32("id");
            DataTable contentDataById = ContentManage.GetContentDataById(generalId);

            if (contentDataById == null)
            {
                DynamicPage.WriteErrMsg("对不起,错误的参数!");
            }
            if (contentDataById.Rows.Count > 0)
            {
                string        str     = contentDataById.Rows[0]["DownloadUrl"].ToString();
                string        str2    = contentDataById.Rows[0]["arrServerName"].ToString();
                StringBuilder builder = new StringBuilder();
                if (this.EgvDownloadError.SelectList.Length == 0)
                {
                    DynamicPage.WriteErrMsg("对不起,您还没选择要报错的信息!");
                }
                for (int i = 0; i < this.EgvDownloadError.Rows.Count; i++)
                {
                    CheckBox box = (CheckBox)this.EgvDownloadError.Rows[i].Cells[this.EgvDownloadError.CheckBoxColumnIndex].FindControl("CheckBoxButton");
                    if (box.Checked)
                    {
                        DownloadErrorInfo downloadErrorInfo = new DownloadErrorInfo();
                        if (num == 1)
                        {
                            if (string.IsNullOrEmpty(str))
                            {
                                downloadErrorInfo.InfoId     = generalId;
                                downloadErrorInfo.ErrorUrl   = new InsideStaticLabel().GetInfoPath(contentDataById.Rows[0]["NodeId"].ToString(), contentDataById.Rows[0]["GeneralId"].ToString(), contentDataById.Rows[0]["InputTime"].ToString(), contentDataById.Rows[0]["Title"].ToString());
                                downloadErrorInfo.ErrorDate  = DateTime.Now;
                                downloadErrorInfo.ErrorTimes = 1;
                            }
                            else if (!string.IsNullOrEmpty(str2))
                            {
                                int serverId = DataConverter.CLng(((HiddenField)this.EgvDownloadError.Rows[i].Cells[1].FindControl("HdnUrlID")).Value);
                                int urlId    = DataConverter.CLng(((HiddenField)this.EgvDownloadError.Rows[i].Cells[1].FindControl("HdnServerID")).Value);
                                downloadErrorInfo.InfoId     = generalId;
                                downloadErrorInfo.ErrorUrl   = DownloadError.GetDownloadurlById(str, urlId, serverId);
                                downloadErrorInfo.ErrorDate  = DateTime.Now;
                                downloadErrorInfo.ErrorTimes = 1;
                            }
                            else
                            {
                                downloadErrorInfo.InfoId     = generalId;
                                downloadErrorInfo.ErrorUrl   = DownloadError.GetDownloadurlById(str, i, 0);
                                downloadErrorInfo.ErrorDate  = DateTime.Now;
                                downloadErrorInfo.ErrorTimes = 1;
                            }
                        }
                        else
                        {
                            downloadErrorInfo.InfoId     = generalId;
                            downloadErrorInfo.ErrorUrl   = new InsideStaticLabel().GetInfoPath(contentDataById.Rows[0]["NodeId"].ToString(), contentDataById.Rows[0]["GeneralId"].ToString(), contentDataById.Rows[0]["InputTime"].ToString(), contentDataById.Rows[0]["Title"].ToString());
                            downloadErrorInfo.ErrorDate  = DateTime.Now;
                            downloadErrorInfo.ErrorTimes = 1;
                        }
                        if (!DownloadError.Add(downloadErrorInfo))
                        {
                            flag = false;
                        }
                    }
                }
                if (flag)
                {
                    DynamicPage.WriteSuccessMsg("感谢您的参与,提交成功!", SiteConfig.SiteInfo.VirtualPath + "Category_" + contentDataById.Rows[0]["NodeId"].ToString() + "/index.aspx");
                }
                else
                {
                    DynamicPage.WriteErrMsg("对不起,提交失败!");
                }
            }
            else
            {
                DynamicPage.WriteErrMsg("对不起,错误的参数!");
            }
        }
 private void ErrorUrlData(int type, int id)
 {
     if (type == 1)
     {
         DataTable contentDataById = ContentManage.GetContentDataById(id);
         if (contentDataById == null)
         {
             DynamicPage.WriteErrMsg("对不起,错误的参数!");
         }
         if (contentDataById.Rows.Count > 0)
         {
             string    str    = contentDataById.Rows[0]["DownloadUrl"].ToString();
             string    str2   = contentDataById.Rows[0]["arrServerName"].ToString();
             DataTable table2 = new DataTable();
             table2.Columns.Add("urlId", typeof(int));
             table2.Columns.Add("infoId", typeof(int));
             table2.Columns.Add("urlname", typeof(string));
             table2.Columns.Add("serverId", typeof(int));
             if (string.IsNullOrEmpty(str))
             {
                 CommonModelInfo commonModelInfoById = ContentManage.GetCommonModelInfoById(id);
                 DataRow         row = table2.NewRow();
                 row["urlId"]    = 0;
                 row["infoId"]   = id;
                 row["urlname"]  = commonModelInfoById.Title;
                 row["serverId"] = 0;
                 table2.Rows.Add(row);
             }
             else
             {
                 int num = 0;
                 if (string.IsNullOrEmpty(str2))
                 {
                     foreach (string str3 in str.Split(new string[] { "$$$" }, StringSplitOptions.RemoveEmptyEntries))
                     {
                         string[] strArray2 = str3.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries);
                         DataRow  row2      = table2.NewRow();
                         row2["urlId"]    = num;
                         row2["infoId"]   = id;
                         row2["urlname"]  = strArray2[0];
                         row2["serverId"] = 0;
                         table2.Rows.Add(row2);
                         num++;
                     }
                 }
                 else
                 {
                     string[] strArray3 = str.Split(new string[] { "$$$" }, StringSplitOptions.RemoveEmptyEntries);
                     num = 0;
                     string[] strArray10 = strArray3;
                     for (int i = 0; i < strArray10.Length; i++)
                     {
                         string text1 = strArray10[i];
                         foreach (string str4 in str2.Split(new string[] { "$$$" }, StringSplitOptions.RemoveEmptyEntries))
                         {
                             string[] strArray5 = str4.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries);
                             DataRow  row3      = table2.NewRow();
                             row3["urlId"]    = num;
                             row3["infoId"]   = id;
                             row3["urlname"]  = strArray5[0];
                             row3["serverId"] = strArray5[1];
                             table2.Rows.Add(row3);
                         }
                         num++;
                     }
                 }
             }
             this.EgvDownloadError.DataSource = table2;
             this.EgvDownloadError.DataBind();
         }
         else
         {
             DynamicPage.WriteErrMsg("对不起,错误的参数!");
         }
     }
     else
     {
         CommonModelInfo info2 = ContentManage.GetCommonModelInfoById(id);
         if (info2.IsNull)
         {
             DynamicPage.WriteErrMsg("对不起,错误的参数!");
         }
         DataTable table3 = new DataTable();
         table3.Columns.Add("urlId", typeof(int));
         table3.Columns.Add("infoId", typeof(int));
         table3.Columns.Add("urlname", typeof(string));
         table3.Columns.Add("serverId", typeof(int));
         DataRow row4 = table3.NewRow();
         row4["urlId"]    = 0;
         row4["infoId"]   = id;
         row4["urlname"]  = info2.Title;
         row4["serverId"] = 0;
         table3.Rows.Add(row4);
         this.EgvDownloadError.DataSource = table3;
         this.EgvDownloadError.DataBind();
     }
 }
예제 #7
0
 private void InitializePage()
 {
     if (!this.Page.IsPostBack)
     {
         string    str;
         ModelInfo modelInfoById = ModelManager.GetModelInfoById(this.m_ModelId);
         if (this.m_Action == "add")
         {
             if (!EasyOne.Contents.Nodes.CheckNodePermission(this.m_NodeId))
             {
                 AdminPage.WriteErrMsg("此栏目设置了有子节点时不允许向该栏目添加信息!", "ContentManage.aspx");
             }
             str = "添加" + modelInfoById.ItemName;
         }
         else
         {
             str = "修改" + modelInfoById.ItemName;
         }
         if (this.m_NodeId > 0)
         {
             NodeInfo cacheNodeById = EasyOne.Contents.Nodes.GetCacheNodeById(this.m_NodeId);
             this.LblNodeName.Text = "所属节点:<span style='color:red'>" + cacheNodeById.NodeName + "</span>";
             str = (EasyOne.Contents.Nodes.ShowNodeNavigation(this.m_NodeId) + " >> " + str).Replace("根节点 >>", "");
         }
         this.SmpNavigator.CurrentNode = "</a>" + str;
         this.m_TbodyChargeId          = ",\"" + this.TbodyCharge.ClientID + "\"";
         if (!modelInfoById.EnableCharge)
         {
             this.m_TbodyChargeId = "";
         }
         if (!modelInfoById.EnableSignIn)
         {
             this.TabTitle3.Style.Add("display", "none");
         }
         if (!modelInfoById.EnbaleVote)
         {
             this.TabTitle4.Style.Add("display", "none");
         }
         this.InitUserGroupCheckBoxList();
         if (this.m_Action == "add")
         {
             IList <FieldInfo> fieldList = Field.GetFieldList(this.m_ModelId, false);
             this.RepModel.DataSource = fieldList;
             this.RepModel.DataBind();
             NodeInfo info3 = EasyOne.Contents.Nodes.GetCacheNodeById(this.m_NodeId);
             if (!info3.IsNull)
             {
                 this.TxtInfoPoint.Text         = info3.Settings.DefaultItemPoint.ToString();
                 this.ShowChargeType.ChargeType = info3.Settings.DefaultItemChargeType;
                 this.ShowChargeType.PitchTime  = info3.Settings.DefaultItemPitchTime;
                 this.ShowChargeType.ReadTimes  = info3.Settings.DefaultItemReadTimes;
                 this.TxtDividePercent.Text     = info3.Settings.DefaultItemDividePercent.ToString();
             }
         }
         else
         {
             int generalId = BasePage.RequestInt32("GeneralID");
             this.m_ContentDataTable = ContentManage.GetContentDataById(generalId);
             if ((this.m_ContentDataTable == null) || (this.m_ContentDataTable.Rows.Count == 0))
             {
                 AdminPage.WriteErrMsg("<li>指定项目不存在!</li>");
             }
             IList <FieldInfo> list2 = Field.GetFieldList(DataConverter.CLng(this.m_ContentDataTable.Rows[0]["ModelID"].ToString()), false);
             this.RepModel.DataSource = list2;
             this.RepModel.DataBind();
             this.InitSignin(generalId, modelInfoById.EnableSignIn);
             this.InitCharge(generalId, modelInfoById.EnableCharge);
         }
         if (!SiteConfig.SiteOption.EnablePointMoneyExp)
         {
             this.m_TbodyChargeId = "";
         }
     }
 }
        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            = "取消审核";
                }
            }
        }
예제 #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str       = BasePage.RequestString("Action");
            int    generalId = BasePage.RequestInt32("GeneralID");

            this.m_GeneralId = generalId.ToString();
            this.m_NodeId    = BasePage.RequestInt32("NodeID").ToString();
            this.m_ModelId   = BasePage.RequestInt32("ModelID").ToString();
            string str2 = BasePage.RequestString("ContentFieldName");

            if (generalId <= 0)
            {
                AdminPage.WriteErrMsg("<li>参数不全,请返回!</li>");
            }
            CommonModelInfo commonModelInfoById = ContentManage.GetCommonModelInfoById(generalId);

            this.m_NodeId = commonModelInfoById.NodeId.ToString();
            NodeInfo  cacheNodeById   = EasyOne.Contents.Nodes.GetCacheNodeById(commonModelInfoById.NodeId);
            DataTable contentDataById = ContentManage.GetContentDataById(generalId);

            if ((contentDataById == null) || (contentDataById.Rows.Count == 0))
            {
                AdminPage.WriteErrMsg("<li>指定项目不存在!</li>");
            }
            if (cacheNodeById.IsNull || commonModelInfoById.IsNull)
            {
                AdminPage.WriteErrMsg("<li>请检查栏目或项目是否已被删除!</li>");
            }
            string str3 = str;

            if (str3 != null)
            {
                if (!(str3 == "Add"))
                {
                    if (str3 == "Modify")
                    {
                        this.LblType.Text = "修改项目成功";
                    }
                }
                else
                {
                    this.LblType.Text = "添加项目成功";
                }
            }
            this.LblNode.Text  = cacheNodeById.NodeName;
            this.LblTitle.Text = commonModelInfoById.Title;
            this.Author.Style.Add("display", "none");
            this.CopyFrom.Style.Add("display", "none");
            this.Keylord.Style.Add("display", "none");
            StringBuilder builder = new StringBuilder();

            builder.Append("<a href=\"");
            string tableName = commonModelInfoById.TableName;

            if (tableName != null)
            {
                if (!(tableName == "PE_U_Article"))
                {
                    if (tableName == "PE_U_Photo")
                    {
                        builder.Append("PhotoPreview.aspx");
                        goto Label_0383;
                    }
                    if (tableName == "PE_U_Soft")
                    {
                        builder.Append("SoftPreview.aspx");
                        goto Label_0383;
                    }
                }
                else
                {
                    this.Author.Style.Add("display", "");
                    this.CopyFrom.Style.Add("display", "");
                    this.Keylord.Style.Add("display", "");
                    foreach (FieldInfo info3 in ModelManager.GetFieldListByModelId(commonModelInfoById.ModelId))
                    {
                        string fieldName = info3.FieldName;
                        if (fieldName != null)
                        {
                            if (!(fieldName == "Author"))
                            {
                                if (fieldName == "CopyFrom")
                                {
                                    goto Label_02BD;
                                }
                                if (fieldName == "Keyword")
                                {
                                    goto Label_02E6;
                                }
                            }
                            else
                            {
                                this.LblAuthor.Text = contentDataById.Rows[0]["Author"].ToString();
                            }
                        }
                        continue;
Label_02BD:
                        this.LblCopyFrom.Text = contentDataById.Rows[0]["CopyFrom"].ToString();
                        continue;
Label_02E6:
                        if (contentDataById.Rows[0]["Keyword"] != null)
                        {
                            this.LblKeylord.Text = StringHelper.ReplaceChar(contentDataById.Rows[0]["Keyword"].ToString(), '|', ' ');
                        }
                    }
                    builder.Append("ArticlePreview.aspx");
                    goto Label_0383;
                }
            }
            builder.Append("ContentView.aspx");
            Label_0383 :;
            builder.Append("?GeneralID=" + this.m_GeneralId + "&NodeID=" + this.m_NodeId + "&ModelID=" + this.m_ModelId);
            builder.Append("\">查看内容</a>");
            this.ShowContentPreview.Text = builder.ToString();
            switch (commonModelInfoById.Status)
            {
            case -3:
                this.LblStatus.Text = "删除";
                break;

            case -2:
                this.LblStatus.Text = "退稿";
                break;

            case -1:
                this.LblStatus.Text = "草稿";
                break;

            case 0:
                this.LblStatus.Text = "待审核";
                break;

            case 0x63:
                this.LblStatus.Text = "终审通过";
                break;

            default:
                foreach (StatusInfo info4 in Status.GetStatusList())
                {
                    if (info4.StatusId == commonModelInfoById.Status)
                    {
                        this.LblStatus.Text = info4.StatusName;
                    }
                    break;
                }
                break;
            }
            if (!string.IsNullOrEmpty(str2))
            {
                this.SavePemotePic(str2, commonModelInfoById, cacheNodeById, contentDataById);
            }
        }
예제 #10
0
 protected string GetSoftName(int infoId)
 {
     return(ContentManage.GetContentDataById(infoId).Rows[0]["Title"].ToString());
 }
예제 #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ContentChargeInfo info4;
            int generalId = BaseUserControl.RequestInt32("GeneralID");

            this.contentDataTable = ContentManage.GetContentDataById(generalId);
            if ((this.contentDataTable == null) || (this.contentDataTable.Rows.Count == 0))
            {
                BaseUserControl.WriteErrMsg("指定的信息不存在!");
            }
            if (ModelManager.GetModelInfoById(DataConverter.CLng(this.contentDataTable.Rows[0]["ModelID"].ToString())).IsNull)
            {
                BaseUserControl.WriteErrMsg("信息隶属模型不存在!");
            }
            IList <UserGroupsInfo> userGroupList             = UserGroups.GetUserGroupList(0, 0);
            ContentPermissionInfo  contentPermissionInfoById = PermissionContent.GetContentPermissionInfoById(generalId);

            if (!contentPermissionInfoById.IsNull)
            {
                switch (contentPermissionInfoById.PermissionType)
                {
                case 0:
                    this.LitInfoPurview.Text = "继承栏目权限";
                    goto Label_0186;

                case 1:
                    this.LitInfoPurview.Text = "所有会员";
                    goto Label_0186;
                }
                this.LitInfoPurview.Text = "指定会员组:";
                if (!string.IsNullOrEmpty(contentPermissionInfoById.ArrGroupId))
                {
                    string[] strArray = contentPermissionInfoById.ArrGroupId.Split(new char[] { ',' });
                    for (int i = 0; i < strArray.Length; i++)
                    {
                        foreach (UserGroupsInfo info3 in userGroupList)
                        {
                            if (info3.GroupId == DataConverter.CLng(strArray[i]))
                            {
                                this.LitInfoPurview.Text = this.LitInfoPurview.Text + " " + info3.GroupName;
                                break;
                            }
                        }
                    }
                }
            }
Label_0186:
            info4 = EasyOne.Contents.ContentCharge.GetContentChargeInfoById(generalId);
            if (!info4.IsNull)
            {
                this.LblInfoPoint.Text = DataConverter.CLng(info4.InfoPoint).ToString();
                switch (info4.ChargeType)
                {
                case 1:
                    this.LblChargeType.Text = "距离上次收费时间" + DataConverter.CLng(info4.PitchTime).ToString() + "小时后重新收费";
                    break;

                case 2:
                    this.LblChargeType.Text = "会员重复阅读此文章" + DataConverter.CLng(info4.ReadTimes).ToString() + "次后重新收费";
                    break;

                case 3:
                    this.LblChargeType.Text = "上述两者都满足时重新收费";
                    break;

                case 4:
                    this.LblChargeType.Text = "上述两者任一个满足时就重新收费";
                    break;

                case 5:
                    this.LblChargeType.Text = "每阅读一次就重复收费一次(建议不要使用)";
                    break;

                default:
                    this.LblChargeType.Text = "不重复收费";
                    break;
                }
                this.LblDividePercent.Text = DataConverter.CLng(info4.DividePercent).ToString() + "%";
            }
        }
예제 #12
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();
        }