private void BindData(bool IsReload) { DataTable dt = dt = new DAL.Views.V_UserDistills().Open("", "IsCps=1 and Result=10 and SiteID = " + _Site.ID.ToString(), "[DateTime] desc"); if (dt == null) { PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_FinanceDistill"); return; } string filterCondition = GetFilterCondition(); DataView dv = new DataView(dt, filterCondition, "[DateTime] desc", DataViewRowState.OriginalRows); PF.DataGridBindData(g, dv, gPager); //根据条件显示或隐藏列 for (int i = 0; i < g.Columns.Count; i++) { if (g.Columns[i].HeaderText == "提款银行卡帐号" || g.Columns[i].HeaderText == "开户银行" || g.Columns[i].HeaderText == "支行名称" || g.Columns[i].HeaderText == "所在省" || g.Columns[i].HeaderText == "所在市" || g.Columns[i].HeaderText == "持卡人姓名") { g.Columns[i].Visible = (hfCurPayType.Value == "所有" || hfCurPayType.Value == "银行卡") ? true : false; } else if (g.Columns[i].HeaderText == "支付宝账号") { g.Columns[i].Visible = true; g.Columns[i].Visible = (hfCurPayType.Value == "所有" || hfCurPayType.Value == "支付宝") ? true : false; } } }
private void BindData() { DataTable dt; string condition = GetFilterCondition(); dt = new DAL.Views.V_UserDistills().Open("", condition, "[DateTime] desc"); if (dt == null) { PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_FinanceDistill"); return; } PF.DataGridBindData(g, dt , gPager); //根据条件显示或隐藏列 for(int i=0;i<g.Columns.Count;i++) { if (g.Columns[i].HeaderText == "提款银行卡帐号" || g.Columns[i].HeaderText == "开户银行" || g.Columns[i].HeaderText == "支行名称" || g.Columns[i].HeaderText == "所在省" || g.Columns[i].HeaderText == "所在市" || g.Columns[i].HeaderText == "持卡人姓名") { g.Columns[i].Visible = (hfCurPayType.Value == "所有" || hfCurPayType.Value == "银行卡") ? true : false; } else if (g.Columns[i].HeaderText == "支付宝账号") { g.Columns[i].Visible = true; g.Columns[i].Visible = (hfCurPayType.Value == "所有" || hfCurPayType.Value == "支付宝") ? true : false; } } }
private void BindData() { DataTable dt; string condition = GetFilterCondition(); dt = new DAL.Views.V_UserDistills().Open("", condition, "[DateTime] desc"); if (dt == null) { PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_FinanceDistill"); return; } PF.DataGridBindData(g, dt, gPager); //根据条件显示或隐藏列 for (int i = 0; i < g.Columns.Count; i++) { if (g.Columns[i].HeaderText == "提款银行卡帐号" || g.Columns[i].HeaderText == "开户银行" || g.Columns[i].HeaderText == "支行名称" || g.Columns[i].HeaderText == "所在省" || g.Columns[i].HeaderText == "所在市" || g.Columns[i].HeaderText == "持卡人姓名") { g.Columns[i].Visible = (hfCurPayType.Value == "所有" || hfCurPayType.Value == "银行卡") ? true : false; } else if (g.Columns[i].HeaderText == "支付宝账号") { g.Columns[i].Visible = true; g.Columns[i].Visible = (hfCurPayType.Value == "所有" || hfCurPayType.Value == "支付宝") ? true : false; } } }
private void BindData() { if (ddlYear.Items.Count == 0) { return; } long UserID = Shove._Convert.StrToLong(tbID.Text, -1); DataTable dt; if (tbID.Text == "-1") { dt = new DAL.Views.V_UserDistills().Open("", "SiteID = " + _Site.ID.ToString() + " and year([DateTime]) = " + Shove._Web.Utility.FilteSqlInfusion(ddlYear.SelectedValue) + " and month([DateTime]) = " + Shove._Web.Utility.FilteSqlInfusion(ddlMonth.SelectedValue), "[DateTime] desc"); } else { dt = new DAL.Views.V_UserDistills().Open("", "SiteID = " + _Site.ID.ToString() + " and UserID = " + UserID.ToString() + " and year([DateTime]) = " + Shove._Web.Utility.FilteSqlInfusion(ddlYear.SelectedValue) + " and month([DateTime]) = " + Shove._Web.Utility.FilteSqlInfusion(ddlMonth.SelectedValue), "[DateTime] desc"); } if (dt == null) { PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_FinanceDistill"); return; } PF.DataGridBindData(g, dt, gPager); }
private void BindDistills() { if (_User == null) { return; } string CacheKeyName = "Home_Room_DistillDetail_" + _User.ID.ToString(); DataTable dt = Shove._Web.Cache.GetCacheAsDataTable(CacheKeyName); if (dt == null) { dt = new DAL.Views.V_UserDistills().Open("ID,[DateTime],[Money],FormalitiesFees,Result,Memo", "[UserID] = " + _User.ID.ToString() + "", "[DateTime] desc, [ID]"); if (dt == null) { PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试(732)", this.GetType().FullName); return; } Shove._Web.Cache.SetCache(CacheKeyName, dt, 60); } gUserDistills.DataSource = dt; gUserDistills.DataBind(); this.lblDistillCount.Text = dt.Rows.Count.ToString(); this.lblDistillMoney.Text = PF.GetSumByColumn(dt, 2, false, gUserDistills.PageSize, 0).ToString("N"); }
private void BindData(bool IsReload) { lblTotalDistillMoney.Text = "0"; lblTotalFormalitiesFees.Text = "0"; lblTotalPayMoney.Text = "0"; DateTime fromDate = DateTime.Now; DateTime toDate = DateTime.Now; if (!DateTime.TryParse(tbBeginTime.Text, out fromDate) || !DateTime.TryParse(tbEndTime.Text, out toDate)) { Shove._Web.JavaScript.Alert(this.Page, "请输入正确的日期范围!"); return; } DataTable dt; string cacheKey = "Admin_UserDistillSuccess_Data_" + tbBeginTime.Text + "_" + tbEndTime.Text; string condition = GetFilterCondition(); dt = new DAL.Views.V_UserDistills().Open("", condition, "[DateTime] desc"); if (dt == null) { PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_FinanceDistill"); return; } //统计 合计值 double totalDistillMoney = 0; double totalFormalitiesFees = 0; for (int row = 0; row < dt.Rows.Count; row++) { totalDistillMoney += Shove._Convert.StrToDouble(dt.Rows[row]["Money"].ToString(), 0); totalFormalitiesFees += Shove._Convert.StrToDouble(dt.Rows[row]["FormalitiesFees"].ToString(), 0); } lblTotalDistillMoney.Text = totalDistillMoney.ToString(); lblTotalFormalitiesFees.Text = totalFormalitiesFees.ToString(); lblTotalPayMoney.Text = (totalDistillMoney - totalFormalitiesFees).ToString(); PF.DataGridBindData(g, dt, gPager); //根据条件显示或隐藏列 for (int i = 0; i < g.Columns.Count; i++) { if (g.Columns[i].HeaderText == "提款银行卡帐号" || g.Columns[i].HeaderText == "开户银行" || g.Columns[i].HeaderText == "支行名称" || g.Columns[i].HeaderText == "所在省" || g.Columns[i].HeaderText == "所在市" || g.Columns[i].HeaderText == "持卡人姓名") { g.Columns[i].Visible = (hfCurPayType.Value == "所有" || hfCurPayType.Value == "银行卡") ? true : false; } else if (g.Columns[i].HeaderText == "支付宝账号") { g.Columns[i].Visible = true; g.Columns[i].Visible = (hfCurPayType.Value == "所有" || hfCurPayType.Value == "支付宝") ? true : false; } } }
private void BindDistills() { if (_User == null) { return; } string CacheKeyName = "Room_UserDistills_" + _User.ID.ToString(); DataTable dt = Shove._Web.Cache.GetCacheAsDataTable(CacheKeyName); if (dt == null) { dt = new DAL.Views.V_UserDistills().Open("ID,[DateTime],[Money],FormalitiesFees,Result,Memo", "[UserID] = " + _User.ID.ToString() + "", "[DateTime] desc, [ID]"); if (dt == null) { PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试(732)", this.GetType().FullName); return; } Shove._Web.Cache.SetCache(CacheKeyName, dt, 60); } gUserDistills.DataSource = dt; gUserDistills.DataBind(); this.lblDistillCount.Text = dt.Rows.Count.ToString(); this.lblDistillMoney.Text = PF.GetSumByColumn(dt, 2, false, gUserDistills.PageSize, 0).ToString("N"); }
private void BindData(bool IsReload) { lblTotalDistillMoney.Text = "0"; lblTotalFormalitiesFees.Text = "0"; lblTotalPayMoney.Text = "0"; DateTime fromDate = DateTime.Now; DateTime toDate = DateTime.Now; if (!DateTime.TryParse(tbBeginTime.Text, out fromDate) || !DateTime.TryParse(tbEndTime.Text, out toDate)) { Shove._Web.JavaScript.Alert(this.Page, "请输入正确的日期范围!"); return; } DataTable dt; string cacheKey = "Admin_UserDistillSuccess_Data_" + tbBeginTime.Text + "_" + tbEndTime.Text; string condition = GetFilterCondition(); dt = new DAL.Views.V_UserDistills().Open("", condition, "[DateTime] desc"); if (dt == null) { PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_FinanceDistill"); return; } //统计 合计值 double totalDistillMoney = 0; double totalFormalitiesFees = 0; for (int row = 0; row < dt.Rows.Count; row++) { totalDistillMoney += Shove._Convert.StrToDouble(dt.Rows[row]["Money"].ToString(), 0); totalFormalitiesFees += Shove._Convert.StrToDouble(dt.Rows[row]["FormalitiesFees"].ToString(), 0); } lblTotalDistillMoney.Text = totalDistillMoney.ToString(); lblTotalFormalitiesFees.Text = totalFormalitiesFees.ToString(); lblTotalPayMoney.Text = (totalDistillMoney - totalFormalitiesFees).ToString(); PF.DataGridBindData(g, dt, gPager); //根据条件显示或隐藏列 for(int i=0;i<g.Columns.Count;i++) { if (g.Columns[i].HeaderText == "提款银行卡帐号" || g.Columns[i].HeaderText == "开户银行" || g.Columns[i].HeaderText == "支行名称" || g.Columns[i].HeaderText == "所在省" || g.Columns[i].HeaderText == "所在市" || g.Columns[i].HeaderText == "持卡人姓名") { g.Columns[i].Visible = (hfCurPayType.Value == "所有" || hfCurPayType.Value == "银行卡") ? true : false; } else if (g.Columns[i].HeaderText == "支付宝账号") { g.Columns[i].Visible = true; g.Columns[i].Visible = (hfCurPayType.Value == "所有" || hfCurPayType.Value == "支付宝") ? true : false; } } }
private void BindData() { DataTable dt = new DAL.Views.V_UserDistills().Open("", "IsCps = 1 and Result = " + HandleResult.Trying.ToString(), "[DateTime]"); if (dt == null) { PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName); return; } g.DataSource = dt; g.DataBind(); labTip.Visible = (dt.Rows.Count == 0); }
/// <summary> /// /// </summary> /// <returns>返回 true 表示是第一次提款 返回false 表示不是第一次提款</returns> private bool IsFirstDistill() { if (_User == null) { return(false); } string CacheKeyName = "Room_UserDistills_" + _User.ID.ToString(); DataTable dt = new DAL.Views.V_UserDistills().Open("ID,[DateTime],[Money],FormalitiesFees,Result,Memo", "[UserID] = " + _User.ID.ToString() + "", "[DateTime] desc, [ID]"); if (dt != null && dt.Rows.Count > 0) { return(false); } else { return(true); } }
private void BindDistills() { if (base._User != null) { string key = "Home_Room_DistillDetail_" + base._User.ID.ToString(); DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key); if (cacheAsDataTable == null) { cacheAsDataTable = new Views.V_UserDistills().Open("ID,[DateTime],[Money],FormalitiesFees,Result,Memo", "[UserID] = " + base._User.ID.ToString(), "[DateTime] desc, [ID]"); if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试(732)", base.GetType().FullName); return; } Shove._Web.Cache.SetCache(key, cacheAsDataTable, 60); } this.gUserDistills.DataSource = cacheAsDataTable; this.gUserDistills.DataBind(); this.lblDistillCount.Text = cacheAsDataTable.Rows.Count.ToString(); this.lblDistillMoney.Text = PF.GetSumByColumn(cacheAsDataTable, 2, false, this.gUserDistills.PageSize, 0).ToString("N"); } }
private bool IsFirstDistill() { if (base._User == null) { return false; } string text1 = "Room_UserDistills_" + base._User.ID.ToString(); DataTable table = new Views.V_UserDistills().Open("ID,[DateTime],[Money],FormalitiesFees,Result,Memo", "[UserID] = " + base._User.ID.ToString(), "[DateTime] desc, [ID]"); if ((table != null) && (table.Rows.Count > 0)) { return false; } return true; }
private void BindData(bool IsReload) { string key = "Admin_UserDistillWaitPay_" + this.tbBeginTime.Text + "_" + this.tbEndTime.Text; DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key); if ((cacheAsDataTable == null) || IsReload) { cacheAsDataTable = new Views.V_UserDistills().Open("", "Result=10 and SiteID = " + base._Site.ID.ToString(), "[DateTime] desc"); Shove._Web.Cache.SetCache(key, cacheAsDataTable); } if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", "Admin_FinanceDistill"); } else { string filterCondition = this.GetFilterCondition(); DataView dv = new DataView(cacheAsDataTable, filterCondition, "[DateTime] desc", DataViewRowState.OriginalRows); PF.DataGridBindData(this.g, dv, this.gPager); for (int i = 0; i < this.g.Columns.Count; i++) { if ((((this.g.Columns[i].HeaderText == "提款银行卡帐号") || (this.g.Columns[i].HeaderText == "开户银行")) || ((this.g.Columns[i].HeaderText == "支行名称") || (this.g.Columns[i].HeaderText == "所在省"))) || ((this.g.Columns[i].HeaderText == "所在市") || (this.g.Columns[i].HeaderText == "持卡人姓名"))) { this.g.Columns[i].Visible = (this.hfCurPayType.Value == "所有") || (this.hfCurPayType.Value == "银行卡"); } else if (this.g.Columns[i].HeaderText == "支付宝账号") { this.g.Columns[i].Visible = true; this.g.Columns[i].Visible = (this.hfCurPayType.Value == "所有") || (this.hfCurPayType.Value == "支付宝"); } } } }
private void BindData() { if (this.ddlYear.Items.Count != 0) { DataTable table; long num = _Convert.StrToLong(this.tbID.Text, -1L); if (this.tbID.Text == "-1") { table = new Views.V_UserDistills().Open("", "SiteID = " + base._Site.ID.ToString() + " and year([DateTime]) = " + Utility.FilteSqlInfusion(this.ddlYear.SelectedValue) + " and month([DateTime]) = " + Utility.FilteSqlInfusion(this.ddlMonth.SelectedValue), "[DateTime] desc"); } else { table = new Views.V_UserDistills().Open("", "SiteID = " + base._Site.ID.ToString() + " and UserID = " + num.ToString() + " and year([DateTime]) = " + Utility.FilteSqlInfusion(this.ddlYear.SelectedValue) + " and month([DateTime]) = " + Utility.FilteSqlInfusion(this.ddlMonth.SelectedValue), "[DateTime] desc"); } if (table == null) { PF.GoError(4, "数据库繁忙,请重试", "Admin_FinanceDistill"); } else { PF.DataGridBindData(this.g, table, this.gPager); } } }
/// <summary> /// /// </summary> /// <returns>返回 true 表示是第一次提款 返回false 表示不是第一次提款</returns> private bool IsFirstDistill() { if (_User == null) { return false; } string CacheKeyName = "Room_UserDistills_" + _User.ID.ToString(); DataTable dt = new DAL.Views.V_UserDistills().Open("ID,[DateTime],[Money],FormalitiesFees,Result,Memo", "[UserID] = " + _User.ID.ToString() + "", "[DateTime] desc, [ID]"); if (dt != null && dt.Rows.Count > 0) { return false; } else { return true; } }
private void BindData(bool IsReload) { this.lblTotalDistillMoney.Text = "0"; this.lblTotalFormalitiesFees.Text = "0"; this.lblTotalPayMoney.Text = "0"; DateTime now = DateTime.Now; DateTime result = DateTime.Now; if (!DateTime.TryParse(this.tbBeginTime.Text, out now) || !DateTime.TryParse(this.tbEndTime.Text, out result)) { JavaScript.Alert(this.Page, "请输入正确的日期范围!"); } else { string text1 = "Admin_UserDistillSuccess_Data_" + this.tbBeginTime.Text + "_" + this.tbEndTime.Text; string filterCondition = this.GetFilterCondition(); DataTable dt = new Views.V_UserDistills().Open("", filterCondition, "[DateTime] desc"); if (dt == null) { PF.GoError(4, "数据库繁忙,请重试", "Admin_FinanceDistill"); } else { double num = 0.0; double num2 = 0.0; for (int i = 0; i < dt.Rows.Count; i++) { num += _Convert.StrToDouble(dt.Rows[i]["Money"].ToString(), 0.0); num2 += _Convert.StrToDouble(dt.Rows[i]["FormalitiesFees"].ToString(), 0.0); } this.lblTotalDistillMoney.Text = num.ToString(); this.lblTotalFormalitiesFees.Text = num2.ToString(); this.lblTotalPayMoney.Text = (num - num2).ToString(); PF.DataGridBindData(this.g, dt, this.gPager); for (int j = 0; j < this.g.Columns.Count; j++) { if ((((this.g.Columns[j].HeaderText == "提款银行卡帐号") || (this.g.Columns[j].HeaderText == "开户银行")) || ((this.g.Columns[j].HeaderText == "支行名称") || (this.g.Columns[j].HeaderText == "所在省"))) || ((this.g.Columns[j].HeaderText == "所在市") || (this.g.Columns[j].HeaderText == "持卡人姓名"))) { this.g.Columns[j].Visible = (this.hfCurPayType.Value == "所有") || (this.hfCurPayType.Value == "银行卡"); } else if (this.g.Columns[j].HeaderText == "支付宝账号") { this.g.Columns[j].Visible = true; this.g.Columns[j].Visible = (this.hfCurPayType.Value == "所有") || (this.hfCurPayType.Value == "支付宝"); } } } } }
private void BindData() { string filterCondition = this.GetFilterCondition(); DataTable dt = new Views.V_UserDistills().Open("", filterCondition, "[DateTime] desc"); if (dt == null) { PF.GoError(4, "数据库繁忙,请重试", "Admin_FinanceDistill"); } else { PF.DataGridBindData(this.g, dt, this.gPager); for (int i = 0; i < this.g.Columns.Count; i++) { if ((((this.g.Columns[i].HeaderText == "提款银行卡帐号") || (this.g.Columns[i].HeaderText == "开户银行")) || ((this.g.Columns[i].HeaderText == "支行名称") || (this.g.Columns[i].HeaderText == "所在省"))) || ((this.g.Columns[i].HeaderText == "所在市") || (this.g.Columns[i].HeaderText == "持卡人姓名"))) { this.g.Columns[i].Visible = (this.hfCurPayType.Value == "所有") || (this.hfCurPayType.Value == "银行卡"); } else if (this.g.Columns[i].HeaderText == "支付宝账号") { this.g.Columns[i].Visible = true; this.g.Columns[i].Visible = (this.hfCurPayType.Value == "所有") || (this.hfCurPayType.Value == "支付宝"); } } } }