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");
            }
        }
    }
Beispiel #2
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);
            }
        }
    }