示例#1
0
    protected void g_ItemCheckedChanged(object sender, System.EventArgs e)
    {
        CheckBox     cb   = (CheckBox)sender;
        DataGridItem item = (DataGridItem)cb.Parent.Parent;
        long         id   = Shove._Convert.StrToLong(item.Cells[6].Text, 0);

        DAL.Tables.T_StationSMS T_StationSMS = new DAL.Tables.T_StationSMS();

        T_StationSMS.isShow.Value = cb.Checked;

        if (T_StationSMS.Update("ID = " + id.ToString()) < 0)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_StationSMSList");

            return;
        }
    }
    private void BindDataForLottery(int LotteryID)
    {
        string    CacheKey    = "dtLotteriesUseLotteryList";
        DataTable dtLotteries = Shove._Web.Cache.GetCacheAsDataTable(CacheKey);

        if (dtLotteries == null)
        {
            dtLotteries = new DAL.Tables.T_Lotteries().Open("[ID], [Name], [Code]", "[ID] in(" + (_Site.UseLotteryList == "" ? "-1" : _Site.UseLotteryList) + ")", "[ID]");

            if (dtLotteries == null)
            {
                PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName + "(-39)");

                return;
            }

            Shove._Web.Cache.SetCache(CacheKey, dtLotteries, 6000);
        }

        if (dtLotteries == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName + "(-49)");

            return;
        }

        ddlLotteries.Items.Clear();
        ddlLotteries.Items.Add(new ListItem("全部彩种", "-1"));

        foreach (DataRow dr in dtLotteries.Rows)
        {
            string strLotteryName = dr["Name"].ToString();
            if (dr["ID"].ToString() == "61")
            {
                strLotteryName = strLotteryName.Replace("江西", "");
            }
            ddlLotteries.Items.Add(new ListItem(strLotteryName, dr["ID"].ToString()));
        }

        if (ddlLotteries.Items.FindByValue(LotteryID.ToString()) != null)
        {
            ddlLotteries.SelectedValue = LotteryID.ToString();
        }

        ddlLotteries_SelectedIndexChanged(ddlLotteries, new EventArgs());
    }
 private void BindData()
 {
     if (this.ddlYear.Items.Count != 0)
     {
         if (this.tbID.Text == "")
         {
             this.tbID.Text = Utility.GetRequest("id");
             if (this.tbID.Text == "")
             {
                 return;
             }
         }
         long userID = _Convert.StrToLong(this.tbID.Text, -1L);
         if (userID < 0L)
         {
             PF.GoError(1, "参数错误", "Admin_UserAccountDetail");
         }
         else
         {
             if (this.tbUserName.Text.Trim() == "")
             {
                 Users users = new Users(base._Site.ID)[base._Site.ID, userID];
                 if (users == null)
                 {
                     JavaScript.Alert(this.Page, "用户名不存在。");
                     return;
                 }
                 this.tbUserName.Text = users.Name;
             }
             int    returnValue       = -1;
             string returnDescription = "";
             if (Procedures.P_GetUserAccountDetail(ref this.ds, base._Site.ID, userID, int.Parse(this.ddlYear.SelectedValue), int.Parse(this.ddlMonth.SelectedValue), int.Parse(this.ddlDay.SelectedValue), ref returnValue, ref returnDescription) < 0)
             {
                 PF.GoError(4, "数据库繁忙,请重试", base.GetType().FullName);
             }
             else if ((this.ds == null) || (this.ds.Tables.Count < 1))
             {
                 PF.GoError(4, "数据库繁忙,请重试", "Admin_UserAccountDetail");
             }
             else
             {
                 PF.DataGridBindData(this.g, this.ds.Tables[0], this.gPager);
             }
         }
     }
 }
    protected void btnOK_Click(object sender, EventArgs e)
    {
        if (ddlIsuse.Items.Count < 1)
        {
            return;
        }

        if (MSSQL.ExecuteNonQuery("update T_Isuses set OpenAffiche = @p1 where [ID] = " + ddlIsuse.SelectedValue,
                                  new Shove.Database.MSSQL.Parameter("p1", SqlDbType.VarChar, 0, ParameterDirection.Input, tbOpenAffiche.Value)) < 0)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_InputOpenAffiche");

            return;
        }

        Shove._Web.JavaScript.Alert(this.Page, "数据保存成功。");
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.lbUserName.Text = HttpUtility.UrlDecode(Utility.GetRequest("FollowUserName"));
         int num = _Convert.StrToInt(Utility.GetRequest("ID"), -1);
         if ((num < 0) || (this.lbUserName.Text == ""))
         {
             PF.GoError(1, "参数错误,系统异常。", base.GetType().BaseType.FullName);
         }
         else
         {
             this.HidID.Value = num.ToString();
             this.BindData();
         }
     }
 }
示例#6
0
    protected void g_ItemCommand(object source, DataGridCommandEventArgs e)
    {
        long TryID = Shove._Convert.StrToLong(e.Item.Cells[9].Text, -1);

        switch (e.CommandName)
        {
        case "HandleTry":     //处理申请
        {
            Response.Redirect("CpsTryHandle.aspx?id=" + TryID.ToString());
        } break;

        case "NoAccept":
        {
            long   ReturnValue       = -1;
            string ReturnDescription = "";

            int Result = DAL.Procedures.P_CpsTryHandle(_Site.ID, TryID, _User.ID, (short)-1, 0, false, false, ref ReturnValue, ref ReturnDescription);

            if (Result < 0)
            {
                PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().FullName);

                return;
            }

            if (ReturnValue < 0)
            {
                Shove._Web.JavaScript.Alert(this.Page, ReturnDescription);

                return;
            }

            Shove._Web.JavaScript.Alert(this.Page, "代理商申请已经拒绝。");
        } break;

        case "Deletes":
        {
            DAL.Tables.T_CpsTrys cps = new DAL.Tables.T_CpsTrys();

            cps.Delete("ID=" + TryID.ToString());
        } break;
        }

        Shove._Web.Cache.ClearCache("Cps_Administrator_CpsTry");
        BindData();
    }
示例#7
0
    private void BindData()
    {
        this.ddlImage.Items.Clear();
        this.ddlImage.Items.Add("--选择图片--");
        string path = base.Server.MapPath("../Private/" + base._Site.ID.ToString() + "/FriendshipLinks");

        if (!Directory.Exists(path))
        {
            Directory.CreateDirectory(path);
        }
        else
        {
            string[] fileList = Shove._IO.File.GetFileList(path);
            if (fileList != null)
            {
                for (int i = 0; i < fileList.Length; i++)
                {
                    this.ddlImage.Items.Add(fileList[i]);
                }
            }
        }
        long num2 = _Convert.StrToLong(Utility.GetRequest("id"), -1L);

        if (num2 < 0L)
        {
            PF.GoError(1, "参数错误", this.Page.GetType().BaseType.FullName);
        }
        else
        {
            this.tbID.Text = num2.ToString();
            DataTable table = new Tables.T_FriendshipLinks().Open("", "SiteID = " + base._Site.ID.ToString() + " and [ID] = " + num2.ToString(), "");
            if (table == null)
            {
                PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName);
            }
            else
            {
                this.tbName.Text      = table.Rows[0]["LinkName"].ToString();
                this.cbisShow.Checked = _Convert.StrToBool(table.Rows[0]["isShow"].ToString(), true);
                this.tbOrder.Text     = table.Rows[0]["Order"].ToString();
                this.tbUrl.Text       = table.Rows[0]["Url"].ToString();
                ControlExt.SetDownListBoxText(this.ddlImage, table.Rows[0]["LogoUrl"].ToString());
            }
        }
    }
示例#8
0
    private void BindUserAccount()
    {
        string   request = Utility.GetRequest("dt");
        DateTime now     = DateTime.Now;
        DateTime toTime  = DateTime.Now;

        try
        {
            now    = Convert.ToDateTime(request + " 0:0:0");
            toTime = now.AddDays(1.0);
        }
        catch
        {
            JavaScript.Alert(this.Page, "参数出错!");
            return;
        }
        string    key = string.Concat(new object[] { "Home_Room_MyPromotion_UserPromotionDetail_", base._User.ID, "_", now.ToString("yyyyMMdd"), toTime.ToString("yyyyMMdd") });
        DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key);

        if (cacheAsDataTable == null)
        {
            int     returnValue       = -1;
            string  returnDescription = "";
            DataSet ds = null;
            if (Procedures.P_CpsGetCommendMemberBuyDetail(ref ds, base._Site.ID, base._User.ID, -1L, now, toTime, ref returnValue, ref returnDescription) < 0)
            {
                PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName);
                return;
            }
            if (returnValue < 0)
            {
                JavaScript.Alert(this.Page, returnDescription);
                return;
            }
            if ((ds == null) || (ds.Tables.Count < 1))
            {
                PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName);
                return;
            }
            cacheAsDataTable = ds.Tables[0];
            Shove._Web.Cache.SetCache(key, cacheAsDataTable);
        }
        PF.DataGridBindData(this.g, cacheAsDataTable, this.gPager);
        this.gPager.Visible = this.g.PageCount > 1;
    }
 private void BindHistoryData()
 {
     if (this.ddlIsuse.Items.Count < 0)
     {
         JavaScript.Alert(this.Page, "请选择彩种、玩法和期号。");
     }
     else
     {
         string condition = " [UserID] = " + base._User.ID.ToString();
         if (this.ddlLottery.SelectedValue != "-1")
         {
             condition = condition + " and LotteryID=" + _Convert.StrToInt(this.ddlLottery.SelectedValue, -1).ToString();
         }
         if (this.ddlIsuse.SelectedValue == "-1")
         {
             condition = condition + " and EndTime < GetDate()";
         }
         else
         {
             condition = condition + " and IsuseID=" + _Convert.StrToLong(this.ddlIsuse.SelectedValue, -1L).ToString();
         }
         if (this.ddlPlayType.SelectedValue != "-1")
         {
             condition = condition + " and PlayTypeID = " + _Convert.StrToInt(this.ddlPlayType.SelectedValue, -1).ToString();
         }
         string    key = "InvestHistory_" + condition;
         DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key);
         if (cacheAsDataTable == null)
         {
             cacheAsDataTable = new Views.V_BuyDetailsWithQuashedAll().Open("*", condition, "[DateTime] desc, [ID]");
             if (cacheAsDataTable == null)
             {
                 PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName);
                 return;
             }
             Shove._Web.Cache.SetCache(key, cacheAsDataTable, 60);
         }
         PF.DataGridBindData(this.gHistory, cacheAsDataTable, this.gPagerHistory);
         this.gPagerHistory.Visible  = true;
         this.lblPageBuySum.Text     = PF.GetSumByColumn(cacheAsDataTable, 10, true, this.gPagerHistory.PageSize, this.gPagerHistory.PageIndex).ToString("N");
         this.lblPageRewardSum.Text  = PF.GetSumByColumn(cacheAsDataTable, 8, true, this.gPagerHistory.PageSize, this.gPagerHistory.PageIndex).ToString("N");
         this.lblTotalBuySum.Text    = PF.GetSumByColumn(cacheAsDataTable, 10, false, this.gPagerHistory.PageSize, this.gPagerHistory.PageIndex).ToString("N");
         this.lblTotalRewardSum.Text = PF.GetSumByColumn(cacheAsDataTable, 8, false, this.gPagerHistory.PageSize, this.gPagerHistory.PageIndex).ToString("N");
     }
 }
 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();
         }
     }
 }
示例#11
0
 private void BindDataInvestHistory()
 {
     if (base._User != null)
     {
         string    key = "Home_Room_Invest_BindHistoryData" + base._User.ID.ToString();
         DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key);
         if (cacheAsDataTable == null)
         {
             StringBuilder builder = new StringBuilder();
             builder.Append("select * from (select LotteryID,LotteryName,PlayTypeID,InitiateName,PlayTypeName, ").Append("SchemeShare,a.Money,b.Share,b.DetailMoney,SchemeWinMoney, b.WinMoneyNoWithTax,a.DateTime, ").Append("b.SchemeID,QuashStatus,Buyed,AssureMoney,BuyedShare,IsOpened,c.Memo  from   ").Append("(select UserID,SchemeID,SUM(Share) as Share,SUM(DetailMoney) as DetailMoney, ").Append("sum(WinMoneyNoWithTax) as  WinMoneyNoWithTax  from V_BuyDetailsWithQuashedAll   ").Append("where  UserID = " + base._User.ID.ToString() + " and InitiateUserID = UserID group by SchemeID,UserID)b ").Append("left join (select * from V_BuyDetailsWithQuashedAll where UserID = " + base._User.ID.ToString() + " and   ").Append("UserID = InitiateUserID and isWhenInitiate = 1)a ").Append("on a.UserID = b.UserID and ").Append("a.SchemeID = b.SchemeID  left join (select SchemeID,Memo from T_UserDetails where ").Append("OperatorType = 9 and UserID = " + base._User.ID.ToString() + ") c  ").Append("on b.SchemeID = c.SchemeID union select  LotteryID,LotteryName,PlayTypeID,InitiateName, ").Append("PlayTypeName,SchemeShare,a.Money,Share,DetailMoney,SchemeWinMoney, WinMoneyNoWithTax, ").Append("a.DateTime,a.SchemeID,QuashStatus,Buyed,AssureMoney,BuyedShare,IsOpened,b.Memo from  ").Append("(select * from V_BuyDetailsWithQuashedAll where UserID = " + base._User.ID.ToString() + " and UserID<>InitiateUserID) a left join (select SchemeID,Memo from T_UserDetails where  ").Append("OperatorType = 9 and UserID = " + base._User.ID.ToString() + ")b on a.SchemeID = b.SchemeID)a order by DateTime desc");
             cacheAsDataTable = MSSQL.Select(builder.ToString(), new MSSQL.Parameter[0]);
             if (cacheAsDataTable == null)
             {
                 PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName);
                 return;
             }
             Shove._Web.Cache.SetCache(key, cacheAsDataTable, 60);
         }
         this.gInvestHistory.DataSource = cacheAsDataTable;
         this.gInvestHistory.DataBind();
         this.lblBuySum.Text        = PF.GetSumByColumn(cacheAsDataTable, 8, false, this.gInvestHistory.PageSize, this.gPagerHistory.PageIndex).ToString("N");
         this.lblSumWinMoney.Text   = PF.GetSumByColumn(cacheAsDataTable, 9, false, this.gInvestHistory.PageSize, this.gPagerHistory.PageIndex).ToString("N");
         this.lblMySumWinMoney.Text = PF.GetSumByColumn(cacheAsDataTable, 10, false, this.gInvestHistory.PageSize, this.gPagerHistory.PageIndex).ToString("N");
         double num10 = _Convert.StrToDouble(this.lblSumWinMoney.Text, 0.0);
         double num11 = _Convert.StrToDouble(this.lblBuySum.Text, 0.0);
         double num12 = num10 - num11;
         if (num12 <= 0.0)
         {
             this.lblSumWinProfitPoints.Text = "0.00";
         }
         else
         {
             double num13 = num12 / num11;
             if (num13 > 1.0)
             {
                 this.lblSumWinProfitPoints.Text = Math.Round(num13, 2).ToString("N") + "倍";
             }
             else
             {
                 this.lblSumWinProfitPoints.Text = ((Math.Round(num13, 2) * 100.0)).ToString("N") + "%";
             }
         }
         this.lbgInvestHistoryMessage.Text = "显示 10 条,共 " + cacheAsDataTable.Rows.Count.ToString() + " 条记录 ,<span class=\"blue12_line\"><a  href='InvestHistory.aspx'>[查看全部记录]</a></span>";
     }
 }
 private void BindData()
 {
     if (this.ddlIsuse.Items.Count >= 1)
     {
         DataTable table = new Views.V_Schemes().Open("", "IsuseID = " + Utility.FilteSqlInfusion(this.ddlIsuse.SelectedValue) + " and Buyed = 1 and SchemeIsOpened = 0", "");
         if (table == null)
         {
             PF.GoError(4, "数据库繁忙,请重试", "Admin_OpenManual");
         }
         else
         {
             table.Columns.Add("LocateWaysAndMultiples", Type.GetType("System.String"));
             if (this.ddlIsuse.SelectedValue == "45")
             {
                 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");
                     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.DefaultView;
             this.g.DataBind();
         }
     }
 }
示例#13
0
    private void BindChaseComboData()
    {
        string Key = "Home_Room_ViewChase_BindChaseComboData" + _User.ID.ToString() + tbTitle.Text;

        DataTable dt = Shove._Web.Cache.GetCacheAsDataTable(Key);

        if (dt == null)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("select a.ID,Name, DateTime,IsuseCount,IsuseCount*Multiple*Nums*Price as SumMoney,Money,QuashStatus,ExecutedCount,")
            .Append("IsuseCount-ExecutedCount as NoExecutedCount,Title from T_Chases a inner join T_Lotteries b ")
            .Append("on a.LotteryID = b.ID  and a.UserID = " + _User.ID.ToString() + " ");
            if (tbTitle.Text != "")
            {
                sb.Append("and Title like '%" + Shove._Web.Utility.FilteSqlInfusion(tbTitle.Text) + "%'");
            }

            sb.Append("  left join (select ChaseID,count(SchemeID) as ExecutedCount from  T_ExecutedChases group by ChaseID)c on a.ID = c.ChaseID");

            dt = Shove.Database.MSSQL.Select(sb.ToString());

            if (dt == null)
            {
                PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);

                return;
            }

            Shove._Web.Cache.SetCache(Key, dt);
        }

        PF.DataGridBindData(g2, dt, gPager2);

        gPager2.Visible = true;

        double money = 0;

        foreach (DataRow dr in dt.Rows)
        {
            money += Shove._Convert.StrToDouble(dr["SumMoney"].ToString(), 0);
        }

        this.lblTotalMoney.Text = money.ToString("N");
    }
    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");
            }
        }
    }
    /// <summary>
    /// 绑定定制的跟单记录
    /// </summary>
    private void BindData()
    {
        string Condition = " a.[UserID] = " + _User.ID.ToString() + "  and StartTime < GetDate() ";

        if (ddlLottery.SelectedValue != "-1")
        {
            Condition += " and LotteryID=" + Shove._Convert.StrToInt(ddlLottery.SelectedValue, -1).ToString() + "";
        }

        if (ddlPlayType.SelectedValue != "-1")
        {
            Condition += " and PlayTypeID = " + Shove._Convert.StrToInt(ddlPlayType.SelectedValue, -1).ToString();
        }

        if (Condition != "")
        {
            Condition += " and isAutoFollowScheme = 1";
        }
        else
        {
            Condition = "isAutoFollowScheme = 1";
        }


        DataTable dt = Shove.Database.MSSQL.Select("select a.*,b.Memo  from V_BuyDetailsWithQuashedAll a left join (select Memo,SchemeID from T_UserDetails where OperatorType = 9)b on a.SchemeID = b.SchemeID where  " + Condition + " order by a.ID desc");

        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Room_InvestHistory");

            return;
        }

        PF.DataGridBindData(g, dt, gPager);

        gPager.Visible = true;

        //本页记录
        this.lblPageBuyMoney.Text = PF.GetSumByColumn(dt, 10, true, gPager.PageSize, gPager.PageIndex).ToString("N");
        this.lblPageReward.Text   = PF.GetSumByColumn(dt, 8, true, gPager.PageSize, gPager.PageIndex).ToString("N");

        //总记录
        this.lblTotalBuyMoney.Text = PF.GetSumByColumn(dt, 10, false, gPager.PageSize, gPager.PageIndex).ToString("N");
        this.lblTotalReward.Text   = PF.GetSumByColumn(dt, 8, false, gPager.PageSize, gPager.PageIndex).ToString("N");
    }
示例#16
0
 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);
             }
             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);
         }
     }
 }
示例#17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //BindData();

        if (!this.IsPostBack)
        {
            labUserName.Text = _User.Name;

            long QuestionID = Shove._Convert.StrToLong(Shove._Web.Utility.GetRequest("id"), 0);

            if (QuestionID > 0)
            {
                DataTable dt = new DAL.Views.V_Questions().Open("", "id = " + QuestionID.ToString(), "");

                if (dt == null || dt.Rows.Count == 0)
                {
                    PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Room_QuestionList");

                    return;
                }

                if (dt.Rows.Count > 0)
                {
                    labContent.Text = dt.Rows[0]["Content"].ToString();
                    labAnswer.Text  = dt.Rows[0]["Answer"].ToString();

                    short AnswerStatus = Shove._Convert.StrToShort(dt.Rows[0]["AnswerStatus"].ToString(), 0);
                    if (AnswerStatus == 0)
                    {
                        labAnswerDateTime.Text = "未答复";
                    }
                    else if (AnswerStatus == 1)
                    {
                        labAnswerDateTime.Text = "处理中";
                    }
                    else
                    {
                        labAnswerDateTime.Text = "(答复时间:" + dt.Rows[0]["AnswerDateTime"].ToString() + ")";
                    }
                }
            }

            btnType_1_Click(btnType_1, e);
        }
    }
示例#18
0
    private void PopNews()
    {
        if (_User == null)
        {
            return;
        }

        string CacheKeyName = "Get_Win_Info_" + _User.ID.ToString();

        DataTable dt = Shove._Web.Cache.GetCacheAsDataTable("Get_Win_Info_" + _User.ID.ToString());

        if (dt == null)
        {
            dt = new DAL.Views.V_BuyDetails().Open("top 1 LotteryName,IsuseName,WinLotteryNumber,LotteryNumber,WinMoneyNoWithTax", "IsOpened = 1 and UserID = " + _User.ID, "ID DESC");

            if (dt == null)
            {
                PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试(537)", this.GetType().FullName);

                return;
            }
            Shove._Web.Cache.SetCache(CacheKeyName, dt, 300);
        }

        StringBuilder sb = new StringBuilder();

        sb.Append(_User.Name).Append(",");
        if (dt.Rows.Count != 0)
        {
            string SiteUrl = Shove._Web.Utility.GetUrl();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                sb.Append(dt.Rows[i]["LotteryName"].ToString()).Append("第")
                .Append(dt.Rows[i]["IsuseName"].ToString()).Append("期中奖号码是 ")
                .Append(dt.Rows[i]["WinLotteryNumber"].ToString())
                .Append(" 您投注的号码是")
                .Append(Shove._String.Cut(dt.Rows[i]["LotteryNumber"].ToString(), 15)).Append(" ,")
                .Append(Shove._Convert.StrToDouble(dt.Rows[i]["WinMoneyNoWithTax"].ToString(), 0) > 0 ? "<font style='color:red;'>中奖了</font>,希望您再接再厉,夺得更多奖金。" : "没有中奖,希望您继续努力,祝您早日中大奖。");
            }

            string FloatNotify = HmtlManage.GetHtml(AppDomain.CurrentDomain.BaseDirectory + "Home/Room/Template/FloatNotify.html");
            label1.Text = FloatNotify.Replace("$FloatNotifyContent$", sb.ToString());
        }
    }
示例#19
0
    private void BindDataForPlayType(string LotteryID)
    {
        this.ddlPlayType.Items.Clear();
        this.ddlPlayType.Items.Add(new ListItem("全部玩法", "-1"));
        DataTable table = new Views.V_PlayTypes().Open("ID,LotteryID,Name,LotteryName,BuyFileName", "LotteryID=" + LotteryID, "");

        if (table == null)
        {
            PF.GoError(1, "暂无玩法", base.GetType().FullName);
        }
        else
        {
            for (int i = 0; i < table.Rows.Count; i++)
            {
                this.ddlPlayType.Items.Add(new ListItem(table.Rows[i]["Name"].ToString(), table.Rows[i]["ID"].ToString()));
            }
        }
    }
示例#20
0
    /// <summary>
    /// 绑定站点公告
    /// </summary>
    private void GetSiteAffiches()
    {
        string    CacheKey = "SiteAffichesIndex";
        DataTable dt       = Shove._Web.Cache.GetCacheAsDataTable(CacheKey);

        if (dt == null)
        {
            dt = new DAL.Tables.T_SiteAffiches().Open("top 3 *", "SiteID = " + _Site.ID.ToString(), "[DateTime] desc");
            if (dt == null)
            {
                PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);
                return;
            }
        }
        RepSiteAffiches.DataSource = dt;
        RepSiteAffiches.DataBind();
        Shove._Web.Cache.SetCache(CacheKey, dt, 600);
    }
示例#21
0
    private void BindData(CheckBoxList list, string temp)
    {
        DataTable dt = new DAL.Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + (_Site.UseLotteryList == "" ? "-1" : _Site.UseLotteryList) + ") " + temp, "[Order]");

        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);

            return;
        }

        list.Items.Clear();

        foreach (DataRow dr in dt.Rows)
        {
            list.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString()));
        }
    }
示例#22
0
    private void BindDataForUser()
    {
        DataTable table = new Tables.T_Users().Open("[ID], [Name]", "SiteID = " + base._Site.ID.ToString() + " and [ID] in (select distinct UserID from T_CompetencesOfUsers union all select distinct UserID from T_UserInGroups)", "[ID]");

        if (table == null)
        {
            PF.GoError(4, "数据库繁忙,请重试", "Admin_SchemeList");
        }
        else
        {
            this.ddlUser.Items.Add(new ListItem("全部操作员", "-1"));
            foreach (DataRow row in table.Rows)
            {
                this.ddlUser.Items.Add(new ListItem(row["Name"].ToString(), row["ID"].ToString()));
            }
            this.ddlUser.SelectedIndex = 0;
        }
    }
    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 BindDataForNotificationType()
    {
        DataTable dt = new DAL.Tables.T_NotificationTypes().Open("[Name], [Code]", "", "[ID]");

        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_NotificationTemplates");

            return;
        }

        listTemplateFile.DataSource     = dt;
        listTemplateFile.DataTextField  = "Name";
        listTemplateFile.DataValueField = "Code";
        listTemplateFile.DataBind();

        listTemplateFile.SelectedIndex = 0;
    }
    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;
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ExpertsCommendID = Shove._Convert.StrToLong(Shove._Web.Utility.GetRequest("id"), 0);

        if (ExpertsCommendID <= 0)
        {
            PF.GoError(ErrorNumber.Unknow, "您访问的数据不存在,可能是参数错误或者内容已经被删除!", "Home_Room_ShowExpertsCommend");

            return;
        }

        tbExpertsCommendID.Text = ExpertsCommendID.ToString();

        if (!IsPostBack)
        {
            BindData();
        }
    }
 protected void btnOK_Click(object sender, EventArgs e)
 {
     if (this.ddlIsuse.Items.Count >= 1)
     {
         if ((this.fileVideo.Value != "") && (File.UploadFile(this.Page, this.fileVideo, "../Images/Video/", this.ddlIsuse.SelectedValue + ".avi", true, "video") < 0))
         {
             JavaScript.Alert(this.Page, "文件上传错误。");
         }
         else if (MSSQL.ExecuteNonQuery("update T_Isuses set OpenAffiche = @p1 where [ID] = " + this.ddlIsuse.SelectedValue, new MSSQL.Parameter[] { new MSSQL.Parameter("p1", SqlDbType.VarChar, 0, ParameterDirection.Input, this.tbOpenAffiche.Text) }) < 0)
         {
             PF.GoError(4, "数据库繁忙,请重试", base.GetType().FullName);
         }
         else
         {
             JavaScript.Alert(this.Page, "数据保存成功。");
         }
     }
 }
    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;
            }
        }
    }
示例#29
0
    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);
            }
        }
    }
示例#30
0
    private void BindSchemesFormulae()
    {
        DataTable dt = new DAL.Tables.T_SchemesFormulae().Open("", "LotteryID=" + HidLotteryID.Value, "");

        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_SchemesFormulaeSet");

            return;
        }

        if (dt.Rows.Count < 1)
        {
            return;
        }

        lbContent.Text = " 1、 方案金额大于等于" + Shove._Convert.StrToDouble(dt.Rows[0]["Money"].ToString(), 0).ToString("N") + "元<br />2、 进度或者进度+保底大于等于" + dt.Rows[0]["Schedule"].ToString() + "%<br />3、 进度不少于方案总金额的" + dt.Rows[0]["MinMoney"].ToString() + "%";
    }