private void BindData() { DataTable dt = Shove._Web.Cache.GetCacheAsDataTable(_Site.ID.ToString() + "MemberChase" + _User.ID.ToString()); string Condition = "[UserID] = " + _User.ID.ToString() + " and SiteID = " + _Site.ID; if (isDateValid()) { Condition += " and Convert(datetime,[DateTime]) between '" + txtStartDate.Text + " 0:0:0' and '" + txtEndDate.Text + " 23:59:59'"; } if (dt == null) { dt = new DAL.Views.V_ChaseTasksTotal().Open("", Condition, "[DateTime] desc"); if (dt == null) { PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Room_ViewChase"); return; } Shove._Web.Cache.SetCache(_Site.ID.ToString() + "MemberChase" + _User.ID.ToString(), dt); } PF.DataGridBindData(g1, dt, gPager1); gPager1.Visible = true; this.lblPageBuyMoney.Text = PF.GetSumByColumn(dt, 12, true, gPager1.PageSize, gPager1.PageIndex).ToString("N"); this.lblTotalBuyMoney.Text = PF.GetSumByColumn(dt, 12, false, gPager1.PageSize, gPager1.PageIndex).ToString("N"); }
private void BindData(int ChaseID) { DataTable dt = new DAL.Views.V_ChaseTasksTotal().Open("", "ID = " + ChaseID.ToString(), ""); if ((dt == null) || (dt.Rows.Count < 1)) { PF.GoError(ErrorNumber.DataReadWrite, "没有追号!", "Admin_ChaseDetail"); return; } DataRow dr = dt.Rows[0]; labChase_id.Text = ChaseID.ToString(); labTitle.Text = dr["Title"].ToString().Trim(); Label1.Text = dr["LotteryName"].ToString(); tbInitiateUserID.Value = dr["UserID"].ToString(); Label3.Text = dr["Description"].ToString(); double IsuseMoney, SumMoney, BuyedMoney, QuashedMoney; ; int SumIsuseNum, BuyedIsuseNum, QuashedIsuseNum; SumMoney = Shove._Convert.StrToDouble(dr["SumMoney"].ToString(), 0); SumIsuseNum = Shove._Convert.StrToInt(dr["SumIsuseNum"].ToString(), 0); BuyedIsuseNum = Shove._Convert.StrToInt(dr["BuyedIsuseNum"].ToString(), 0); QuashedIsuseNum = Shove._Convert.StrToInt(dr["QuashedIsuseNum"].ToString(), 0); BuyedMoney = Shove._Convert.StrToDouble(dr["BuyedMoney"].ToString(), 0); QuashedMoney = Shove._Convert.StrToDouble(dr["QuashedMoney"].ToString(), 0); try { IsuseMoney = SumMoney / SumIsuseNum; } catch { PF.GoError(ErrorNumber.DataReadWrite, "投注记录有错误", "Admin_ChaseDetail"); return; } Label4.Text = "</font>; 共<font color=\'red\'>" + SumIsuseNum.ToString() + "</font>期<font color=\'red\'>" + SumMoney.ToString("N") + "</font>元; 已完成<font color=\'red\'>" + BuyedIsuseNum.ToString() + "</font>期<font color=\'red\'>" + (BuyedMoney).ToString("N") + "</font>元; 已取消<font color=\'red\'>" + QuashedIsuseNum.ToString() + "</font>期<font color=\'red\'>" + (QuashedMoney).ToString("N") + "</font>元。"; btnQuash.Enabled = (SumIsuseNum > (BuyedIsuseNum + QuashedIsuseNum)); //填充每期列表 dt = new DAL.Views.V_ChaseTaskDetails().Open("", "ChaseTaskID = " + ChaseID.ToString(), "[DateTime]"); if (dt == null) { PF.GoError(ErrorNumber.DataReadWrite, "没有追号记录", "Room_ChaseDetail"); return; } LbPlayTypeName.Text = dt.Rows[0]["PlayTypeName"].ToString(); //买法类型 PF.DataGridBindData(g, dt); }
private void BindData(int ChaseID) { DataTable dt = new DAL.Views.V_ChaseTasksTotal().Open("", "ID = " + ChaseID.ToString() + " and UserID=" + _User.ID.ToString(), ""); if ((dt == null) || (dt.Rows.Count < 1)) { PF.GoError(ErrorNumber.DataReadWrite, "您还没有追号!", this.GetType().FullName); return; } DataRow dr = dt.Rows[0]; labChase_id.Text = ChaseID.ToString(); Label1.Text = dr["LotteryName"].ToString(); Label3.Text = dr["Description"].ToString(); double IsuseMoney, SumMoney, BuyedMoney, QuashedMoney;; int SumIsuseNum, BuyedIsuseNum, QuashedIsuseNum; SumMoney = Shove._Convert.StrToDouble(dr["SumMoney"].ToString(), 0); SumIsuseNum = Shove._Convert.StrToInt(dr["SumIsuseNum"].ToString(), 0); BuyedIsuseNum = Shove._Convert.StrToInt(dr["BuyedIsuseNum"].ToString(), 0); QuashedIsuseNum = Shove._Convert.StrToInt(dr["QuashedIsuseNum"].ToString(), 0); BuyedMoney = Shove._Convert.StrToDouble(dr["BuyedMoney"].ToString(), 0); QuashedMoney = Shove._Convert.StrToDouble(dr["QuashedMoney"].ToString(), 0); try { IsuseMoney = SumMoney / SumIsuseNum; } catch { PF.GoError(ErrorNumber.DataReadWrite, "投注记录有错误", this.GetType().FullName); return; } Label4.Text = "</font>共<font color=\'red\'>" + SumIsuseNum.ToString() + "</font>期<font color=\'red\'>" + SumMoney.ToString("N") + "</font>元; 已完成<font color=\'red\'>" + BuyedIsuseNum.ToString() + "</font>期<font color=\'red\'>" + (BuyedMoney).ToString("N") + "</font>元; 已取消<font color=\'red\'>" + QuashedIsuseNum.ToString() + "</font>期<font color=\'red\'>" + (QuashedMoney).ToString("N") + "</font>元。"; btnQuash.Enabled = (SumIsuseNum > (BuyedIsuseNum + QuashedIsuseNum)); //填充每期列表 dt = new DAL.Views.V_ChaseTaskDetails().Open("", "ChaseTaskID = " + ChaseID.ToString(), "[DateTime]"); if ((dt == null) || dt.Rows.Count < 1) { PF.GoError(ErrorNumber.DataReadWrite, "没有追号记录", this.GetType().FullName); return; } LbPlayTypeName.Text = dt.Rows[0]["PlayTypeName"].ToString(); //买法类型 PF.DataGridBindData(g, dt); }
private void BindData(int ChaseID) { DataTable dt = new Views.V_ChaseTasksTotal().Open("", "ID = " + ChaseID.ToString(), ""); if ((dt == null) || (dt.Rows.Count < 1)) { PF.GoError(4, "没有追号!", "Admin_ChaseDetail"); } else { DataRow row = dt.Rows[0]; this.labChase_id.Text = ChaseID.ToString(); this.labTitle.Text = row["Title"].ToString().Trim(); this.Label1.Text = row["LotteryName"].ToString(); this.tbInitiateUserID.Value = row["UserID"].ToString(); this.Label3.Text = row["Description"].ToString(); double num = _Convert.StrToDouble(row["SumMoney"].ToString(), 0.0); int num2 = _Convert.StrToInt(row["SumIsuseNum"].ToString(), 0); int num3 = _Convert.StrToInt(row["BuyedIsuseNum"].ToString(), 0); int num4 = _Convert.StrToInt(row["QuashedIsuseNum"].ToString(), 0); double num5 = _Convert.StrToDouble(row["BuyedMoney"].ToString(), 0.0); double num6 = _Convert.StrToDouble(row["QuashedMoney"].ToString(), 0.0); try { double num1 = num / ((double)num2); } catch { PF.GoError(4, "投注记录有错误", "Admin_ChaseDetail"); return; } this.Label4.Text = "</font>; 共<font color='red'>" + num2.ToString() + "</font>期<font color='red'>" + num.ToString("N") + "</font>元; 已完成<font color='red'>" + num3.ToString() + "</font>期<font color='red'>" + num5.ToString("N") + "</font>元; 已取消<font color='red'>" + num4.ToString() + "</font>期<font color='red'>" + num6.ToString("N") + "</font>元。"; this.btnQuash.Enabled = num2 > (num3 + num4); dt = new Views.V_ChaseTaskDetails().Open("", "ChaseTaskID = " + ChaseID.ToString(), "[DateTime]"); if (dt != null) { this.LbPlayTypeName.Text = dt.Rows[0]["PlayTypeName"].ToString(); PF.DataGridBindData(this.g, dt); } else { PF.GoError(4, "没有追号记录", "Room_ChaseDetail"); } } }
private void BindData(int ChaseID) { DataTable dt = new Views.V_ChaseTasksTotal().Open("", "ID = " + ChaseID.ToString() + " and UserID=" + base._User.ID.ToString(), ""); if ((dt == null) || (dt.Rows.Count < 1)) { PF.GoError(4, "您还没有追号!", base.GetType().FullName); } else { DataRow row = dt.Rows[0]; this.labChase_id.Text = ChaseID.ToString(); this.Label1.Text = row["LotteryName"].ToString(); this.Label3.Text = row["Description"].ToString(); double num2 = _Convert.StrToDouble(row["SumMoney"].ToString(), 0.0); int num3 = _Convert.StrToInt(row["SumIsuseNum"].ToString(), 0); int num4 = _Convert.StrToInt(row["BuyedIsuseNum"].ToString(), 0); int num5 = _Convert.StrToInt(row["QuashedIsuseNum"].ToString(), 0); double num6 = _Convert.StrToDouble(row["BuyedMoney"].ToString(), 0.0); double num7 = _Convert.StrToDouble(row["QuashedMoney"].ToString(), 0.0); try { double num1 = num2 / ((double)num3); } catch { PF.GoError(4, "投注记录有错误", base.GetType().FullName); return; } this.Label4.Text = "</font>共<font color='red'>" + num3.ToString() + "</font>期<font color='red'>" + num2.ToString("N") + "</font>元; 已完成<font color='red'>" + num4.ToString() + "</font>期<font color='red'>" + num6.ToString("N") + "</font>元; 已取消<font color='red'>" + num5.ToString() + "</font>期<font color='red'>" + num7.ToString("N") + "</font>元。"; this.btnQuash.Enabled = num3 > (num4 + num5); dt = new Views.V_ChaseTaskDetails().Open("", "ChaseTaskID = " + ChaseID.ToString(), "[DateTime]"); if ((dt != null) && (dt.Rows.Count >= 1)) { this.LbPlayTypeName.Text = dt.Rows[0]["PlayTypeName"].ToString(); PF.DataGridBindData(this.g, dt); } else { PF.GoError(4, "没有追号记录", base.GetType().FullName); } } }
private void BindData() { DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(base._Site.ID.ToString() + "MemberChase" + base._User.ID.ToString()); string condition = string.Concat(new object[] { "[UserID] = ", base._User.ID.ToString(), " and SiteID = ", base._Site.ID }); if (this.isDateValid()) { string str2 = condition; condition = str2 + " and Convert(datetime,[DateTime]) between '" + this.txtStartDate.Text + " 0:0:0' and '" + this.txtEndDate.Text + " 23:59:59'"; } if (cacheAsDataTable == null) { cacheAsDataTable = new Views.V_ChaseTasksTotal().Open("", condition, "[DateTime] desc"); if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", "Room_ViewChase"); return; } Shove._Web.Cache.SetCache(base._Site.ID.ToString() + "MemberChase" + base._User.ID.ToString(), cacheAsDataTable); } PF.DataGridBindData(this.g1, cacheAsDataTable, this.gPager1); this.gPager1.Visible = true; this.lblPageBuyMoney.Text = PF.GetSumByColumn(cacheAsDataTable, 12, true, this.gPager1.PageSize, this.gPager1.PageIndex).ToString("N"); this.lblTotalBuyMoney.Text = PF.GetSumByColumn(cacheAsDataTable, 12, false, this.gPager1.PageSize, this.gPager1.PageIndex).ToString("N"); }