Beispiel #1
0
    private void BindData()
    {
        if (ddlYear.Items.Count == 0)
        {
            return;
        }

        long UserID = Shove._Convert.StrToLong(tbID.Text, -1);

        DataTable dt;

        if (tbID.Text == "-1")
        {
            dt = new DAL.Views.V_UserDetails().Open("", "SiteID = " + _Site.ID.ToString() + " and OperatorType = dbo.F_GetDetailsOperatorType('中奖') and year([DateTime]) = " + Shove._Web.Utility.FilteSqlInfusion(ddlYear.SelectedValue) + " and month([DateTime]) = " + Shove._Web.Utility.FilteSqlInfusion(ddlMonth.SelectedValue), "[DateTime] desc");
        }
        else
        {
            dt = new DAL.Views.V_UserDetails().Open("", "SiteID = " + _Site.ID.ToString() + " and UserID = " + UserID.ToString() + " and OperatorType = dbo.F_GetDetailsOperatorType('中奖') and year([DateTime]) = " + Shove._Web.Utility.FilteSqlInfusion(ddlYear.SelectedValue) + " and month([DateTime]) = " + Shove._Web.Utility.FilteSqlInfusion(ddlMonth.SelectedValue), "[DateTime] desc");
        }

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

            return;
        }

        PF.DataGridBindData(g, dt, gPager);
    }
Beispiel #2
0
    private void BindData()
    {
        if (ddlYear.Items.Count == 0)
        {
            return;
        }

        long UserID = Shove._Convert.StrToLong(tbID.Text, -1);

        DataTable dt;

        if (tbID.Text == "-1")
        {
            dt = new DAL.Views.V_UserDetails().Open("", "SiteID = " + _Site.ID.ToString() + " and OperatorType = dbo.F_GetDetailsOperatorType('中奖') and year([DateTime]) = " +  Shove._Web.Utility.FilteSqlInfusion(ddlYear.SelectedValue) + " and month([DateTime]) = " +  Shove._Web.Utility.FilteSqlInfusion(ddlMonth.SelectedValue), "[DateTime] desc");
        }
        else
        {
            dt = new DAL.Views.V_UserDetails().Open("", "SiteID = " + _Site.ID.ToString() + " and UserID = " + UserID.ToString() + " and OperatorType = dbo.F_GetDetailsOperatorType('中奖') and year([DateTime]) = " +  Shove._Web.Utility.FilteSqlInfusion(ddlYear.SelectedValue) + " and month([DateTime]) = " +  Shove._Web.Utility.FilteSqlInfusion(ddlMonth.SelectedValue), "[DateTime] desc");
        }

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

            return;
        }

        PF.DataGridBindData(g, dt, gPager);
    }
 private void BindData()
 {
     if (this.ddlYear.Items.Count != 0)
     {
         DataTable table;
         long num = _Convert.StrToLong(this.tbID.Text, -1L);
         if (this.tbID.Text == "-1")
         {
             table = new Views.V_UserDetails().Open("", "SiteID = " + base._Site.ID.ToString() + " and OperatorType = dbo.F_GetDetailsOperatorType('中奖') and year([DateTime]) = " + Utility.FilteSqlInfusion(this.ddlYear.SelectedValue) + " and month([DateTime]) = " + Utility.FilteSqlInfusion(this.ddlMonth.SelectedValue), "[DateTime] desc");
         }
         else
         {
             table = new Views.V_UserDetails().Open("", "SiteID = " + base._Site.ID.ToString() + " and UserID = " + num.ToString() + " and OperatorType = dbo.F_GetDetailsOperatorType('中奖') and year([DateTime]) = " + Utility.FilteSqlInfusion(this.ddlYear.SelectedValue) + " and month([DateTime]) = " + Utility.FilteSqlInfusion(this.ddlMonth.SelectedValue), "[DateTime] desc");
         }
         if (table == null)
         {
             PF.GoError(4, "数据库繁忙,请重试", "Admin_FinanceWin");
         }
         else
         {
             PF.DataGridBindData(this.g, table, this.gPager);
         }
     }
 }