protected void BtnSubmit_Click(object sender, EventArgs e) { if (this.Page.IsValid) { DateTime endDate = DataConverter.CDate(this.DpkEndDate.Text); DateTime beginDate = DataConverter.CDate(this.DpkStartDate.Text); DataTable dataTable = ContentManage.GetCountByEditorAndMonth(DataConverter.CLng(this.DrpCategory.SelectedValue), this.DrpInputer.SelectedValue, beginDate, endDate); StringBuilder sb = new StringBuilder("<table class=\"border\" id=\"statistics\" width=\"100%\" cellspacing=\"1\" cellpadding=\"2\" border=\"0\">"); int dateIntervalMonth = this.GetDateIntervalMonth(beginDate, endDate); IList <AdministratorInfo> adminList = new List <AdministratorInfo>(); if (string.IsNullOrEmpty(this.DrpInputer.SelectedValue)) { adminList = Administrators.AdminList(0, 0); } else { AdministratorInfo item = new AdministratorInfo(); item.AdminName = this.DrpInputer.SelectedValue; adminList.Add(item); } this.BuildTableHead(sb, dateIntervalMonth, beginDate); this.BuildTableBody(sb, dateIntervalMonth, beginDate, dataTable, adminList); this.BuildTableFooter(sb, dateIntervalMonth); sb.Append("</table>"); this.SpanCount.InnerHtml = sb.ToString(); } }
protected void BtnSubmit_Click(object sender, EventArgs e) { if (this.Page.IsValid) { int nodeId = DataConverter.CLng(this.DrpCategory.SelectedValue); IList <NodeInfo> nodeList = new List <NodeInfo>(); if (nodeId > 0) { NodeInfo item = new NodeInfo(); item.NodeId = nodeId; item.NodeName = EasyOne.Contents.Nodes.GetCacheNodeById(nodeId).NodeName; nodeList.Add(item); } else { nodeList = EasyOne.Contents.Nodes.GetNodesList(NodeType.Container); } DataTable dataTable = ContentManage.GetCountByNodeAndEditor(nodeId, "", DataConverter.CDate(this.DpkStartDate.Text.Trim()), DataConverter.CDate(this.DpkEndDate.Text.Trim())); IList <AdministratorInfo> adminList = Administrators.AdminList(0, 0); StringBuilder sb = new StringBuilder("<table class=\"border\" id=\"statistics\" cellspacing=\"1\" width=\"100%\" cellpadding=\"2\" border=\"0\">"); this.BuildTableHead(sb, adminList); this.BuildTableBody(sb, dataTable, nodeList, adminList); this.BuildTableFooter(sb, adminList.Count); sb.Append("</table>"); this.SpanCount.InnerHtml = sb.ToString(); } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { this.DrpCategory.DataSource = EasyOne.Contents.Nodes.GetNodeNameForContainerItems(); this.DrpCategory.DataTextField = "NodeName"; this.DrpCategory.DataValueField = "NodeId"; this.DrpCategory.DataBind(); this.DrpCategory.Items.Insert(0, new ListItem("所有栏目", "0")); this.DrpInputer.DataSource = Administrators.AdminList(0, 0); this.DrpInputer.DataTextField = "AdminName"; this.DrpInputer.DataValueField = "AdminName"; this.DrpInputer.DataBind(); this.DrpInputer.Items.Insert(0, new ListItem("所有审核者", "")); this.DpkStartDate.Text = DateTime.Now.ToString("yyyy") + "-01-01"; this.DpkEndDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); } }
private void ShowComplain() { int generalId = BasePage.RequestInt32("MessageID"); if (generalId > 0) { ProductInfo productInfo = new Product(generalId).GetProductInfo(); if (!productInfo.IsNull) { this.TxtTitle.Text = "举报商品 [" + productInfo.ProductName + "] 报价过高"; this.EditorContent.Value = "商品名称:" + productInfo.ProductName + "<br />"; this.EditorContent.Value = this.EditorContent.Value + "商品编号:" + productInfo.ProductNum + "<br />"; string str = this.EditorContent.Value; this.EditorContent.Value = str + "商品页面:<a href='" + base.Request.UrlReferrer.ToString() + "' target='_blank'>" + base.Request.UrlReferrer.ToString() + "</a>"; IList <AdministratorInfo> list = Administrators.AdminList(0, 0, 0, 0); this.TxtInceptUser.Text = list[list.Count - 1].AdminName; } } }