Exemplo n.º 1
0
    private void PopulateControls()
    {
        decimal   priceMax = 0m;
        DataTable lists    = bll.GetBiJiaoFenXiList(userId, today, "list", out priceMax);

        List.DataSource = lists;
        List.DataBind();

        double zhiTotalCur   = 0d;
        double shouTotalCur  = 0d;
        double zhiTotalPrev  = 0d;
        double shouTotalPrev = 0d;

        foreach (DataRow dr in lists.Rows)
        {
            zhiTotalCur   += Convert.ToDouble(dr["ZhiPriceCur"]);
            shouTotalCur  += Convert.ToDouble(dr["ShouPriceCur"]);
            zhiTotalPrev  += Convert.ToDouble(dr["ZhiPricePrev"]);
            shouTotalPrev += Convert.ToDouble(dr["ShouPricePrev"]);
        }

        this.Label4.Text = zhiTotalCur.ToString("0.0##");
        this.Label2.Text = shouTotalCur.ToString("0.0##");
        this.Label5.Text = zhiTotalPrev.ToString("0.0##");
        this.Label3.Text = shouTotalPrev.ToString("0.0##");

        DataTable dt = bll.GetBiJiaoFenXiList(userId, today, "chart", out priceMax);

        this.hidChartData.Value = ItemHelper.GetChartData(dt, "PageUrl");
    }
Exemplo n.º 2
0
    //设置图表
    private void GetChartInfo()
    {
        DataTable dt  = new DataTable();
        DateTime  now = DateTime.Now.Date;

        if (curDate != "")
        {
            now = Convert.ToDateTime(curDate).Date;
        }

        switch (chartType)
        {
        case "datechart":
            decimal priceMax = 0m;
            dt        = month_bll.GetItemDateTopList(userId, now, "chart", out priceMax);
            chartDate = ItemHelper.GetChartData(dt, "ItemBuyDate");
            chartUrl  = "/Web2015/ItemDateChartJson.aspx?date=" + curDate;
            break;

        case "numchart":
            dt        = month_bll.GetItemNumTopList(userId, now);
            chartDate = ItemHelper.GetChartData(dt, "ChartUrl");
            chartUrl  = "/Web2015/ItemNumChartJson.aspx?date=" + curDate;
            break;

        case "pricechart":
            dt        = month_bll.GetItemPriceTopList(userId, now);
            chartDate = ItemHelper.GetChartData(dt, "ItemBuyDate");
            chartUrl  = "/Web2015/ItemPriceChartJson.aspx?date=" + curDate;
            break;
        }
    }
Exemplo n.º 3
0
    protected void PopulateControls()
    {
        DataTable dt = ItemAccess.GetQuJianTongJiList(userId);

        List.DataSource = dt;
        List.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(dt, "ItemBuyDate");
    }
Exemplo n.º 4
0
    //初始数据
    private void PopulateControls()
    {
        DataTable lists = bll.GetItemNumDetailList(userId, today, Convert.ToInt32(catTypeId), itemType, itemName, "list");

        List.DataSource = lists;
        List.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(lists, "ItemBuyDate");
    }
Exemplo n.º 5
0
    protected void PopulateControls()
    {
        DataTable dt = ItemAccess.GetItemPriceTopList(today, userId);

        PriceTop.DataSource = dt;
        PriceTop.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(dt, "ItemBuyDate");
    }
Exemplo n.º 6
0
    //初始数据
    private void PopulateControls()
    {
        DataTable lists = bll.GetItemPriceTopList(userId, today);

        PriceTop.DataSource = lists;
        PriceTop.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(lists, "ItemBuyDate");
    }
Exemplo n.º 7
0
    //初始数据
    private void PopulateControls()
    {
        DataTable lists = bll.GetQuJianTongJiList(userId);

        List.DataSource = lists;
        List.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(lists, "ItemBuyDate");
    }
Exemplo n.º 8
0
    //初始数据
    private void PopulateControls()
    {
        DataTable lists = bll.GetItemNumTopList(userId, today);

        NumTop.DataSource = lists;
        NumTop.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(lists, "PageUrl");
    }
Exemplo n.º 9
0
    //初始数据
    private void PopulateControls()
    {
        decimal   priceMax = 0m;
        DataTable lists    = bll.GetItemDateTopList(userId, today, "list", out priceMax);

        DateTop.DataSource = lists;
        DateTop.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(lists, "ItemBuyDate");
    }
Exemplo n.º 10
0
    protected void PopulateControls()
    {
        double    priceMax = 0;
        DataTable dt       = ItemAccess.GetItemDateTopList(today, userId, "list", out priceMax);

        DateTop.DataSource = dt;
        DateTop.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(dt, "ItemBuyDate");
    }
Exemplo n.º 11
0
    protected void PopulateControls()
    {
        double    priceMax = 0;
        DataTable dt       = ItemAccess.GetFenLeiZongJiMingXiList(catTypeId, today, userId, out priceMax);

        List.DataSource = dt;
        List.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(dt, "PageUrl");
    }
Exemplo n.º 12
0
    protected void PopulateControls()
    {
        int       monthMax = 0;
        DataTable dt       = ItemAccess.GetTuiJianFenXiList(userId, out monthMax);

        ItemList.DataSource = dt;
        ItemList.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(dt, "ItemBuyDate");
    }
Exemplo n.º 13
0
    protected void PopulateControls()
    {
        double    priceMax = 0;
        DataTable dt       = ItemAccess.GetItemNumDetailList(itemName, itemType, userId, Int32.Parse(catTypeId), today, "list", out priceMax);

        List.DataSource = dt;
        List.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(dt, "ItemBuyDate");
    }
Exemplo n.º 14
0
    //初始数据
    private void PopulateControls()
    {
        decimal   priceMax = 0m;
        DataTable lists    = bll.GetFenLeiZongJiMingXiList(userId, today, catTypeId, out priceMax);

        List.DataSource = lists;
        List.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(lists, "PageUrl");
    }
Exemplo n.º 15
0
    protected void PopulateControls()
    {
        int       countMax = 0;
        DataTable dt       = ItemAccess.GetItemNumTopList(today, userId, out countMax);

        NumTop.DataSource = dt;
        NumTop.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(dt, "PageUrl");
    }
Exemplo n.º 16
0
    protected void PopulateControls()
    {
        int       pageNumber = 1;
        double    priceMax   = 0;
        DataTable dt         = ItemAccess.GetJiaGeFenXiList(userId, pageNumber, out howManyItems, out priceMax);

        ItemList.DataSource = dt;
        ItemList.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(dt, "PageUrl");
    }
Exemplo n.º 17
0
    protected void PopulateControls()
    {
        int       notBuyMax  = 0;
        int       pageNumber = 1;
        DataTable dt         = ItemAccess.GetJianGeFenXiList(userId, pageNumber, out howManyItems, out notBuyMax);

        List.DataSource = dt;
        List.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(dt, "ItemBuyDate");
    }
Exemplo n.º 18
0
    protected void PopulateControls()
    {
        int       pageNumber = 1;
        double    priceMax   = 0;
        DataTable dt         = ItemAccess.GetJiaGeFenXiMingXiList(itemName, itemType, userId, pageNumber, out howManyItems, out priceMax);

        List.DataSource = dt;
        List.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(dt, "ItemBuyDate");
    }
Exemplo n.º 19
0
    protected void PopulateControls()
    {
        double    priceMax = 0;
        int       countMax = 0;
        DataTable dt       = ItemAccess.GetBiJiaoMingXiList(catTypeId, today, userId, out priceMax, out countMax);

        CatTypeList.DataSource = dt;
        CatTypeList.DataBind();

        this.hidChartData.Value  = ItemHelper.GetChartData(dt, "PageUrlCur");
        this.hidChartData2.Value = ItemHelper.GetChartData(dt, "PageUrlPrev");
    }
Exemplo n.º 20
0
    private void PopulateControls()
    {
        decimal   priceMax = 0m;
        int       countMax = 0;
        DataTable dt       = bll.GetBiJiaoMingXiList(userId, today, catTypeId, out priceMax, out countMax);

        CatTypeList.DataSource = dt;
        CatTypeList.DataBind();

        this.hidChartData.Value  = ItemHelper.GetChartData(dt, "PageUrlCur");
        this.hidChartData2.Value = ItemHelper.GetChartData(dt, "PageUrlPrev");
    }
Exemplo n.º 21
0
    //初始数据
    private void BindGrid()
    {
        int      userId = Convert.ToInt32(Session["UserID"]);
        DateTime today  = Utility.GetRequestDate(Request.QueryString["date"]);

        //图表点击所需数据
        decimal   priceMax = 0m;
        DataTable dt       = month_bll.GetItemDateTopList(userId, today, "chart", out priceMax);

        this.hidChartData.Value = ItemHelper.GetChartData(dt, "ItemBuyDate");

        #region 每日消费代码
        DataTable total = month_bll.GetShouZhiJieHuanList(userId, today);
        this.Label2.Text  = Convert.ToDouble(total.Rows[0]["ShouRuPrice"]).ToString("0.0##");
        this.Label4.Text  = Convert.ToDouble(total.Rows[0]["ZhiChuPrice"]).ToString("0.0##");
        this.Label1.Text  = Convert.ToDouble(total.Rows[0]["ShouRuPriceMonth"]).ToString("0.0##");
        this.Label3.Text  = Convert.ToDouble(total.Rows[0]["ZhiChuPriceMonth"]).ToString("0.0##");
        this.Label11.Text = Convert.ToDouble(total.Rows[0]["ShouRuPriceYear"]).ToString("0.0##");
        this.Label12.Text = Convert.ToDouble(total.Rows[0]["ZhiChuPriceYear"]).ToString("0.0##");

        double JieChuPrice  = Convert.ToDouble(total.Rows[0]["JieChuPriceYear"]);
        double HuanRuPrice  = Convert.ToDouble(total.Rows[0]["HuanRuPriceYear"]);
        double JieRuPrice   = Convert.ToDouble(total.Rows[0]["JieRuPriceYear"]);
        double HuanChuPrice = Convert.ToDouble(total.Rows[0]["HuanChuPriceYear"]);
        this.Label5.Text  = JieChuPrice.ToString("0.##");
        this.Label6.Text  = HuanRuPrice.ToString("0.##");
        this.Label7.Text  = JieRuPrice.ToString("0.##");
        this.Label8.Text  = HuanChuPrice.ToString("0.##");
        this.Label9.Text  = (JieChuPrice - HuanRuPrice).ToString("0.##");
        this.Label10.Text = (JieRuPrice - HuanChuPrice).ToString("0.##");
        #endregion

        //首页功能链接
        string userFunction = "";
        if (Session["UserFunction"] != null)
        {
            userFunction = Session["UserFunction"].ToString();
        }
        this.Label13.Text = UserHelper.GetUserFunctionText(userFunction);

        //钱包列表
        this.CardList.DataSource     = card_bll.GetCardList(userId);
        this.CardList.DataTextField  = "CardName";
        this.CardList.DataValueField = "CDID";
        this.CardList.DataBind();
        if (Request.Cookies["CardID"] != null)
        {
            string cardId = Request.Cookies["CardID"].Value;
            this.CardList.SelectedValue = cardId;
        }
        CardList_SelectionChanged(this.CardList, null);
    }
Exemplo n.º 22
0
    private void PopulateControls()
    {
        int     pageNumber    = 1;
        int     pagePerNumber = Convert.ToInt32(WebConfiguration.PagePerNumber);
        decimal priceMax      = 0m;

        DataTable lists = bll.GetJiaGeFenXiList(userId, pageNumber, pagePerNumber, out howManyItems, out priceMax);

        ItemList.DataSource = lists;
        ItemList.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(lists, "PageUrl");
    }
Exemplo n.º 23
0
    private void PopulateControls()
    {
        int pageNumber    = 1;
        int pagePerNumber = Convert.ToInt32(WebConfiguration.PagePerNumber);
        int notBuyMax     = 0;

        DataTable lists = bll.GetJianGeFenXiList(userId, pageNumber, pagePerNumber, out howManyItems, out notBuyMax);

        List.DataSource = lists;
        List.DataBind();

        this.hidChartData.Value = ItemHelper.GetChartData(lists, "ItemBuyDate");
    }
Exemplo n.º 24
0
    protected void PopulateControls()
    {
        DataTable dt = ItemAccess.GetFenLeiZongJiList(today, userId);

        List.DataSource = dt;
        List.DataBind();

        double priceTotal = 0;

        foreach (DataRow dr in dt.Rows)
        {
            priceTotal += Double.Parse(dr["ItemPriceTotal"].ToString());
        }

        this.Label2.Text = priceTotal.ToString("0.0##");

        this.hidChartData.Value = ItemHelper.GetChartData(dt, "PageUrl");
    }
Exemplo n.º 25
0
    //初始数据
    private void PopulateControls()
    {
        DataTable lists = bll.GetFenLeiZongJiList(userId, today);

        List.DataSource = lists;
        List.DataBind();

        double zhiPriceTotal  = 0d;
        double shouPriceTotal = 0d;

        foreach (DataRow dr in lists.Rows)
        {
            zhiPriceTotal  += Convert.ToDouble(dr["ZhiPriceTotal"]);
            shouPriceTotal += Convert.ToDouble(dr["ShouPriceTotal"]);
        }
        this.Label3.Text = zhiPriceTotal.ToString("0.0##");
        this.Label2.Text = shouPriceTotal.ToString("0.0##");

        this.hidChartData.Value = ItemHelper.GetChartData(lists, "PageUrl");
    }
Exemplo n.º 26
0
    protected void PopulateControls()
    {
        double    priceMax = 0;
        DataTable dt       = ItemAccess.GetBiJiaoFenXiList(today, userId, "", out priceMax);

        List.DataSource = dt;
        List.DataBind();

        double totalCur  = 0;
        double totalPrev = 0;

        foreach (DataRow dr in dt.Rows)
        {
            totalCur  += Double.Parse(dr["ItemPriceCur"].ToString());
            totalPrev += Double.Parse(dr["ItemPricePrev"].ToString());
        }

        this.Label2.Text = totalCur.ToString("0.0##");
        this.Label3.Text = totalPrev.ToString("0.0##");

        DataTable dd = ItemAccess.GetBiJiaoFenXiList(today, userId, "chart", out priceMax);

        this.hidChartData.Value = ItemHelper.GetChartData(dd, "PageUrl");
    }
Exemplo n.º 27
0
    protected void BindGrid()
    {
        if (Request.QueryString["date"] != null && Request.QueryString["date"] != "")
        {
            if (!ValidHelper.CheckDate(Request.QueryString["date"]))
            {
                Session["TodayDate"] = DateTime.Now.ToString("yyyy-MM-dd");
            }
            else
            {
                Session["TodayDate"] = Request.QueryString["date"];
            }
        }

        string today  = Session["TodayDate"].ToString();
        int    userId = Int32.Parse(Session["UserID"].ToString());

        //图表点击事件
        double    priceMax = 0;
        DataTable dd       = ItemAccess.GetItemDateTopList(today, userId, "chart", out priceMax);

        this.hidChartData.Value = ItemHelper.GetChartData(dd, "ItemBuyDate");

        #region 每日消费代码
        double    shouruPrice      = 0;
        double    zhichuPrice      = 0;
        double    shouruPriceMonth = 0;
        double    zhichuPriceMonth = 0;
        double    shouruPriceYear  = 0;
        double    zhichuPriceYear  = 0;
        DataTable total            = ItemAccess.GetItemListShouZhi(today, userId, out shouruPrice, out zhichuPrice, out shouruPriceMonth, out zhichuPriceMonth, out shouruPriceYear, out zhichuPriceYear);
        this.Label2.Text  = shouruPrice.ToString("0.0##");
        this.Label4.Text  = zhichuPrice.ToString("0.0##");
        this.Label1.Text  = shouruPriceMonth.ToString("0.0##");
        this.Label3.Text  = zhichuPriceMonth.ToString("0.0##");
        this.Label11.Text = shouruPriceYear.ToString("0.0##");
        this.Label12.Text = zhichuPriceYear.ToString("0.0##");

        double    jiechuPrice  = 0;
        double    huanruPrice  = 0;
        double    jieruPrice   = 0;
        double    huanchuPrice = 0;
        DataTable jiehuan      = ItemAccess.GetItemListJieHuanYear(today, userId, out jiechuPrice, out huanruPrice, out jieruPrice, out huanchuPrice);
        this.Label5.Text = jiechuPrice.ToString("0.##");
        this.Label6.Text = huanruPrice.ToString("0.##");
        this.Label7.Text = jieruPrice.ToString("0.##");
        this.Label8.Text = huanchuPrice.ToString("0.##");

        this.Label9.Text  = (jiechuPrice - huanruPrice).ToString("0.##");
        this.Label10.Text = (jieruPrice - huanchuPrice).ToString("0.##");
        #endregion

        //首页功能链接
        string userFunction = "";
        if (Session["UserFunction"] != null)
        {
            userFunction = Session["UserFunction"].ToString();
        }
        this.Label13.Text = UserAccess.GetUserFunctionText(userFunction);

        //钱包列表
        this.CardList.DataSource     = CardAccess.GetCardList(userId);
        this.CardList.DataTextField  = "CardName";
        this.CardList.DataValueField = "CardID";
        this.CardList.DataBind();
        if (Request.Cookies["CardID"] != null)
        {
            string cardId = Request.Cookies["CardID"].Value;
            this.CardList.SelectedValue = cardId;
        }
        CardList_SelectionChanged(this.CardList, null);
    }