protected void btnRptPointRateExcel_Click(object sender, EventArgs e) { string strStartTime = this.txtStartTime.Value; string strEntTime = this.txtEndTime.Value; StringBuilder strTime = new StringBuilder(); string strSql = this.QueryCondition(); if (strStartTime != "") { this.strwhere.AppendFormat(" and POINTCREATETIME>='{0}'", strStartTime); strTime.AppendFormat(" and PointLOG.POINTCREATETIME>='{0}' ", strStartTime); } if (strEntTime != "") { this.strwhere.AppendFormat(" and POINTCREATETIME<='{0}'", strEntTime); strTime.AppendFormat(" and PointLOG.POINTCREATETIME<='{0}'", strEntTime); } PointRate bllPointRate = new PointRate(); int Counts = this.NetPagerParameter.RecordCount; strSql += "and MEM.MEMID<>0 AND MEM.MEMSHOPID=SYSSHOP.SHOPID"; strSql += " AND MEM.MEMLEVELID=MEMLEVEL.LEVELID"; strSql += " AND MEM.MEMUSERID=SYSUSER.USERID"; if (RptPointRate.MemCardId != null) { strSql += string.Format(" and Mem.MemCard={0}", RptPointRate.MemCardId); } strSql = PubFunction.GetShopAuthority(this._UserShopID, "MemShopID", strSql); DataTable db = bllPointRate.GetListSP(Counts, this.NetPagerParameter.CurrentPageIndex, out Counts, strTime.ToString(), new string[] { strSql }).Tables[0]; DataExcelInfo.PointRateExcel(db, this._UserName, this.strwhere.ToString()); }
private void Get_ParameterList(string strSql) { string strStartTime = this.txtStartTime.Value; string strEntTime = this.txtEndTime.Value + " 23:59:59"; StringBuilder strTime = new StringBuilder(); if (strStartTime != "") { this.strwhere.AppendFormat(" and POINTCREATETIME>='{0}'", strStartTime); strTime.AppendFormat(" and PointLOG.POINTCREATETIME>='{0}' ", strStartTime); } if (strEntTime != "") { this.strwhere.AppendFormat(" and POINTCREATETIME<='{0}'", strEntTime); strTime.AppendFormat(" and PointLOG.POINTCREATETIME<='{0}'", strEntTime); } PointRate bllPointRate = new PointRate(); int Counts = this.NetPagerParameter.RecordCount; strSql += "and MEM.MEMID<>0 AND MEM.MEMSHOPID=SYSSHOP.SHOPID"; strSql += " AND MEM.MEMLEVELID=MEMLEVEL.LEVELID"; strSql += " AND MEM.MEMUSERID=SYSUSER.USERID"; if (RptPointRate.MemCardId != null) { strSql += string.Format(" and Mem.MemCard={0}", RptPointRate.MemCardId); } strSql = PubFunction.GetShopAuthority(this._UserShopID, "MemShopID", strSql); DataTable db = bllPointRate.GetListSP(this.NetPagerParameter.PageSize, this.NetPagerParameter.CurrentPageIndex, out Counts, strTime.ToString(), new string[] { strSql }).Tables[0]; this.NetPagerParameter.RecordCount = Counts; this.NetPagerParameter.CustomInfoHTML = string.Format("<div class=\"results\"><span>当前第{0}/{1}页 共{2}条记录 每页{3}条</span></div>", new object[] { this.NetPagerParameter.CurrentPageIndex, this.NetPagerParameter.PageCount, this.NetPagerParameter.RecordCount, this.NetPagerParameter.PageSize }); this.rptRptPointRate.DataSource = db; this.rptRptPointRate.DataBind(); PageBase.BindSerialRepeater(this.rptRptPointRate, this.NetPagerParameter.PageSize * (this.NetPagerParameter.CurrentPageIndex - 1)); }