private void BindData(bool IsReload)
    {
        string    key = "Admin_UserDistillWaitPay_" + this.tbBeginTime.Text + "_" + this.tbEndTime.Text;
        DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key);

        if ((cacheAsDataTable == null) || IsReload)
        {
            cacheAsDataTable = new Views.V_UserDistills().Open("", "Result=10 and SiteID = " + base._Site.ID.ToString(), "[DateTime] desc");
            Shove._Web.Cache.SetCache(key, cacheAsDataTable);
        }
        if (cacheAsDataTable == null)
        {
            PF.GoError(4, "数据库繁忙,请重试", "Admin_FinanceDistill");
        }
        else
        {
            string   filterCondition = this.GetFilterCondition();
            DataView dv = new DataView(cacheAsDataTable, filterCondition, "[DateTime] desc", DataViewRowState.OriginalRows);
            PF.DataGridBindData(this.g, dv, this.gPager);
            for (int i = 0; i < this.g.Columns.Count; i++)
            {
                if ((((this.g.Columns[i].HeaderText == "提款银行卡帐号") || (this.g.Columns[i].HeaderText == "开户银行")) || ((this.g.Columns[i].HeaderText == "支行名称") || (this.g.Columns[i].HeaderText == "所在省"))) || ((this.g.Columns[i].HeaderText == "所在市") || (this.g.Columns[i].HeaderText == "持卡人姓名")))
                {
                    this.g.Columns[i].Visible = (this.hfCurPayType.Value == "所有") || (this.hfCurPayType.Value == "银行卡");
                }
                else if (this.g.Columns[i].HeaderText == "支付宝账号")
                {
                    this.g.Columns[i].Visible = true;
                    this.g.Columns[i].Visible = (this.hfCurPayType.Value == "所有") || (this.hfCurPayType.Value == "支付宝");
                }
            }
        }
    }
Exemple #2
0
    private void BindData()
    {
        string    sql = @"select ID,Title,Content,TypeName from V_News  where TypeId in (" + Newsid + ")";
        DataTable dt  = Shove.Database.MSSQL.Select(sql);

        PF.DataGridBindData(RepTitle, dt, gPager);
    }
Exemple #3
0
    private void BindChaseComboData()
    {
        string    key = "Home_Room_ViewChase_BindChaseComboData" + base._User.ID.ToString() + this.tbTitle.Text;
        DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key);

        if (cacheAsDataTable == null)
        {
            StringBuilder builder = new StringBuilder();
            builder.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 = " + base._User.ID.ToString() + " ");
            if (this.tbTitle.Text != "")
            {
                builder.Append("and Title like '%" + Utility.FilteSqlInfusion(this.tbTitle.Text) + "%'");
            }
            builder.Append("  left join (select ChaseID,count(SchemeID) as ExecutedCount from  T_ExecutedChases group by ChaseID)c on a.ID = c.ChaseID");
            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);
        }
        PF.DataGridBindData(this.g2, cacheAsDataTable, this.gPager2);
        this.gPager2.Visible = true;
        double num3 = 0.0;

        foreach (DataRow row in cacheAsDataTable.Rows)
        {
            num3 += _Convert.StrToDouble(row["SumMoney"].ToString(), 0.0);
        }
        this.lblTotalMoney.Text = num3.ToString("N");
    }
Exemple #4
0
    private void BindData()
    {
        string    commandText = "select a.ID,Name,RealityName,IDCardNumber,Email,QQ,Telephone,Mobile,RegisterTime,BankName,BankCardNumber from  T_Users a \r\n  where   RegisterTime between '2009-10-01 00:00:00' and '2009-10-08 23:59:59' and ID in(select UserID from T_UserPayDetails where Money >= 60 and DateTime  between '2009-10-01 00:00:00' and '2009-10-08 23:59:59' and Result = 1)";
        DataTable dt          = MSSQL.Select(commandText, new MSSQL.Parameter[0]);

        PF.DataGridBindData(this.g, dt, this.gPager);
    }
Exemple #5
0
    private void BindData()
    {
        string Key = "Admin_ChaseList_BindData_" + ddlType.SelectedValue == "1" ? tbID.Text : ddlIsuses.SelectedValue;

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

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

            sb.Append("select '我的追号' as Type,ID,Name,DateTime,LotteryName,Title,SumMoney,SumIsuseNum,BuyedIsuseNum,QuashedIsuseNum,QuashStatus,2 as StopType,StopWhenWinMoney  from V_ChaseTasksTotal ");

            if (ddlType.SelectedValue == "1")
            {
                sb.Append("where UserID=" + Shove._Web.Utility.FilteSqlInfusion(tbID.Text.Trim()) + " ");
            }
            else
            {
                sb.Append("where ID in(select ChaseTaskID from T_ChaseTaskDetails where IsuseID = " + ddlIsuses.SelectedValue + ") ");
            }

            sb.Append(" union  select '追号套餐' as Type,a.ID,d.Name,DateTime,b.Name,Title,IsuseCount*Multiple*Nums*Price as SumMoney,IsuseCount,ExecutedCount,")
            .Append(" IsuseCount-ExecutedCount as NoExecutedCount,QuashStatus,StopTypeWhenWin,StopTypeWhenWinMoney from T_Chases a inner join T_Lotteries b ")
            .Append(" on a.LotteryID = b.ID ");

            if (ddlType.SelectedValue == "1")
            {
                sb.Append("and UserID=" + Shove._Web.Utility.FilteSqlInfusion(tbID.Text.Trim()) + " ");
            }
            else
            {
                sb.Append("and (a.ID in (select ChaseID from T_ExecutedChases where SchemeID in(select ID from T_Schemes where IsuseID = " + ddlIsuses.SelectedValue + ")) ");

                if (new DAL.Tables.T_Isuses().GetCount("ID=" + ddlIsuses.SelectedValue + " and getdate() between StartTime and EndTime") > 0)
                {
                    sb.Append("or a.ID in (select ChaseID from T_ExecutedChases where QuashStatus = 0 and Money > 0 and LotteryID=" + ddlLottery.SelectedValue + "))");
                }
                else
                {
                    sb.Append(")");
                }
            }

            sb.Append("left join T_Users d on a.UserID = d.ID  ");
            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, "数据库繁忙,请重试", "Admin_ChaseList");

                return;
            }

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

        PF.DataGridBindData(g, dt, gPager);
    }
Exemple #6
0
    private void BindData()
    {
        string Key = "Admin_RecallingRecord_BindData";

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

        if (dt == null)
        {
            string sql = @"select b.ID,a.State,LotteryID,Level,InitiateUserID, LotteryName,InitiateName,Money,WinMoney,
                WinMoney/Money as Win from T_RecallingAllBuyStar a inner join V_Schemes  b 
                on a.SchemesID = b.ID and WinMoney>0 and Buyed = 1 and IsOpened = 1 and a.State = 0
                order by WinMoney desc ";

            dt = Shove.Database.MSSQL.Select(sql);

            if (dt == null)
            {
                return;
            }

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

        PF.DataGridBindData(g, dt, gPager);
    }
Exemple #7
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);
    }
Exemple #8
0
    private void BindHistoryData()
    {
        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);
        }
        PF.DataGridBindData(this.gHistory, cacheAsDataTable, this.gPagerHistory);
        int    num7 = 0;
        double num8 = 0.0;

        foreach (DataRow row in cacheAsDataTable.Rows)
        {
            if (row["QuashStatus"].ToString() == "0")
            {
                num7++;
                num8 += _Convert.StrToDouble(row["DetailMoney"].ToString(), 0.0);
            }
        }
        this.lblBuyOutCount.Text   = num7.ToString();
        this.lblBuyOutMoney.Text   = num8.ToString("N");
        this.gPagerHistory.Visible = true;
    }
    private void BindData(bool IsReload)
    {
        DataTable dt = dt = new DAL.Views.V_UserDistills().Open("", "IsCps=1 and Result=10 and SiteID = " + _Site.ID.ToString(), "[DateTime] desc");

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

            return;
        }

        string filterCondition = GetFilterCondition();

        DataView dv = new DataView(dt, filterCondition, "[DateTime] desc", DataViewRowState.OriginalRows);

        PF.DataGridBindData(g, dv, gPager);

        //根据条件显示或隐藏列
        for (int i = 0; i < g.Columns.Count; i++)
        {
            if (g.Columns[i].HeaderText == "提款银行卡帐号" || g.Columns[i].HeaderText == "开户银行" || g.Columns[i].HeaderText == "支行名称" ||
                g.Columns[i].HeaderText == "所在省" || g.Columns[i].HeaderText == "所在市" || g.Columns[i].HeaderText == "持卡人姓名")
            {
                g.Columns[i].Visible = (hfCurPayType.Value == "所有" || hfCurPayType.Value == "银行卡") ? true : false;
            }
            else if (g.Columns[i].HeaderText == "支付宝账号")
            {
                g.Columns[i].Visible = true;
                g.Columns[i].Visible = (hfCurPayType.Value == "所有" || hfCurPayType.Value == "支付宝") ? true : false;
            }
        }
    }
    private void BindData()
    {
        DateTime now    = DateTime.Now;
        DateTime result = DateTime.Now;

        if (!DateTime.TryParse(this.tbBeginTime.Text, out now) || !DateTime.TryParse(this.tbEndTime.Text, out result))
        {
            JavaScript.Alert(this.Page, "请输入正确的日期范围!");
        }
        else
        {
            string            commandText = "SELECT a.ID,a.SiteID,a.UserID,a.[DateTime], a.PayType,a.[Money],a.FormalitiesFees,a.Result, \r\n\t\t\t                        b.Name, b.RealityName, b.Sex, b.IDCardNumber, b.[Address], b.Email, b.QQ, b.Telephone, b.Mobile\r\n                        FROM dbo.T_UserPayDetails a INNER JOIN dbo.T_Users b ON a.UserID = b.ID \r\n                        where  a.[DateTime]>=@fromDate and a.[DateTime]<=@toDate ";
            MSSQL.Parameter[] paras       = new MSSQL.Parameter[3];
            paras[0] = new MSSQL.Parameter("@fromDate", SqlDbType.DateTime, 8, ParameterDirection.Input, now);
            paras[1] = new MSSQL.Parameter("@toDate", SqlDbType.DateTime, 8, ParameterDirection.Input, result);
            DataTable dt = null;
            if (!string.IsNullOrEmpty(this.tbName.Text.Trim()))
            {
                dt = MSSQL.Select(commandText + " and Name like '%" + Shove._Web.Utility.FilteSqlInfusion(this.tbName.Text.Trim()) + "%'", paras);
            }
            else
            {
                dt = MSSQL.Select(commandText, paras);
            }
            if (dt == null)
            {
                PF.GoError(4, "数据库繁忙,请重试", "Admin_UserForInitiateFollowSchemeTrys");
            }
            else
            {
                PF.DataGridBindData(this.g, dt, this.gPager);
            }
        }
    }
Exemple #11
0
    private void BindData()
    {
        DataTable dt;

        string condition = GetFilterCondition();

        dt = new DAL.Views.V_UserDistills().Open("", condition, "[DateTime] desc");
        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_FinanceDistill");

            return;
        }

        PF.DataGridBindData(g, dt, gPager);

        //根据条件显示或隐藏列
        for (int i = 0; i < g.Columns.Count; i++)
        {
            if (g.Columns[i].HeaderText == "提款银行卡帐号" || g.Columns[i].HeaderText == "开户银行" || g.Columns[i].HeaderText == "支行名称" ||
                g.Columns[i].HeaderText == "所在省" || g.Columns[i].HeaderText == "所在市" || g.Columns[i].HeaderText == "持卡人姓名")
            {
                g.Columns[i].Visible = (hfCurPayType.Value == "所有" || hfCurPayType.Value == "银行卡") ? true : false;
            }
            else if (g.Columns[i].HeaderText == "支付宝账号")
            {
                g.Columns[i].Visible = true;
                g.Columns[i].Visible = (hfCurPayType.Value == "所有" || hfCurPayType.Value == "支付宝") ? true : false;
            }
        }
    }
    private void BindData()
    {
        DataTable dt = Shove._Web.Cache.GetCacheAsDataTable(Shove._Web.WebConfig.GetAppSettingsString("SystemPreFix") + _Site.ID.ToString() + "ScoringDetail_" + _User.ID.ToString() + "_DateTime" + ddlYear.SelectedValue.ToString() + ddlMonth.SelectedValue.ToString());

        if (dt == null)
        {
            if (ddlYear.Items.Count < 1)
            {
                return;
            }

            int    ReturnValue       = 0;
            string ReturnDescription = "";

            DataSet ds = null;

            DAL.Procedures.P_GetUserScoringDetail(ref ds, _Site.ID, _User.ID, int.Parse(ddlYear.SelectedValue), int.Parse(ddlMonth.SelectedValue), ref ReturnValue, ref ReturnDescription);

            if ((ds == null) || (ds.Tables.Count < 1))
            {
                PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Home_Room_ScoringDetail");

                return;
            }

            dt = ds.Tables[0];

            Shove._Web.Cache.SetCache(Shove._Web.WebConfig.GetAppSettingsString("SystemPreFix") + _Site.ID.ToString() + "ScoringDetail_" + _User.ID.ToString() + "_DateTime" + ddlYear.SelectedValue.ToString() + ddlMonth.SelectedValue.ToString(), dt);
        }

        PF.DataGridBindData(g, dt, gPager);
    }
    private void BindData()
    {
        DataTable dt = new DAL.Tables.T_Users().Open("ID,SiteID ,Name ,RealityName, IDCardNumber ,Email ,QQ,Telephone , Mobile ,isCanLogin ,Reason", "SiteID = " + _Site.ID.ToString() + "and isCanLogin= 0", "");

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

            return;
        }

        DataTable dtData = dt.Clone();

        DataRow[] drs;

        if (rbUser.Checked)
        {
            drs = dt.Select("Reason is not null");
        }
        else
        {
            drs = dt.Select("Reason is null");
        }

        foreach (DataRow dr in drs)
        {
            dtData.Rows.Add(dr.ItemArray);
        }

        PF.DataGridBindData(g, dtData, gPager);
    }
Exemple #14
0
    private void BindData()
    {
        if (ddlYear.Items.Count == 0)
        {
            return;
        }

        int    ReturnValue       = -1;
        string ReturnDescription = "";

        DataSet ds      = null;
        int     Results = -1;

        Results = DAL.Procedures.P_GetAccount(ref ds, _Site.ID, int.Parse(ddlYear.SelectedValue), int.Parse(ddlMonth.SelectedValue), ref ReturnValue, ref ReturnDescription);

        if (Results < 0)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_FinanceAddMoney");

            return;
        }

        if (ReturnValue < 0)
        {
            PF.GoError(ErrorNumber.Unknow, ReturnDescription, "Admin_FinanceAddMoney");

            return;
        }

        PF.DataGridBindData(g, ds.Tables[0], gPager);
    }
    private void BindData()
    {
        DataTable table = new Tables.T_Users().Open("ID,SiteID ,Name ,RealityName, IDCardNumber ,Email ,QQ,Telephone , Mobile ,isCanLogin ,Reason", "SiteID = " + base._Site.ID.ToString() + "and isCanLogin= 0", "");

        if (table == null)
        {
            PF.GoError(4, "数据库繁忙,请重试", "Admin_Admin_UserLogOut");
        }
        else
        {
            DataRow[] rowArray;
            DataTable dt = table.Clone();
            if (this.rbUser.Checked)
            {
                rowArray = table.Select("Reason is not null");
            }
            else
            {
                rowArray = table.Select("Reason is null");
            }
            foreach (DataRow row in rowArray)
            {
                dt.Rows.Add(row.ItemArray);
            }
            PF.DataGridBindData(this.g, dt, this.gPager);
        }
    }
Exemple #16
0
    private void BindData()
    {
        DataTable dt = Shove._Web.Cache.GetCacheAsDataTable(_Site.ID.ToString() + "MemberChase" + _User.ID.ToString());

        string Condition = "[UserID] = " + _User.ID.ToString() + " and SiteID = " + _Site.ID;

        if (isDateValid())
        {
            Condition += " and Convert(datetime,[DateTime]) between '" + txtStartDate.Text + " 0:0:0' and '" + txtEndDate.Text + " 23:59:59'";
        }

        if (dt == null)
        {
            dt = new DAL.Views.V_ChaseTasksTotal().Open("", Condition, "[DateTime] desc");

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

                return;
            }

            Shove._Web.Cache.SetCache(_Site.ID.ToString() + "MemberChase" + _User.ID.ToString(), dt);
        }

        PF.DataGridBindData(g1, dt, gPager1);

        gPager1.Visible = true;

        this.lblPageBuyMoney.Text = PF.GetSumByColumn(dt, 12, true, gPager1.PageSize, gPager1.PageIndex).ToString("N");

        this.lblTotalBuyMoney.Text = PF.GetSumByColumn(dt, 12, false, gPager1.PageSize, gPager1.PageIndex).ToString("N");
    }
Exemple #17
0
    private void BindDuiZhangDanData(bool IsReload)
    {
        DateTime now    = DateTime.Now;
        DateTime result = DateTime.Now;

        if (((this.tbBeginTime.Text.Trim() != "") && (this.tbEndTime.Text.Trim() != "")) && (!DateTime.TryParse(this.tbBeginTime.Text.Trim(), out now) || !DateTime.TryParse(this.tbEndTime.Text.Trim() + " 23:59:59", out result)))
        {
            JavaScript.Alert(this.Page, "请输入正确的日期格式:2009-08-08");
        }
        else
        {
            string    key = "Admin_UserDistillGeneralLedger_" + now.ToString("yyyyMMdd") + result.ToString("yyyyMMdd");
            DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key);
            if ((cacheAsDataTable == null) || IsReload)
            {
                DataSet ds                = null;
                int     returnValue       = 0;
                string  returnDescription = "";
                if (Procedures.P_GetDistillStatisticByDistillType(ref ds, base._Site.ID, now, result, ref returnValue, ref returnDescription) < 0)
                {
                    PF.GoError(4, "数据读写错误", base.GetType().BaseType.FullName);
                    return;
                }
                if ((returnValue < 0) || (returnDescription != ""))
                {
                    JavaScript.Alert(this.Page, returnDescription);
                    return;
                }
                cacheAsDataTable = ds.Tables[0];
                Shove._Web.Cache.SetCache(key, cacheAsDataTable);
            }
            PF.DataGridBindData(this.dgDuiZhangDan, cacheAsDataTable);
            string    str3   = "Admin_UserDistillGeneralLedger_cacheKeyGetDistillMoneyAndAddMoney_" + now.ToString("yyyyMMdd") + result.ToString("yyyyMMdd");
            DataTable table2 = Shove._Web.Cache.GetCacheAsDataTable(str3);
            if ((table2 == null) || IsReload)
            {
                DataSet set2 = null;
                int     num2 = 0;
                string  str4 = "";
                if (Procedures.P_GetDistillMoneyAndAddMoney(ref set2, base._Site.ID, now, result, 0, ref num2, ref str4) < 0)
                {
                    PF.GoError(4, "数据读写错误", base.GetType().BaseType.FullName);
                    return;
                }
                if ((num2 < 0) || (str4 != ""))
                {
                    JavaScript.Alert(this.Page, str4);
                    return;
                }
                table2 = set2.Tables[0];
                Shove._Web.Cache.SetCache(str3, table2);
            }
            this.lblSumAddMoneyByDate1.Text        = _Convert.StrToDouble(table2.Rows[0]["SumAddMoneyByDate"].ToString(), 0.0).ToString("N2");
            this.lblSumAddMoney1.Text              = _Convert.StrToDouble(table2.Rows[0]["SumAddMoney"].ToString(), 0.0).ToString("N2");
            this.lblSumDistillMoneyByDate1.Text    = _Convert.StrToDouble(table2.Rows[0]["SumDistillMoneyByDate"].ToString(), 0.0).ToString("N2");
            this.lblSumDistillMoney1.Text          = _Convert.StrToDouble(table2.Rows[0]["SumDistillMoney"].ToString(), 0.0).ToString("N2");
            this.lblSumFormalitiesFeesByDate1.Text = _Convert.StrToDouble(table2.Rows[0]["SumFormalitiesFeesByDate"].ToString(), 0.0).ToString("N2");
            this.lblSumFormalitiesFees1.Text       = _Convert.StrToDouble(table2.Rows[0]["SumFormalitiesFees"].ToString(), 0.0).ToString("N2");
        }
    }
Exemple #18
0
    private void BindData()
    {
        string    filterCondition = this.GetFilterCondition();
        DataTable dt = new Views.V_UserDistills().Open("", filterCondition, "[DateTime] desc");

        if (dt == null)
        {
            PF.GoError(4, "数据库繁忙,请重试", "Admin_FinanceDistill");
        }
        else
        {
            PF.DataGridBindData(this.g, dt, this.gPager);
            for (int i = 0; i < this.g.Columns.Count; i++)
            {
                if ((((this.g.Columns[i].HeaderText == "提款银行卡帐号") || (this.g.Columns[i].HeaderText == "开户银行")) || ((this.g.Columns[i].HeaderText == "支行名称") || (this.g.Columns[i].HeaderText == "所在省"))) || ((this.g.Columns[i].HeaderText == "所在市") || (this.g.Columns[i].HeaderText == "持卡人姓名")))
                {
                    this.g.Columns[i].Visible = (this.hfCurPayType.Value == "所有") || (this.hfCurPayType.Value == "银行卡");
                }
                else if (this.g.Columns[i].HeaderText == "支付宝账号")
                {
                    this.g.Columns[i].Visible = true;
                    this.g.Columns[i].Visible = (this.hfCurPayType.Value == "所有") || (this.hfCurPayType.Value == "支付宝");
                }
            }
        }
    }
Exemple #19
0
    private void BindData()
    {
        string cacheKeyScaleList = "Cps_Admin_BonusScaleView_ScaleList_" + _User.ID.ToString();

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

        if (dt == null)
        {
            int     returnValue       = -1;
            string  returnDescription = "";
            DataSet ds     = null;
            int     Result = DAL.Procedures.P_CpsGetUserBonusScaleList(ref ds, _User.ID, ref returnValue, ref returnDescription);

            if (Result < 0)
            {
                Shove._Web.JavaScript.Alert(this.Page, "系统出错!");

                return;
            }
            if (ds == null || ds.Tables.Count < 1)
            {
                Shove._Web.JavaScript.Alert(this.Page, "获取数据出错!");

                return;
            }
            dt = ds.Tables[0];
            Shove._Web.Cache.SetCache(cacheKeyScaleList, dt, 100000);
        }

        PF.DataGridBindData(g, dt, gPager);
    }
Exemple #20
0
    private void BindData()
    {
        DataTable dt = new DAL.Tables.T_UnionLinkScale().Open("ID,UnionID,SiteLinkPID,BonusScale", "UnionID=" + _User.ID, "SiteLinkPID");

        DataTable dtLink = new DAL.Tables.T_Users().Open("distinct [Memo]", "Memo<>'' and CpsID=" + _User.cps.ID, "[Memo]");

        double scale = _Site.SiteOptions["BonusScale"].ToDouble(0.02);

        for (int i = 0; i < dtLink.Rows.Count; i++)
        {
            string    pid    = dtLink.Rows[i][0].ToString();
            DataRow[] drList = dt.Select("SiteLinkPID='" + pid + "'");
            if (drList.Length == 0)
            {
                DataRow dr = dt.NewRow();
                dr["ID"]          = 0;
                dr["UnionID"]     = _User.cps.ID;
                dr["SiteLinkPID"] = pid;
                dr["BonusScale"]  = scale;
                dt.Rows.Add(dr);
            }
        }

        DataTable dtTemp = GetNewDataTable(dt, "SiteLinkPID like '%" + tbPID.Text.Trim() + "%'");

        PF.DataGridBindData(g, dtTemp, gPager);
    }
Exemple #21
0
    private void BindData()
    {
        if (ddlIsuse.Items.Count < 1)
        {
            return;
        }

        string Cmd;

        if (cbUserApplication.Checked)
        {
            Cmd = "select * from V_SchemeSchedules where SiteID = " + _Site.ID.ToString() + " and IsuseID = " + ddlIsuse.SelectedValue + " and QuashStatus = 0 and Buyed = 0 and AtTopStatus = 1 order by [Money] desc";
        }
        else
        {
            Cmd = "select * from V_SchemeSchedules where SiteID = " + _Site.ID.ToString() + " and IsuseID = " + ddlIsuse.SelectedValue + " and QuashStatus = 0 and Buyed = 0 order by [Money] desc";
        }

        DataTable dt = MSSQL.Select(Cmd);

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

            return;
        }

        PF.DataGridBindData(g, dt, gPager);
    }
Exemple #22
0
    private void BindData()
    {
        DataTable dt = new DAL.Tables.T_ExpertsCommends().Open("", "SiteID = " + _Site.ID.ToString() + " and ExpertsID = " + Shove._Web.Utility.FilteSqlInfusion(ddlExperts.SelectedValue), "[DateTime] desc");

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

            return;
        }

        if (dt.Rows.Count > 0)
        {
            dt.Columns.Add("Number1", System.Type.GetType("System.String"));

            foreach (DataRow dr in dt.Rows)
            {
                try
                {
                    dr["Number1"] = dr["Number"];
                }
                catch
                {
                    dr["Number1"] = "";
                }

                dt.AcceptChanges();
            }
        }

        PF.DataGridBindData(g, dt, gPager);
    }
Exemple #23
0
    private void BindData(int Type)
    {
        DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable("MemberQuestionList_" + Type.ToString() + "_" + base._User.ID.ToString());

        if (cacheAsDataTable == null)
        {
            switch (Type)
            {
            case 1:
                cacheAsDataTable = new Views.V_Questions().Open("", "SiteID = " + base._Site.ID.ToString() + " and UserID = " + base._User.ID.ToString() + " and UseType = 1", "[DateTime] desc");
                break;

            case 2:
                cacheAsDataTable = new Views.V_Questions().Open("", "SiteID = " + base._Site.ID.ToString() + " and UserID = " + base._User.ID.ToString() + " and UseType = 1 and AnswerStatus = 0", "[DateTime] desc");
                break;

            case 3:
                cacheAsDataTable = new Views.V_Questions().Open("", "SiteID = " + base._Site.ID.ToString() + " and UserID = " + base._User.ID.ToString() + " and UseType = 1 and AnswerStatus = 1", "[DateTime] desc");
                break;
            }
            if (cacheAsDataTable == null)
            {
                PF.GoError(4, "数据库繁忙,请重试", base.GetType().FullName);
                return;
            }
            Shove._Web.Cache.SetCache("MemberQuestionList_" + Type.ToString() + "_" + base._User.ID.ToString(), cacheAsDataTable);
        }
        PF.DataGridBindData(this.g, cacheAsDataTable, this.gPager);
    }
 private void BindData()
 {
     if (this.ddlYear.Items.Count != 0)
     {
         long    userID            = _Convert.StrToLong(this.tbID.Text, -1L);
         int     returnValue       = -1;
         string  returnDescription = "";
         DataSet ds = null;
         if (Procedures.P_GetFinanceAddMoney(ref ds, base._Site.ID, userID, int.Parse(this.ddlYear.SelectedValue), int.Parse(this.ddlMonth.SelectedValue), ref returnValue, ref returnDescription) < 0)
         {
             PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName);
         }
         else if ((ds == null) || (ds.Tables.Count < 1))
         {
             PF.GoError(4, "数据库繁忙,请重试", "Admin_FinanceAddMoney");
         }
         else if (returnValue < 0)
         {
             PF.GoError(1, returnDescription, "Admin_FinanceAddMoney");
         }
         else
         {
             PF.DataGridBindData(this.g, ds.Tables[0], this.gPager);
         }
     }
 }
    private void BindData()
    {
        long ownerUserID = Shove._Convert.StrToLong(hfOwnerUserID.Value, -1);

        DataTable dt = Shove._Web.Cache.GetCacheAsDataTable(cacheKeyScaleList + ownerUserID);

        if (dt == null)
        {
            int     returnValue       = -1;
            string  returnDescription = "";
            DataSet ds = null;

            int Result = DAL.Procedures.P_CpsGetUserBonusScaleList(ref ds, ownerUserID, ref returnValue, ref returnDescription);

            if (Result < 0)
            {
                Shove._Web.JavaScript.Alert(this.Page, "系统出错!");

                return;
            }

            if (ds == null || ds.Tables.Count < 1)
            {
                Shove._Web.JavaScript.Alert(this.Page, "获取数据出错!");

                return;
            }

            dt = ds.Tables[0];
            Shove._Web.Cache.SetCache(cacheKeyScaleList + ownerUserID, dt, 100000);
        }

        PF.DataGridBindData(g, dt, gPager);
    }
Exemple #26
0
    private void BindData()
    {
        DataSet ds = null;

        int Results = -1;

        Results = DAL.Procedures.P_GetLoginCount(ref ds, Shove._Convert.StrToInt(ddlYear.SelectedValue, 0), Shove._Convert.StrToInt(ddlMonth.SelectedValue, 0));

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

            return;
        }


        if ((ds == null) || (ds.Tables.Count < 1))
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_LoginCount");

            return;
        }

        PF.DataGridBindData(g, ds.Tables[0], gPager);
    }
Exemple #27
0
    private void BindData()
    {
        int    days = int.Parse(ddlDateTime.SelectedValue);
        string CmdStr;

        if (days == -1)
        {
            CmdStr = "select * from T_SMS where SiteID = " + _Site.ID.ToString() + " and SMSID = -1 order by [DateTime] desc";
        }
        else
        {
            CmdStr = "select * from T_SMS where SiteID = " + _Site.ID.ToString() + " and Datediff(day, [DateTime], GetDate()) <= " + days.ToString() + " and SMSID = -1 order by [DateTime] desc";
        }

        DataTable dt = MSSQL.Select(CmdStr);

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

            return;
        }

        PF.DataGridBindData(g, dt, gPager);
    }
Exemple #28
0
    private void BindData()
    {
        if (tv.Nodes.Count < 1)
        {
            return;
        }

        string TypeID = tv.SelectedValue;

        if (TypeID == "")
        {
            TypeID = tv.Nodes[0].Value;
        }

        DataTable dt = new DAL.Tables.T_News().Open("", "SiteID = " + _Site.ID.ToString() + " and TypeID = " + Shove._Web.Utility.FilteSqlInfusion(TypeID), "[DateTime] desc");

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

            return;
        }



        PF.DataGridBindData(g, dt, gPager);
    }
Exemple #29
0
    private void BindData()
    {
        DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(base._Site.ID.ToString() + "MemberChase" + base._User.ID.ToString());
        string    condition        = string.Concat(new object[] { "[UserID] = ", base._User.ID.ToString(), " and SiteID = ", base._Site.ID });

        if (this.isDateValid())
        {
            string str2 = condition;
            condition = str2 + " and Convert(datetime,[DateTime]) between '" + this.txtStartDate.Text + " 0:0:0' and '" + this.txtEndDate.Text + " 23:59:59'";
        }
        if (cacheAsDataTable == null)
        {
            cacheAsDataTable = new Views.V_ChaseTasksTotal().Open("", condition, "[DateTime] desc");
            if (cacheAsDataTable == null)
            {
                PF.GoError(4, "数据库繁忙,请重试", "Room_ViewChase");
                return;
            }
            Shove._Web.Cache.SetCache(base._Site.ID.ToString() + "MemberChase" + base._User.ID.ToString(), cacheAsDataTable);
        }
        PF.DataGridBindData(this.g1, cacheAsDataTable, this.gPager1);
        this.gPager1.Visible       = true;
        this.lblPageBuyMoney.Text  = PF.GetSumByColumn(cacheAsDataTable, 12, true, this.gPager1.PageSize, this.gPager1.PageIndex).ToString("N");
        this.lblTotalBuyMoney.Text = PF.GetSumByColumn(cacheAsDataTable, 12, false, this.gPager1.PageSize, this.gPager1.PageIndex).ToString("N");
    }
Exemple #30
0
    private void BindData()
    {
        string str = "select * from V_SystemLog where SiteID = " + base._Site.ID.ToString();
        int    num = _Convert.StrToInt(this.ddlTime.SelectedValue, -1);

        if (num > 0)
        {
            str = str + " and Datediff(day, [DateTime], GetDate()) <= " + num.ToString();
        }
        if (this.tbUserName.Text.Trim() != "")
        {
            str = str + " and [Name] = '" + Utility.FilteSqlInfusion(this.tbUserName.Text.Trim()) + "'";
        }
        DataTable dt = MSSQL.Select(str + " order by [DateTime]", new MSSQL.Parameter[0]);

        if (dt == null)
        {
            PF.GoError(4, "数据库繁忙,请重试", "Admin_LoginLog");
        }
        else
        {
            PF.DataGridBindData(this.g, dt, this.gPager);
            this.btnClear.Enabled = dt.Rows.Count > 0;
        }
    }