Ejemplo n.º 1
0
    /// <summary>
    /// 绑定专家列表
    /// </summary>
    public void GetFCExpertList()
    {
        string    Key = "FCExpert";
        DataTable dt  = Shove._Web.Cache.GetCacheAsDataTable(Key);

        if (dt == null || dt.Rows.Count == 0)
        {
            dt = new DAL.Views.V_Experts().Open("top 10 UserName,UserID,LotteryName,LotteryID", "[ON]=1 and [isCanIssued]=1", "");

            if (dt != null)
            {
                dt.Columns.Add("ID", typeof(int));

                int i = 1;

                foreach (DataRow dr in dt.Rows)
                {
                    dr["ID"] = i;

                    i++;
                }
                Shove._Web.Cache.SetCache(Key, dt, 60);
            }
        }
        dTFCExpert.DataSource = dt;
        dTFCExpert.DataBind();
    }
Ejemplo n.º 2
0
    private void BindData()
    {
        string UseLotteriesList = DAL.Functions.F_GetExpertsLotteryList(_Site.ID, _User.ID);

        if (UseLotteriesList == "")
        {
            PF.GoError(ErrorNumber.NoData, "没有您的相关数据或者您的申请还未处理", this.GetType().BaseType.FullName);

            return;
        }

        DataTable dt = new DAL.Views.V_Experts().Open("ID,LotteryName", "UserID = " + _User.ID.ToString() + " and LotteryID in (" + UseLotteriesList + ")", "");

        if ((dt == null) || (dt.Rows.Count == 0))
        {
            PF.GoError(ErrorNumber.NoData, "没有您的相关数据或者您的申请还未处理", this.GetType().BaseType.FullName);

            return;
        }

        long ID = Shove._Convert.StrToLong(Shove._Web.Utility.GetRequest("ID"), -1);

        Shove.ControlExt.FillDropDownList(ddlExperts, dt, "LotteryName", "ID");

        if (ID > 0)
        {
            Shove.ControlExt.SetDownListBoxTextFromValue(ddlExperts, ID.ToString());
        }

        ddlExperts_SelectedIndexChanged(ddlExperts, new EventArgs());
    }
Ejemplo n.º 3
0
    public DataTable GetFCExpertListCache(int lID)
    {
        DataTable dt = Shove._Web.Cache.GetCacheAsDataTable("FCExpert" + lID);

        if (dt == null || dt.Rows.Count == 0)
        {
            dt = new DAL.Views.V_Experts().Open("UserName,UserID,LotteryName,LotteryID", "[ON]=1 and [isCommend]=1 and LotteryID =" + lID, "");

            if (dt != null)
            {
                dt.Columns.Add("ID", typeof(int));

                int i = 1;

                foreach (DataRow dr in dt.Rows)
                {
                    dr["ID"] = i;

                    i++;
                }

                Shove._Web.Cache.SetCache("FCExpert" + lID, dt, 60);
            }
        }

        return(dt);
    }
Ejemplo n.º 4
0
    private void BindData()
    {
        labName.Text     = _User.Name;
        labUserType.Text = ((_User.UserType == 1) ? "普通用户" : "高级用户");
        labLevel.Text    = _User.Level.ToString();

        string UseLotteriesList = DAL.Functions.F_GetExpertsLotteryList(_Site.ID, _User.ID);

        if (UseLotteriesList == "")
        {
            labExpertsList.Text = "<font color='red'>您还不是任何彩种的专家!</font>";

            return;
        }

        DataTable dt = new DAL.Views.V_Experts().Open("ID,LotteryName,[DateTime],MaxPrice,BonusScale,Level", "UserID = " + _User.ID.ToString() + " and LotteryID in (" + UseLotteriesList + ")", "");

        if ((dt == null) || (dt.Rows.Count == 0))
        {
            labExpertsList.Text = "<font color='red'>您还不是任何彩种的专家!</font>";

            return;
        }

        g.DataSource = dt;
        g.DataBind();
    }
Ejemplo n.º 5
0
    private void BindData()
    {
        if (ddlLottery.Items.Count < 1)
        {
            return;
        }

        DataTable dt = new DAL.Views.V_Experts().Open("", "SiteID = " + _Site.ID.ToString() + (ddlLottery.SelectedValue == "0" ? "" : " and LotteryID = " + Shove._Web.Utility.FilteSqlInfusion(ddlLottery.SelectedValue)), "");

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

            return;
        }

        PF.DataGridBindData(g, dt, gPager);
    }
Ejemplo n.º 6
0
    private void MoreThanExpertsMaxPrice(long ExpertsID)
    {
        DataTable dt = new DAL.Views.V_Experts().Open("MaxPrice", "ID = " + ExpertsID, "");

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

            return;
        }

        if (dt.Rows.Count == 0)
        {
            PF.GoError(ErrorNumber.NoData, "暂无数据", this.GetType().BaseType.FullName);

            return;
        }

        double MaxPrice1 = Math.Round(double.Parse(dt.Rows[0][0].ToString()), 2);

        labMaxPrice.Text = MaxPrice1.ToString();
    }
Ejemplo n.º 7
0
    private void ddlExpertsBindData()
    {
        string UseLotteriesList = DAL.Functions.F_GetExpertsLotteryList(_Site.ID, _User.ID);

        if (UseLotteriesList == "")
        {
            PF.GoError(ErrorNumber.NoData, "没有您的相关数据或者您的申请还未处理", "Room_ExpertsCommendsList");

            return;
        }

        DataTable dt = new DAL.Views.V_Experts().Open("ID,LotteryName", "UserID = " + _User.ID.ToString() + " and LotteryID in (" + UseLotteriesList + ")", "");

        if ((dt == null) || (dt.Rows.Count == 0))
        {
            PF.GoError(ErrorNumber.NoData, "没有您的相关数据或者您的申请还未处理", "Room_ExpertsCommendsList");

            return;
        }

        Shove.ControlExt.FillDropDownList(ddlExperts, dt, "LotteryName", "ID");

        ddlExperts_SelectedIndexChanged(ddlExperts, new EventArgs());
    }
Ejemplo n.º 8
0
    public DataTable GetFCExpertListCache(int lID)
    {
        DataTable dt = Shove._Web.Cache.GetCacheAsDataTable("FCExpert" + lID);

        if (dt == null || dt.Rows.Count == 0)
        {
            dt = new DAL.Views.V_Experts().Open("UserName,UserID,LotteryName,LotteryID", "[ON]=1 and [isCommend]=1 and LotteryID =" + lID, "");

            if (dt != null)
            {
                dt.Columns.Add("ID", typeof(int));

                int i = 1;

                foreach (DataRow dr in dt.Rows)
                {
                    dr["ID"] = i;

                    i++;
                }

                Shove._Web.Cache.SetCache("FCExpert" + lID, dt, 60);
            }
        }

        return dt;
    }
Ejemplo n.º 9
0
 public DataTable GetFCExpertListCache(int lID)
 {
     DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable("FCExpert" + lID);
     if ((cacheAsDataTable == null) || (cacheAsDataTable.Rows.Count == 0))
     {
         cacheAsDataTable = new Views.V_Experts().Open("UserName,UserID,LotteryName,LotteryID", "[ON]=1 and [isCommend]=1 and LotteryID =" + lID, "");
         if (cacheAsDataTable == null)
         {
             return cacheAsDataTable;
         }
         cacheAsDataTable.Columns.Add("ID", typeof(int));
         int num = 1;
         foreach (DataRow row in cacheAsDataTable.Rows)
         {
             row["ID"] = num;
             num++;
         }
         Shove._Web.Cache.SetCache("FCExpert" + lID, cacheAsDataTable, 60);
     }
     return cacheAsDataTable;
 }
Ejemplo n.º 10
0
 private void BindData()
 {
     if (this.ddlLottery.Items.Count >= 1)
     {
         DataTable dt = new Views.V_Experts().Open("", "SiteID = " + base._Site.ID.ToString() + ((this.ddlLottery.SelectedValue == "0") ? "" : (" and LotteryID = " + Utility.FilteSqlInfusion(this.ddlLottery.SelectedValue))), "");
         if (dt == null)
         {
             PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName);
         }
         else
         {
             PF.DataGridBindData(this.g, dt, this.gPager);
         }
     }
 }