Esempio n. 1
0
    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);
    }
Esempio n. 2
0
    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);
         }
     }
 }