Example #1
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 == "支付宝");
                }
            }
        }
    }
    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 == "支付宝");
                }
            }
        }
    }
Example #3
0
    private void BindData(bool IsReload)
    {
        this.lblTotalDistillMoney.Text    = "0";
        this.lblTotalFormalitiesFees.Text = "0";
        this.lblTotalPayMoney.Text        = "0";
        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    text1           = "Admin_UserDistillSuccess_Data_" + this.tbBeginTime.Text + "_" + this.tbEndTime.Text;
            string    filterCondition = this.GetFilterCondition();
            DataTable dt = new Views.V_UserDistills().Open("", filterCondition, "[DateTime] desc");
            if (dt == null)
            {
                PF.GoError(4, "数据库繁忙,请重试", "Admin_FinanceDistill");
            }
            else
            {
                double num  = 0.0;
                double num2 = 0.0;
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    num  += _Convert.StrToDouble(dt.Rows[i]["Money"].ToString(), 0.0);
                    num2 += _Convert.StrToDouble(dt.Rows[i]["FormalitiesFees"].ToString(), 0.0);
                }
                this.lblTotalDistillMoney.Text    = num.ToString();
                this.lblTotalFormalitiesFees.Text = num2.ToString();
                this.lblTotalPayMoney.Text        = (num - num2).ToString();
                PF.DataGridBindData(this.g, dt, this.gPager);
                for (int j = 0; j < this.g.Columns.Count; j++)
                {
                    if ((((this.g.Columns[j].HeaderText == "提款银行卡帐号") || (this.g.Columns[j].HeaderText == "开户银行")) || ((this.g.Columns[j].HeaderText == "支行名称") || (this.g.Columns[j].HeaderText == "所在省"))) || ((this.g.Columns[j].HeaderText == "所在市") || (this.g.Columns[j].HeaderText == "持卡人姓名")))
                    {
                        this.g.Columns[j].Visible = (this.hfCurPayType.Value == "所有") || (this.hfCurPayType.Value == "银行卡");
                    }
                    else if (this.g.Columns[j].HeaderText == "支付宝账号")
                    {
                        this.g.Columns[j].Visible = true;
                        this.g.Columns[j].Visible = (this.hfCurPayType.Value == "所有") || (this.hfCurPayType.Value == "支付宝");
                    }
                }
            }
        }
    }
    private bool IsFirstDistill()
    {
        if (base._User == null)
        {
            return(false);
        }
        string    text1 = "Room_UserDistills_" + base._User.ID.ToString();
        DataTable table = new Views.V_UserDistills().Open("ID,[DateTime],[Money],FormalitiesFees,Result,Memo", "[UserID] = " + base._User.ID.ToString(), "[DateTime] desc, [ID]");

        if ((table != null) && (table.Rows.Count > 0))
        {
            return(false);
        }
        return(true);
    }
Example #5
0
    private void BindData()
    {
        short     num   = 0;
        DataTable table = new Views.V_UserDistills().Open("", "Result = " + num.ToString(), "[DateTime]");

        if (table == null)
        {
            PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName);
        }
        else
        {
            this.g.DataSource = table;
            this.g.DataBind();
            this.labTip.Visible = table.Rows.Count == 0;
        }
    }
Example #6
0
 private void BindDistills()
 {
     if (base._User != null)
     {
         string    key = "Room_UserDistills_" + base._User.ID.ToString();
         DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key);
         if (cacheAsDataTable == null)
         {
             cacheAsDataTable = new Views.V_UserDistills().Open("ID,[DateTime],[Money],FormalitiesFees,Result,Memo", "[UserID] = " + base._User.ID.ToString(), "[DateTime] desc, [ID]");
             if (cacheAsDataTable == null)
             {
                 PF.GoError(4, "数据库繁忙,请重试(732)", base.GetType().FullName);
                 return;
             }
             Shove._Web.Cache.SetCache(key, cacheAsDataTable, 60);
         }
         this.gUserDistills.DataSource = cacheAsDataTable;
         this.gUserDistills.DataBind();
         this.lblDistillCount.Text = cacheAsDataTable.Rows.Count.ToString();
         this.lblDistillMoney.Text = PF.GetSumByColumn(cacheAsDataTable, 2, false, this.gUserDistills.PageSize, 0).ToString("N");
     }
 }
Example #7
0
 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_UserDistills().Open("", "SiteID = " + base._Site.ID.ToString() + " and year([DateTime]) = " + Utility.FilteSqlInfusion(this.ddlYear.SelectedValue) + " and month([DateTime]) = " + Utility.FilteSqlInfusion(this.ddlMonth.SelectedValue), "[DateTime] desc");
         }
         else
         {
             table = new Views.V_UserDistills().Open("", "SiteID = " + base._Site.ID.ToString() + " and UserID = " + num.ToString() + " 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_FinanceDistill");
         }
         else
         {
             PF.DataGridBindData(this.g, table, this.gPager);
         }
     }
 }