Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.m_ModelId = BasePage.RequestInt32("ModelID");
     this.m_NodeId  = BasePage.RequestInt32("NodeID");
     this.m_Action  = BasePage.RequestStringToLower("Action");
     if (((this.m_ModelId <= 0) || (this.m_NodeId <= 0)) || string.IsNullOrEmpty(this.m_Action))
     {
         DynamicPage.WriteUserErrMsg("添加信息参数错误!", "NavContent.aspx");
     }
     this.m_User            = Users.GetUsersByUserName(PEContext.Current.User.UserName);
     this.m_UserPurviewInfo = this.m_User.UserPurview;
     if (!base.IsPostBack)
     {
         if (this.m_Action == "add")
         {
             if (!EasyOne.Contents.Nodes.CheckNodePermission(this.m_NodeId))
             {
                 DynamicPage.WriteUserErrMsg("此栏目设置了有子节点时不允许向该栏目添加信息!", "ContentManage.aspx");
             }
             IList <FieldInfo> fieldList = Field.GetFieldList(this.m_ModelId, false);
             this.RepContentForm.DataSource = fieldList;
             this.RepContentForm.DataBind();
         }
         if (this.m_Action == "modify")
         {
             int generalId = BasePage.RequestInt32("GeneralID");
             this.m_ContentData = ContentManage.GetUserContentDataById(generalId);
             if (this.m_ContentData.Rows.Count <= 0)
             {
                 DynamicPage.WriteUserErrMsg("信息不存在", "ContentManage.aspx");
             }
             if (!this.m_UserPurviewInfo.ManageSelfPublicInfo && (DataConverter.CLng(this.m_ContentData.Rows[0]["Status"].ToString()) == 0x63))
             {
                 DynamicPage.WriteUserErrMsg("不能修改审核通过的信息", "ContentManage.aspx");
             }
             IList <FieldInfo> list2 = Field.GetFieldList(DataConverter.CLng(this.m_ContentData.Rows[0]["ModelID"].ToString()), false);
             this.RepContentForm.DataSource = list2;
             this.RepContentForm.DataBind();
         }
     }
 }