protected void Page_Load(object sender, EventArgs e) { if (string.IsNullOrEmpty(base.Title)) { base.Title = "我的待签收内容"; } this.EgvContent.DataSource = ContentManage.GetCommonModelInfoListBySignInStatus(0, this.PageSize, PEContext.Current.Admin.UserName, 2); this.EgvContent.DataBind(); base.Subtitle = "共" + ContentManage.GetTotalOfCommonModelInfo(0, ContentSortType.None, 0).ToString() + "条"; }
private IList <CommonModelInfo> GetCommonList(int startIndex, int pageSize) { IList <CommonModelInfo> commonModelInfoList = new List <CommonModelInfo>(); switch (base.CreateMethod) { case CreateContentType.CreateLatest: commonModelInfoList = ContentManage.GetCommonModelInfoList(this.m_NodeIdArray, pageSize); break; case CreateContentType.CreateByUpdateTime: commonModelInfoList = ContentManage.GetCommonModelInfoList(this.m_NodeIdArray, this.m_ContentBeginTime, this.m_ContentEndTime, startIndex, pageSize); break; case CreateContentType.CreateBetweenId: commonModelInfoList = ContentManage.GetCommonModelInfoList(this.m_NodeIdArray, this.m_ContentMinId, this.m_ContentMaxId, startIndex, pageSize); break; case CreateContentType.CreateByGeneralId: commonModelInfoList = ContentManage.GetCommonModelInfoList(this.m_NodeIdArray, this.m_ContentGeneralIdArray); break; case CreateContentType.CreateByNotCreate: commonModelInfoList = ContentManage.CreateByNotCreate(this.m_NodeIdArray, startIndex, pageSize); break; case CreateContentType.CreateAll: commonModelInfoList = ContentManage.CreateAll(this.m_NodeIdArray, startIndex, pageSize); break; case CreateContentType.CreateAuto: commonModelInfoList = ContentManage.CreateAll(this.m_NodeIdArray, 0, 20); break; } if (base.CreateMethod == CreateContentType.CreateByGeneralId) { this.CreateCount = commonModelInfoList.Count; return(commonModelInfoList); } if (base.CreateMethod == CreateContentType.CreateLatest) { if (this.CreateCount == 0) { this.CreateCount = this.m_LatestNumber; } return(commonModelInfoList); } if (this.CreateCount == 0) { this.CreateCount = ContentManage.GetTotalOfCommonModelInfo(0, ContentSortType.DayHitsAsc, 0x63); } return(commonModelInfoList); }
protected void Page_Load(object sender, EventArgs e) { this.m_Administrator = PEContext.Current.Admin.IsSuperAdmin; if (!this.m_Administrator) { this.m_arrNodeIdManage = RolePermissions.GetRoleNodeId(PEContext.Current.Admin.Roles, EasyOne.Enumerations.OperateCode.NodeContentManage); } if (string.IsNullOrEmpty(base.Title)) { base.Title = "待审核内容"; } this.EgvContent.DataSource = ContentManage.GetCommonModelInfoList(0, this.PageSize, this.NodeId, (ContentSortType)this.ListType, this.Status); this.EgvContent.DataBind(); base.Subtitle = "共" + ContentManage.GetTotalOfCommonModelInfo(this.NodeId, (ContentSortType)this.ListType, this.Status).ToString() + "条"; base.TitleUrl = base.BasePath + SiteConfig.SiteOption.ManageDir + "/Contents/ContentManage.aspx?Status=0"; }
protected void BtnBatch_Click(object sender, EventArgs e) { string str = base.Request.Form[this.ListModelField.UniqueID]; int modelId = DataConverter.CLng(this.DropModel.SelectedValue); string nodeIds = base.Request.Form[this.ListNode.UniqueID]; string oldValue = this.TxtTargetContent.Text.Trim(); string text = this.TxtNewContent.Text; if (string.IsNullOrEmpty(str)) { AdminPage.WriteErrMsg("请选择要替换的字段!", "ContentBatchModfiy.aspx"); } int startIndex = 0; int pageSize = 30; int num4 = ContentManage.GetTotalOfCommonModelInfo(0, ContentSortType.DayHitsAsc, 0); if ((num4 % pageSize) == 0) { int num1 = num4 / pageSize; } else { int num7 = num4 / pageSize; } for (int i = 0; i < num4; i++) { startIndex = pageSize * i; DataSet ds = ContentManage.GetContentList(modelId, nodeIds, startIndex, pageSize); string[] strArray = str.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach (DataRow row in ds.Tables[0].Rows) { foreach (string str5 in strArray) { string str6 = row[str5].ToString().Replace(oldValue, text); row[str5] = str6; } } ContentManage.UpdateDataSet(ds, modelId); } AdminPage.WriteSuccessMsg("替换成功!", "ContentManage.aspx"); }