private void BindLotteryType() { string request = Utility.GetRequest("LotteryID"); string key = "dtLotteriesUseLotteryList"; DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key); if (cacheAsDataTable == null) { cacheAsDataTable = new Tables.T_Lotteries().Open("[ID], [Name], [Code]", "[ID] in(" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[ID]"); if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName + "(-46)"); return; } Shove._Web.Cache.SetCache(key, cacheAsDataTable, 0x1770); } this.ddlLotteries.DataSource = cacheAsDataTable; this.ddlLotteries.DataTextField = "Name"; this.ddlLotteries.DataValueField = "ID"; this.ddlLotteries.DataBind(); if (this.ddlLotteries.Items.FindByValue(request) != null) { this.ddlLotteries.SelectedValue = request; } }
private void BindDataForLotteryQuickBuy() { DataTable table = new Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + ((base._Site.UseLotteryListRestrictions == "") ? "-1" : base._Site.UseLotteryListRestrictions) + ")", "[ID]"); if (table == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName); } else { this.g2.DataSource = table; this.g2.DataBind(); this.g2.Columns[2].Visible = false; for (int i = 0; i < this.g2.Rows.Count; i++) { CheckBox box = (CheckBox)this.g2.Rows[i].Cells[1].FindControl("cbisUsed"); if (base._Site.UseLotteryListRestrictions == "") { box.Checked = false; } else { int num2 = _Convert.StrToInt(this.g2.Rows[i].Cells[2].Text, -1); if (num2 >= 1) { box.Checked = ("," + base._Site.UseLotteryListQuickBuy + ",").IndexOf("," + num2.ToString() + ",") >= 0; } } } } }
private void BindDataForLottery() { this.ddlLottery.Items.Clear(); this.ddlLottery.Items.Add(new ListItem("全部彩种", "-1")); if (base._Site.UseLotteryList == "") { PF.GoError(1, "暂无玩法", "Room_InvestHistory"); } else { string key = "dtLotteriesUseLotteryList"; DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key); if (cacheAsDataTable == null) { cacheAsDataTable = new Tables.T_Lotteries().Open("[ID], [Name], [Code]", "[ID] in(" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[ID]"); if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName + "(-46)"); return; } Shove._Web.Cache.SetCache(key, cacheAsDataTable, 0x1770); } for (int i = 0; i < cacheAsDataTable.Rows.Count; i++) { this.ddlLottery.Items.Add(new ListItem(cacheAsDataTable.Rows[i]["Name"].ToString(), cacheAsDataTable.Rows[i]["ID"].ToString())); } } }
private void bindData(int lotteryID) { DataTable table = new Tables.T_Lotteries().Open("Agreement", "ID = " + lotteryID, ""); if ((table != null) && (table.Rows.Count > 0)) { string str = table.Rows[0]["Agreement"].ToString(); this.lbAgreement.Text = str.Replace("[SiteName]", base._Site.Name).Replace("[SiteUrl]", base._Site.Url); } }
private void BianData() { this.lbUserName.Text = base._User.Name; string key = "dtLotteriesUseLotteryList"; DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key); if (cacheAsDataTable == null) { cacheAsDataTable = new Tables.T_Lotteries().Open("[ID], [Name], [Code]", "[ID] in(" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[ID]"); if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName + "(-39)"); return; } Shove._Web.Cache.SetCache(key, cacheAsDataTable, 0x1770); } if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName + "(-49)"); } else { this.ddlLotteries.Items.Clear(); this.ddlLotteries.Items.Add(new ListItem("选择彩种", "0")); foreach (DataRow row in cacheAsDataTable.Rows) { this.ddlLotteries.Items.Add(new ListItem(row["Name"].ToString(), row["ID"].ToString())); } this.ddlPlayTypes.Items.Clear(); this.ddlPlayTypes.Items.Add(new ListItem("选择玩法", "0")); string request = Utility.GetRequest("LotteryID"); string str3 = Utility.GetRequest("PlayTypeID"); if ((request != null) && (request != "")) { try { this.ddlLotteries.SelectedValue = request; this.ddlLotteries_SelectedIndexChanged(this.ddlLotteries, null); } catch { } } if ((str3 != null) && (str3 != "")) { try { this.ddlPlayTypes.SelectedValue = str3; } catch { } } } }
private void BindDataForLottery() { DataTable dt = new Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[Order]"); if (dt == null) { PF.GoError(4, "数据库繁忙,请重试", "Admin_WinList"); } else { ControlExt.FillDropDownList(this.ddlLottery, dt, "Name", "ID"); } }
private void BindDataForLottery() { DataTable dt = new Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (1,2,3,4,9,10,14,15,39)", "[Order]"); if (dt == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().FullName); } else { ControlExt.FillDropDownList(this.ddlLottery, dt, "Name", "ID"); } }
private void BindDataForLottery() { DataTable dt = new Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + ((base._Site.UseLotteryListRestrictions == "") ? "-1" : base._Site.UseLotteryListRestrictions) + ")", "[Order]"); if (dt == null) { PF.GoError(4, "数据库繁忙,请重试", "Admin_SchemeList"); } else { ControlExt.FillListBox(this.listLottery, dt, "Name", "ID"); } }
private void BindDataForLottery() { if (this.ddlElectronTicket.Items.Count >= 1) { DataTable dt = new Tables.T_Lotteries().Open("[ID], [Name]", "PrintOutType = " + Utility.FilteSqlInfusion(this.ddlElectronTicket.SelectedValue) + " and [ID] in (" + ((base._Site.UseLotteryListRestrictions == "") ? "-1" : base._Site.UseLotteryListRestrictions) + ")", "[Order]"); if (dt == null) { PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName); } else { ControlExt.FillDropDownList(this.ddlLottery, dt, "Name", "ID"); } } }
private void BindDataForLottery() { this.ddlLottery.Items.Clear(); this.ddlLottery.Items.Add(new ListItem("全部彩种", "-1")); if (base._Site.UseLotteryList == "") { PF.GoError(1, "暂无玩法", base.GetType().FullName); } else { string key = "dtLotteriesUseLotteryList"; DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key); if (cacheAsDataTable == null) { cacheAsDataTable = new Tables.T_Lotteries().Open("[ID], [Name], [Code]", "[ID] in(" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[ID]"); if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName + "(-46)"); return; } Shove._Web.Cache.SetCache(key, cacheAsDataTable, 0x1770); } for (int i = 0; i < cacheAsDataTable.Rows.Count; i++) { string str2 = cacheAsDataTable.Rows[i]["ID"].ToString(); key = "dtVPlayTypes_" + str2.ToString(); DataTable table2 = Shove._Web.Cache.GetCacheAsDataTable(key); if (table2 == null) { table2 = new Views.V_PlayTypes().Open("", "LotteryID = " + str2.ToString(), "[ID]"); if ((table2 == null) || (table2.Rows.Count < 1)) { PF.GoError(7, "数据库繁忙,请重试", base.GetType().FullName); return; } Shove._Web.Cache.SetCache(key, table2, 0x1770); } if (this.arrLotteries.Contains <int>(_Convert.StrToInt(cacheAsDataTable.Rows[i]["ID"].ToString(), 0))) { this.ddlLottery.Items.Add(new ListItem(table2.Rows[0]["LotteryName"].ToString(), table2.Rows[0]["LotteryID"].ToString())); } } if (this.ddlLottery.Items.Count > 0) { this.BindDataForPlayType(this.ddlLottery.Items[0].Value); } } }
private void BindLotteryType() { DataTable table = new Tables.T_Lotteries().Open("[ID], [Name], [Code]", "[ID] in(" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[ID]"); if (table == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName + "(-46)"); } else { this.ddlLotteries.DataSource = table; this.ddlLotteries.DataTextField = "Name"; this.ddlLotteries.DataValueField = "ID"; this.ddlLotteries.DataBind(); } }
private void BindData(CheckBoxList list, string temp) { DataTable table = new Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ") " + temp, "[Order]"); if (table == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName); } else { list.Items.Clear(); foreach (DataRow row in table.Rows) { list.Items.Add(new ListItem(row["Name"].ToString(), row["ID"].ToString())); } } }
private void BindData(int id) { DataTable table = new Tables.T_Lotteries().Open("[ID],[Name],[SchemeExemple]", "[ID] = " + id.ToString() + " and [ID] in (" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", ""); if (table == null) { PF.GoError(4, "数据库繁忙,请重试", "Room_SchemeExemple"); } else if (table.Rows.Count == 0) { JavaScript.ClosePage(this.Page); } else { this.labContent.Text = table.Rows[0]["SchemeExemple"].ToString().Replace("[SiteName]", base._Site.Name).Replace("[SiteUrl]", base._Site.Urls).Replace("[siteurl]", base._Site.Urls); } }
private void BindDataForLottery() { DataTable dt = new Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + ((base._Site.UseLotteryListRestrictions == "") ? "-1" : base._Site.UseLotteryListRestrictions) + ") and [ID] <> 45", "[Order]"); if (dt == null) { PF.GoError(4, "数据库繁忙,请重试", "Admin_InputWinNumber"); } else { ControlExt.FillDropDownList(this.ddlLottery, dt, "Name", "ID"); if (this.ddlLottery.Items.Count < 1) { this.btnGO.Enabled = false; this.tbWinNumber.Enabled = false; } } }
private void BindData() { if (this.ddlLottery.Items.Count >= 1) { DataTable table = new Tables.T_Lotteries().Open("Explain, SchemeExemple, Agreement, OpenAfficheTemplate", "[ID] = " + Utility.FilteSqlInfusion(this.ddlLottery.SelectedValue), ""); if ((table == null) || (table.Rows.Count < 1)) { PF.GoError(4, "数据库繁忙,请重试", "Admin_LotteryInformation"); } else { this.tbExplain.Text = table.Rows[0]["Explain"].ToString(); this.tbLotteryExemple.Text = table.Rows[0]["SchemeExemple"].ToString(); this.tbAgreement.Text = table.Rows[0]["Agreement"].ToString(); this.tbOpenAfficheTemplate.Text = table.Rows[0]["OpenAfficheTemplate"].ToString(); } } }
private void BindDataForLottery() { DataTable dt = new Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (1,2,3,4,9,10,14,15,39) and [ID] <> 45", "[Order]"); if (dt == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().FullName); } else { ControlExt.FillDropDownList(this.ddlLottery, dt, "Name", "ID"); if (this.ddlLottery.Items.Count < 1) { this.btnGO.Enabled = false; this.tbWinNumber.Enabled = false; } } }
private void BindDataForLottery() { DataTable dt = new Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (1,2,3,4,9,10,14,15,39)", "[Order]"); if (dt == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName); } else { ControlExt.FillDropDownList(this.ddlLottery, dt, "Name", "ID"); string request = Utility.GetRequest("LotteryID"); if (request != "") { ControlExt.SetDownListBoxTextFromValue(this.ddlLottery, request); } } }
private void BindDataForLottery() { DataTable table = new Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[Order]"); if (table == null) { PF.GoError(4, "数据库繁忙,请重试", "Admin_ExpertsTrys"); } else { this.ddlLottery.Items.Clear(); this.ddlLottery.Items.Add(new ListItem("所有彩种", "0")); foreach (DataRow row in table.Rows) { this.ddlLottery.Items.Add(new ListItem(row["Name"].ToString(), row["ID"].ToString())); } } }
private void BindDataForLottery(DropDownList ddl) { string key = "Home_Room_JoinAllBuy_BindDataForLottery"; DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key); if (cacheAsDataTable == null) { cacheAsDataTable = new Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[Order]"); if (cacheAsDataTable == null) { return; } Shove._Web.Cache.SetCache(key, cacheAsDataTable, 0x1770); } ddl.DataSource = cacheAsDataTable; ddl.DataTextField = "Name"; ddl.DataValueField = "ID"; ddl.DataBind(); ddl.Items.Insert(0, new ListItem("全部彩种", "-1")); }
private void dataBindLottery() { this.ddlLottery.Items.Clear(); this.ddlLottery.Items.Add(new ListItem("------------请选择------------", "-1")); DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(base._ElectronTicketAgents.ID.ToString() + "Agent_ElectronTicket_AgentQueryBet_dtLotterys"); if (cacheAsDataTable == null) { cacheAsDataTable = new Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + base._ElectronTicketAgents.UseLotteryList + ")", "[Order]"); if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", "Room_FrameLeft"); return; } Shove._Web.Cache.SetCache(base._ElectronTicketAgents.ID.ToString() + "Agent_ElectronTicket_AgentQueryBet_dtLotterys", cacheAsDataTable); } for (int i = 0; i < cacheAsDataTable.Rows.Count; i++) { this.ddlLottery.Items.Add(new ListItem(cacheAsDataTable.Rows[i]["Name"].ToString(), cacheAsDataTable.Rows[i]["ID"].ToString())); } }
private void BindDataForLottery() { DataTable dt = new Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + ((base._Site.UseLotteryListRestrictions == "") ? "-1" : base._Site.UseLotteryListRestrictions) + ")", "[Order]"); if (dt == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName); } else { ControlExt.FillDropDownList(this.ddlLottery, dt, "Name", "ID"); if (this.ddlLottery.Items.Count < 1) { this.btnGO.Enabled = false; } else { this.ddlLottery_SelectedIndexChanged(this.ddlLottery, new EventArgs()); } } }
private void BindData(int LotteryID) { string key = "LotteryAgreements"; DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key); if (cacheAsDataTable == null) { cacheAsDataTable = new Tables.T_Lotteries().Open("[ID],[Code],[Agreement]", "[ID] in (" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", ""); if ((cacheAsDataTable == null) || (cacheAsDataTable.Rows.Count < 1)) { PF.GoError(7, "数据库繁忙,请重试", base.GetType().FullName); return; } Shove._Web.Cache.SetCache(key, cacheAsDataTable, 0x1770); } DataRow[] rowArray = cacheAsDataTable.Select("[ID] = " + LotteryID.ToString()); if (rowArray.Length > 0) { this.lbAgreement.Text = rowArray[0]["Agreement"].ToString().ToLower().Replace("[sitename]", base._Site.Name).Replace("[siteurl]", Utility.GetUrl()); this.imgLogo.ImageUrl = "images/" + rowArray[0]["Code"].ToString().ToLower() + ".jpg"; } }
private void BindDataForLottery(int LotteryID) { string key = "dtLotteriesUseLotteryList"; DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key); if (cacheAsDataTable == null) { cacheAsDataTable = new Tables.T_Lotteries().Open("[ID], [Name], [Code]", "[ID] in(" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[ID]"); if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName + "(-39)"); return; } Shove._Web.Cache.SetCache(key, cacheAsDataTable, 0x1770); } if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName + "(-49)"); } else { this.ddlLotteries.Items.Clear(); this.ddlLotteries.Items.Add(new ListItem("全部彩种", "-1")); foreach (DataRow row in cacheAsDataTable.Rows) { string text = row["Name"].ToString(); if (row["ID"].ToString() == "61") { text = text.Replace("江西", ""); } this.ddlLotteries.Items.Add(new ListItem(text, row["ID"].ToString())); } if (this.ddlLotteries.Items.FindByValue(LotteryID.ToString()) != null) { this.ddlLotteries.SelectedValue = LotteryID.ToString(); } this.ddlLotteries_SelectedIndexChanged(this.ddlLotteries, new EventArgs()); } }
private void BindLotteryType() { string key = "dtLotteriesUseLotteryList"; DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key); if (cacheAsDataTable == null) { cacheAsDataTable = new Tables.T_Lotteries().Open("[ID], [Name], [Code]", "[ID] in(" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[ID]"); if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName + "(-46)"); return; } Shove._Web.Cache.SetCache(key, cacheAsDataTable, 0x1770); } this.ddlLotteries.DataSource = cacheAsDataTable; this.ddlLotteries.DataTextField = "Name"; this.ddlLotteries.DataValueField = "ID"; this.ddlLotteries.DataBind(); this.hidID.Value = Utility.GetRequest("ID"); DataTable table2 = new Tables.T_Personages().Open("", "ID=" + Utility.FilteSqlInfusion(this.hidID.Value), ""); if ((table2 == null) || (table2.Rows.Count == 0)) { JavaScript.Alert(this.Page, "记录不存在!"); } else { if (this.ddlLotteries.Items.FindByValue(table2.Rows[0]["LotteryID"].ToString()) != null) { this.ddlLotteries.SelectedValue = table2.Rows[0]["LotteryID"].ToString(); } this.tbOrder.Text = table2.Rows[0]["Order"].ToString(); this.cbisShow.Checked = _Convert.StrToBool(table2.Rows[0]["IsShow"].ToString(), true); this.tbName.Text = table2.Rows[0]["UserName"].ToString(); } }
private void BindDataForLottery() { this.ddlLottery.Items.Clear(); this.ddlLottery.Items.Add(new ListItem("全部彩种", "-1")); this.ddlLotterySet.Items.Clear(); this.ddlLotterySet.Items.Add(new ListItem("全部彩种", "-1")); this.BindDataForPlayType(2); this.ddlWhoLottery.Items.Clear(); this.ddlWhoLottery.Items.Add(new ListItem("全部彩种", "-1")); this.BindDataForPlayType(3); if (base._Site.UseLotteryList == "") { PF.GoError(1, "暂无玩法", "Room_InvestHistory"); } else { DataTable table = new Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[Order]"); if (table == null) { PF.GoError(4, "数据库繁忙,请重试", "Room_InvestHistory"); } else { for (int i = 0; i < table.Rows.Count; i++) { string text = table.Rows[i]["Name"].ToString(); if (table.Rows[i]["ID"].ToString() == "61") { text = text.Replace("江西", ""); } this.ddlLottery.Items.Add(new ListItem(text, table.Rows[i]["ID"].ToString())); this.ddlLotterySet.Items.Add(new ListItem(text, table.Rows[i]["ID"].ToString())); this.ddlWhoLottery.Items.Add(new ListItem(text, table.Rows[i]["ID"].ToString())); } } } }
private void BindDataForLottery() { DataTable table = new Tables.T_Lotteries().Open("[ID], [Name], PrintOutType", "[ID] in (" + ((base._Site.UseLotteryListRestrictions == "") ? "-1" : base._Site.UseLotteryListRestrictions) + ")", "[Order]"); if (table == null) { PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName); } else { this.g.DataSource = table; this.g.DataBind(); this.g.Columns[2].Visible = false; this.g.Columns[3].Visible = false; for (int i = 0; i < this.g.Rows.Count; i++) { DropDownList ddl = (DropDownList)this.g.Rows[i].Cells[1].FindControl("ddlElectronTicket"); if (_Convert.StrToInt(this.g.Rows[i].Cells[2].Text, -1) >= 1) { ControlExt.SetDownListBoxTextFromValue(ddl, _Convert.StrToShort(this.g.Rows[i].Cells[3].Text, 0).ToString()); } } } }
protected void g_ItemDataBound(object sender, DataGridItemEventArgs e) { if (((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem)) || (e.Item.ItemType == ListItemType.EditItem)) { DataRowView dataItem = (DataRowView)e.Item.DataItem; DataRow row = dataItem.Row; e.Item.Cells[0].Text = _Convert.StrToDateTime(row["DateTime"].ToString(), DateTime.Now.ToString()).ToString("yyyy-MM-dd HH:mm:ss"); string key = "dtLotteriesUseLotteryList"; DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key); if (cacheAsDataTable == null) { cacheAsDataTable = new Tables.T_Lotteries().Open("[ID], [Name], [Code]", "[ID] in(" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[ID]"); if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName + "(-39)"); return; } Shove._Web.Cache.SetCache(key, cacheAsDataTable, 0x1770); } if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName + "(-49)"); } else { if (row["LotteryID"].ToString() == "-1") { e.Item.Cells[2].Text = "全部彩种"; } else { e.Item.Cells[2].Text = cacheAsDataTable.Select("ID = " + row["LotteryID"].ToString())[0]["Name"].ToString(); } key = "dtPlayTypes"; DataTable table2 = Shove._Web.Cache.GetCacheAsDataTable(key); if (table2 == null) { table2 = new Tables.T_PlayTypes().Open("", "LotteryID in (" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[ID]"); if ((table2 == null) || (table2.Rows.Count < 1)) { PF.GoError(7, "数据库繁忙,请重试", base.GetType().FullName + "(-85)"); return; } Shove._Web.Cache.SetCache(key, table2, 0x1770); } if (table2 == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName + "(-95)"); } else { if (row["PlayTypeID"].ToString() == "-1") { e.Item.Cells[3].Text = "全部玩法"; } else { e.Item.Cells[3].Text = table2.Select("ID = " + row["PlayTypeID"].ToString())[0]["Name"].ToString(); } e.Item.Cells[4].Text = _Convert.StrToDouble(row["MoneyStart"].ToString(), 0.0).ToString("N") + " 至 " + _Convert.StrToDouble(row["MoneyEnd"].ToString(), 0.0).ToString("N") + " 元"; e.Item.Cells[5].Text = (row["Type"].ToString() == "1") ? "用户定制" : "发起人指定"; } } } }
private void BindData(int FollowUserID) { DataTable table = new Tables.T_CustomFriendFollowSchemes().Open("", "FollowUserID = " + FollowUserID.ToString() + " and UserID = " + Utility.FilteSqlInfusion(this.HidUserID.Value), ""); if (table == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName); } else if (table.Rows.Count == 0) { PF.GoError(4, "参数错误", base.GetType().BaseType.FullName); } else { DataRow row = table.Rows[0]; int num = _Convert.StrToInt(row["LotteryID"].ToString(), -1); int num2 = _Convert.StrToInt(row["PlayTYpeID"].ToString(), -1); double num3 = _Convert.StrToDouble(row["MoneyStart"].ToString(), 0.0); double num4 = _Convert.StrToDouble(row["MoneyEnd"].ToString(), 0.0); int num5 = _Convert.StrToInt(row["BuyShareStart"].ToString(), 1); int num6 = _Convert.StrToInt(row["BuyShareEnd"].ToString(), 1); this.tbMaxMoney.Text = num4.ToString().Replace(".0000", ""); this.tbMinMoney.Text = num3.ToString().Replace(".0000", ""); this.tbBuyShareStart.Text = num5.ToString(); this.tbBuyShareEnd.Text = num6.ToString(); this.HidFollowUserID.Value = row["FollowUserID"].ToString(); this.HidPlayTypeID.Value = num2.ToString(); string key = "dtLotteriesUseLotteryList"; DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key); if (cacheAsDataTable == null) { cacheAsDataTable = new Tables.T_Lotteries().Open("[ID], [Name], [Code]", "[ID] in(" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[ID]"); if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName + "(-39)"); return; } Shove._Web.Cache.SetCache(key, cacheAsDataTable, 0x1770); } if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName + "(-49)"); } else { this.ddlLotteries.Items.Clear(); this.ddlLotteries.Items.Add(new ListItem("全部彩种", "-1")); foreach (DataRow row2 in cacheAsDataTable.Rows) { string text = row2["Name"].ToString(); if (row2["ID"].ToString() == "61") { text = text.Replace("江西", ""); } this.ddlLotteries.Items.Add(new ListItem(text, row2["ID"].ToString())); } if (this.ddlLotteries.Items.FindByValue(num.ToString()) != null) { this.ddlLotteries.SelectedValue = num.ToString(); } this.ddlLotteries_SelectedIndexChanged(this.ddlLotteries, new EventArgs()); } } }
private void BindData(long UserID, int LotteryID) { string returnDescription = ""; string str2 = ""; Users users = new Users(base._Site.ID) { ID = UserID }; if (users.GetUserInformationByID(ref returnDescription) != 0) { PF.GoError(1, returnDescription, base.GetType().FullName); } else { this.labUserName.Text = users.Name; this.labUserRegisterTime.Text = users.RegisterTime.ToString("yyyy-MM-dd HH:mm:ss"); this.labUserType.Text = (users.UserType == 1) ? "普通会员" : ((users.UserType == 3) ? "VIP" : "高级会员"); this.dingZhi = string.Concat(new object[] { "&FollowUserID=", UserID, "&FollowUserName="******"\"" }); DataTable cacheAsDataTable = null; if (this.Source == -1) { cacheAsDataTable = new Tables.T_Lotteries().Open("[ID], [Name]", "[id] = " + LotteryID.ToString(), ""); } else if (this.Source == 1) { cacheAsDataTable = MSSQL.Select("Select ID,Name from T_Lotteries where ID=" + LotteryID.ToString(), new MSSQL.Parameter[0]); } else if (this.Source == 2) { cacheAsDataTable = MSSQL.Select("Select ID,Name from T_Lotteries where ID=" + LotteryID.ToString(), new MSSQL.Parameter[0]); } else { cacheAsDataTable = new Tables.T_Lotteries().Open("[ID], [Name]", "[id] = " + LotteryID.ToString(), ""); } if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().FullName); } else { if (this.cbShowWin.Checked) { str2 = " where WinMoney>0"; } string key = string.Concat(new object[] { users.ID, "_", LotteryID.ToString(), "_Home_Web_Score_", this.cbShowWin.Checked }); cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key); if ((cacheAsDataTable == null) || this.IsShow) { string str5 = "select * from ("; cacheAsDataTable = MSSQL.Select(str5 + this.GetSQL(UserID, LotteryID, "", ",source=1") + ") d " + str2 + " order by TopMoney desc,id desc", new MSSQL.Parameter[0]); if (cacheAsDataTable == null) { PF.GoError(4, "数据库繁忙,请重试", base.GetType().FullName); return; } Shove._Web.Cache.SetCache(key, cacheAsDataTable, 300); } PF.DataGridBindData(this.g, cacheAsDataTable, this.gPager); this.gPager.Visible = true; } } }