Пример #1
0
    private void BindData(long SchemeID)
    {
        DataTable dt = new DAL.Tables.T_ElectronTicketAgentSchemes().Open("SchemeNumber, DateTime, Amount, LotteryNumber, Multiple, state", " ID =" + SchemeID.ToString(), "");

        if ((dt == null) || (dt.Rows.Count < 1))
        {
            PF.GoError(ErrorNumber.Unknow, "参数错误", "Agent_ElectronTicket_Scheme");

            return;
        }

        string t_str = dt.Rows[0]["LotteryNumber"].ToString();

        lbSchemeNumber.Text = dt.Rows[0]["SchemeNumber"].ToString();
        lbDateTime.Text = dt.Rows[0]["DateTime"].ToString();
        lbAmount.Text = dt.Rows[0]["Amount"].ToString();
        lbMultiple.Text = dt.Rows[0]["Multiple"].ToString();

        string state = dt.Rows[0]["state"].ToString();

        lbState.Text = "失败";
        if (state == "1")
        {
            lbState.Text = "成功";
        }


        DataTable dtLotteryNumber = new DAL.Tables.T_ElectronTicketAgentSchemesElectronTickets().Open("Ticket, identifiers", " SchemeID=" + SchemeID.ToString(), "");

        if ((dtLotteryNumber == null) || dtLotteryNumber.Rows.Count < 1)
        {
            dtLotteryNumber = new DAL.Tables.T_ElectronTicketAgentSchemesElectronTickets().Open("Ticket, identifiers", " SchemeID=" + SchemeID.ToString(), "");

            if ((dtLotteryNumber == null) || dtLotteryNumber.Rows.Count < 1)
            {
                return;
            }
        }

        dtLotteryNumber.Columns.Add("count", typeof(System.String));

        for (int i = 0; i < dtLotteryNumber.Rows.Count; i++)
        {
            dtLotteryNumber.Rows[i]["count"] = (i + 1).ToString();
            dtLotteryNumber.AcceptChanges();
        }

        RpElectronTicket.DataSource = dtLotteryNumber;
        RpElectronTicket.DataBind();
    }
Пример #2
0
 private void BindData(long SchemeID)
 {
     DataTable table = new Tables.T_ElectronTicketAgentSchemes().Open("SchemeNumber, DateTime, Amount, LotteryNumber, Multiple, state", " ID =" + SchemeID.ToString(), "");
     if ((table == null) || (table.Rows.Count < 1))
     {
         PF.GoError(1, "参数错误", "Agent_ElectronTicket_Scheme");
     }
     else
     {
         table.Rows[0]["LotteryNumber"].ToString();
         this.lbSchemeNumber.Text = table.Rows[0]["SchemeNumber"].ToString();
         this.lbDateTime.Text = table.Rows[0]["DateTime"].ToString();
         this.lbAmount.Text = table.Rows[0]["Amount"].ToString();
         this.lbMultiple.Text = table.Rows[0]["Multiple"].ToString();
         string str = table.Rows[0]["state"].ToString();
         this.lbState.Text = "失败";
         if (str == "1")
         {
             this.lbState.Text = "成功";
         }
         DataTable table2 = new Tables.T_ElectronTicketAgentSchemesElectronTickets().Open("Ticket, identifiers", " SchemeID=" + SchemeID.ToString(), "");
         if ((table2 == null) || (table2.Rows.Count < 1))
         {
             table2 = new Tables.T_ElectronTicketAgentSchemesElectronTickets().Open("Ticket, identifiers", " SchemeID=" + SchemeID.ToString(), "");
             if ((table2 == null) || (table2.Rows.Count < 1))
             {
                 return;
             }
         }
         table2.Columns.Add("count", typeof(string));
         for (int i = 0; i < table2.Rows.Count; i++)
         {
             table2.Rows[i]["count"] = (i + 1).ToString();
             table2.AcceptChanges();
         }
         this.RpElectronTicket.DataSource = table2;
         this.RpElectronTicket.DataBind();
     }
 }