Example #1
0
    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");
    }
    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");
            }
        }
    }
Example #3
0
    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);
            }
        }
    }