private void BindData()
 {
     if (this.ddlLottery.Items.Count >= 1)
     {
         string condition = "LotteryID = " + Utility.FilteSqlInfusion(this.ddlLottery.SelectedValue) + " and QuashStatus = 0 and Buyed = 0 and isOpened = 0";
         if (this.tbQuash.Text.Trim() != "")
         {
             if (this.rb1.Checked)
             {
                 condition = condition + " and SchemeNumber = '" + Utility.FilteSqlInfusion(this.tbQuash.Text.Trim()) + "'";
             }
             else
             {
                 condition = condition + " and InitiateName = '" + Utility.FilteSqlInfusion(this.tbQuash.Text.Trim()) + "'";
             }
         }
         DataTable table = new Views.V_SchemeSchedules().Open("", condition, "[Money] desc");
         if (table == null)
         {
             PF.GoError(4, "数据库繁忙,请重试", "Admin_SchemeQuash");
         }
         else
         {
             table.Columns.Add("LocateWaysAndMultiples", Type.GetType("System.String"));
             string buyContent = "";
             string cnLocateWaysAndMultiples = "";
             for (int i = 0; i < table.Rows.Count; i++)
             {
                 table.Rows[i]["Money"] = double.Parse(table.Rows[i]["Money"].ToString()).ToString("N");
                 if (new Lottery()["45"].CheckPlayType(int.Parse(table.Rows[i]["PlayTypeID"].ToString())))
                 {
                     table.Rows[i]["Multiple"] = 0;
                     try
                     {
                         buyContent = "";
                         cnLocateWaysAndMultiples = "";
                         if (new Lottery()["45"].GetSchemeSplit(table.Rows[i]["LotteryNumber"].ToString(), ref buyContent, ref cnLocateWaysAndMultiples))
                         {
                             table.Rows[i]["LocateWaysAndMultiples"] = cnLocateWaysAndMultiples;
                         }
                         else
                         {
                             table.Rows[i]["LocateWaysAndMultiples"] = "<font color='red'>读取错误!</font>";
                         }
                     }
                     catch
                     {
                         table.Rows[i]["LocateWaysAndMultiples"] = "<font color='red'>读取错误!</font>";
                     }
                 }
                 table.AcceptChanges();
             }
             this.g.DataSource = table;
             this.g.DataBind();
         }
     }
 }
 private void BindData()
 {
     if (this.ddlLottery.Items.Count >= 1)
     {
         DataTable table = new Views.V_SchemeSchedules().Open("", "LotteryID = " + Utility.FilteSqlInfusion(this.ddlLottery.SelectedValue) + " and Schedule >= 100 and QuashStatus = 0 and Buyed = 0 and EndTime < GetDate() and not [ID] in (select SchemeID from T_SchemesSendToCenter where HandleResult <> 1)", "[Money] desc");
         if (table == null)
         {
             PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName);
         }
         else
         {
             table.Columns.Add("LocateWaysAndMultiples", Type.GetType("System.String"));
             string buyContent = "";
             string cnLocateWaysAndMultiples = "";
             for (int i = 0; i < table.Rows.Count; i++)
             {
                 table.Rows[i]["Money"] = double.Parse(table.Rows[i]["Money"].ToString()).ToString("N");
                 if (new Lottery()["45"].CheckPlayType(int.Parse(table.Rows[i]["PlayTypeID"].ToString())))
                 {
                     table.Rows[i]["Multiple"] = 0;
                     try
                     {
                         buyContent = "";
                         cnLocateWaysAndMultiples = "";
                         if (new Lottery()["45"].GetSchemeSplit(table.Rows[i]["LotteryNumber"].ToString(), ref buyContent, ref cnLocateWaysAndMultiples))
                         {
                             table.Rows[i]["LocateWaysAndMultiples"] = cnLocateWaysAndMultiples;
                         }
                         else
                         {
                             table.Rows[i]["LocateWaysAndMultiples"] = "<font color='red'>读取错误!</font>";
                         }
                     }
                     catch
                     {
                         table.Rows[i]["LocateWaysAndMultiples"] = "<font color='red'>读取错误!</font>";
                     }
                 }
                 table.AcceptChanges();
             }
             this.g.DataSource = table;
             this.g.DataBind();
         }
     }
 }
示例#3
0
 private void BindData()
 {
     if (this.ddlIsuse.Items.Count >= 1)
     {
         DataTable table = new Views.V_SchemeSchedules().Open("", "IsuseID = " + Utility.FilteSqlInfusion(this.ddlIsuse.SelectedValue) + " and Schedule >= 100 and QuashStatus = 0 and Buyed = 0 and isOpened = 0", "[Money] desc");
         if (table == null)
         {
             PF.GoError(4, "数据库繁忙,请重试", "Admin_PrintOutput");
         }
         else
         {
             table.Columns.Add("LocateWaysAndMultiples", Type.GetType("System.String"));
             string buyContent = "";
             string cnLocateWaysAndMultiples = "";
             for (int i = 0; i < table.Rows.Count; i++)
             {
                 table.Rows[i]["Money"] = double.Parse(table.Rows[i]["Money"].ToString()).ToString("N");
                 if (new Lottery()["45"].CheckPlayType(int.Parse(table.Rows[i]["PlayTypeID"].ToString())))
                 {
                     table.Rows[i]["Multiple"] = 0;
                     try
                     {
                         buyContent = "";
                         cnLocateWaysAndMultiples = "";
                         string str3   = "";
                         string scheme = table.Rows[i]["LotteryNumber"].ToString();
                         if (new Lottery()["45"].GetSchemeSplit(scheme, ref buyContent, ref cnLocateWaysAndMultiples))
                         {
                             string    vote   = "";
                             DataTable table2 = PF.GetZCDCBuyContent(scheme, _Convert.StrToLong(table.Rows[i]["ID"].ToString(), -1L), ref vote);
                             if (table2 == null)
                             {
                                 PF.GoError(4, "数据访问错误", base.GetType().BaseType.FullName);
                                 return;
                             }
                             foreach (DataRow row in table2.Rows)
                             {
                                 if (str3 == "")
                                 {
                                     string str6 = str3;
                                     str3 = str6 + row["No"].ToString() + " " + row["LeagueTypeName"].ToString() + " " + row["HostTeam"].ToString() + " VS " + row["QuestTeam"].ToString() + " " + row["Content"].ToString() + " " + row["LotteryResult"].ToString();
                                 }
                                 else
                                 {
                                     string str7 = str3;
                                     str3 = str7 + "<br />" + row["No"].ToString() + " " + row["LeagueTypeName"].ToString() + " " + row["HostTeam"].ToString() + " VS " + row["QuestTeam"].ToString() + " " + row["Content"].ToString() + " " + row["LotteryResult"].ToString();
                                 }
                             }
                             table.Rows[i]["LocateWaysAndMultiples"] = cnLocateWaysAndMultiples;
                         }
                         else
                         {
                             table.Rows[i]["LocateWaysAndMultiples"] = "<font color='red'>读取错误!</font>";
                         }
                     }
                     catch
                     {
                         table.Rows[i]["LocateWaysAndMultiples"] = "<font color='red'>读取错误!</font>";
                     }
                 }
                 table.AcceptChanges();
             }
             this.g.DataSource = table;
             this.g.DataBind();
             this.btnDownload.Enabled     = table.Rows.Count > 0;
             this.btnDownload_txt.Enabled = table.Rows.Count > 0;
             this.btnBuyAll.Visible       = table.Rows.Count > 0;
             this.fileUp.Disabled         = table.Rows.Count < 1;
             this.btnUpload.Enabled       = table.Rows.Count > 0;
         }
     }
 }