Esempio n. 1
0
 private void RptBind(string strWhere, string orderby)
 {
     if (!int.TryParse(Request.Params["page"] as string, out this.page))
     {
         this.page = 0;
     }
     Spread.BLL.Report bll = new Spread.BLL.Report();
     this.rptList.DataSource = bll.GetList(strWhere);
     this.rptList.DataBind();
 }
Esempio n. 2
0
        private void RptBind(string strWhere, string orderby)
        {
            if (!int.TryParse(Request.Params["page"] as string, out this.page))
            {
                this.page = 0;
            }
            Spread.BLL.Report bll = new Spread.BLL.Report();            
            if (this.userid > 0)
            {
                //this.ddlClassId.SelectedValue = this.UserType.ToString();
                //this.ddlClassId.Enabled = false;
            }
            //this.txtKeywords.Text = this.keywords;
            //this.ddlProperty.SelectedValue = this.property;

            this.rptList.DataSource = bll.GetSumList(strWhere);
            this.rptList.DataBind();
        }
Esempio n. 3
0
 protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     HiddenField txtId = (HiddenField)e.Item.FindControl("txtId");
     HiddenField txtbak1 = (HiddenField)e.Item.FindControl("txtbak1");
     HiddenField txtVerifycode = (HiddenField)e.Item.FindControl("txtVerifycode");
      switch (e.CommandName.ToLower())
     {
         //case "btnexport1":
         //    string myScript = @"copyToClipboard('" + txtbak1.Value + "');";
         //        Page.ClientScript.RegisterStartupScript(this.GetType(), "MyScript", myScript, true);
         //    break;
         case "btnexport2":
             Spread.BLL.Report bll = new Spread.BLL.Report();
             string sql = " e.ChanelID='" + hdcid.Value + "' and e.ID='" + txtId.Value + "'";
             DataTable dt = extbll.GetList(sql).Tables[0];
             ExportDetailToExcel(dt, "游戏包下载");
             break;
         case "btnexport3":
             string redirectUrl = "~/user/downloadapk.aspx?id=" + txtId.Value + "&vc=" + txtVerifycode.Value;
             Response.Redirect(redirectUrl);
             break;
     }
 }
Esempio n. 4
0
 protected void export_Click(object sender, EventArgs e)
 {
     Spread.BLL.Report bll = new Spread.BLL.Report();
     StringBuilder strWhere = new StringBuilder();
     if (!string.IsNullOrEmpty(this.startdate.Value))
         strWhere.Append(" and CONVERT(Datetime,SumDate) >='" + this.startdate.Value + "'");
     if (!string.IsNullOrEmpty(this.enddate.Value))
         strWhere.Append(" and CONVERT(Datetime,SumDate) <='" + this.enddate.Value + "'");
   
     DataTable dt = bll.GetSumList(strWhere.ToString()).Tables[0];
     //ExportDataTableToExcel(dt, "详细报表");
     ExportDetailToExcel(dt, "详细报表");
 }
Esempio n. 5
0
 protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.CommandName.Trim()!="")
     {
         Spread.BLL.Report bll = new Spread.BLL.Report();
         StringBuilder strWhere = new StringBuilder();
         strWhere.Append(" UserID='" + this.hduserid.Value + "' ");
         if (e.CommandName.Trim() != "总计")
         {
             strWhere.Append("AND SumDate='" + e.CommandName.Trim() + "'");
         }
        
         if (this.ddlChanel.SelectedValue != "0")
             strWhere.Append(" and Bak2='" + this.ddlChanel.SelectedItem.Text + "'");
         if (this.gameinput.Value != "")
             strWhere.Append(" and GameName like '%" + this.gameinput.Value + "%' ");
         if (this.ddlMenu.SelectedValue != "0")
             strWhere.Append(" and Bak1='" + this.ddlMenu.SelectedValue + "' ");
         DataTable dt = bll.GetList(strWhere.ToString()).Tables[0];
         ExportDetailToExcel2(dt, "详细报表");
     }
 }
Esempio n. 6
0
 protected void export_Click(object sender, EventArgs e)
 {
     Spread.BLL.Report bll = new Spread.BLL.Report();
     StringBuilder strWhere = new StringBuilder();
     strWhere.Append("   and UserID='" + hduserid.Value + "' ");
     if (this.txtDate1.Value != "")
         strWhere.Append(" and CONVERT(DATETIME,SumDate) >='" + this.txtDate1.Value + "'");
     if (this.txtDate2.Value != "")
         strWhere.Append(" and CONVERT(DATETIME,SumDate) <='" + this.txtDate2.Value + "'");
     if (this.ddlChanel.SelectedValue != "0")
         strWhere.Append(" and Bak2='" + this.ddlChanel.SelectedItem.Text + "'");
     if (this.gameinput.Value != "")
         strWhere.Append(" and GameName like '%" + this.gameinput.Value + "%' ");
     if (this.ddlMenu.SelectedValue != "0")
         strWhere.Append(" and Bak1='" + this.ddlMenu.SelectedValue + "' ");
     DataTable dt = bll.GetSumList(strWhere.ToString()).Tables[0];
     //ExportDataTableToExcel(dt, "详细报表");
     ExportDetailToExcel(dt, "详细报表");
 }
Esempio n. 7
0
 private void RptBind()
 {
     Spread.BLL.Report bll = new Spread.BLL.Report();
     StringBuilder strWhere = new StringBuilder();
     strWhere.Append("   and UserID='" + hduserid.Value + "' ");
     if (this.txtDate1.Value != "")
         strWhere.Append(" and CONVERT(DATETIME,SumDate) >='" + this.txtDate1.Value + "'");
     if (this.txtDate2.Value != "")
         strWhere.Append(" and CONVERT(DATETIME,SumDate) <='" + this.txtDate2.Value + "'");
     if (this.ddlChanel.SelectedValue != "0")
         strWhere.Append(" and Bak2='" + this.ddlChanel.SelectedItem.Text + "'");
     if (this.gameinput.Value != "")
         strWhere.Append(" and GameName like '%" + this.gameinput.Value + "%' ");
     if (this.ddlMenu.SelectedValue != "0")
         strWhere.Append(" and Bak1='" + this.ddlMenu.SelectedValue + "' ");
     DataTable dt = bll.GetSumList(strWhere.ToString()).Tables[0];
     lbCount.Text = dt.Rows.Count.ToString();
     this.rptList.DataSource = dt;
     this.rptList.DataBind();
 }