Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DateTime today     = DateTime.Today;
            DateTime beginDate = today.AddDays(-6.0);



            if (!base.IsPostBack)
            {
                SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
                this.lbShopName.Text = masterSettings.SiteName;
                if (this.imgLogo != null)
                {
                    this.imgLogo.Src = masterSettings.DistributorLogoPic;
                    if (!File.Exists(base.Server.MapPath(masterSettings.DistributorLogoPic)))
                    {
                        this.imgLogo.Src = "/Admin/Shop/Public/images/80x80.png";
                    }
                }

                int    port = base.Request.Url.Port;
                string text = (port == 80) ? "" : (":" + port.ToString());
                this.showUrl = string.Concat(new string[]
                {
                    "http://",
                    base.Request.Url.Host,
                    text,
                    Globals.ApplicationPath,
                    "/default.aspx"
                });
                DataRow drOne  = ShopStatisticHelper.ShopGlobal_GetMemberCount();
                DataRow drOne2 = ShopStatisticHelper.ShopGlobal_GetOrderCountByDate(today);
                DataRow drOne3 = ShopStatisticHelper.ShopGlobal_GetOrderCountByDate(today.AddDays(-1.0));
                this.WaitSendOrderQty         = base.GetFieldValue(drOne, "WaitSendOrderQty");
                this.OrderQty_Today           = base.GetFieldValue(drOne2, "OrderQty");
                this.OrderQty_Yesterday       = base.GetFieldValue(drOne3, "OrderQty");
                this.OrderAmountFee_Today     = base.GetFieldDecimalValue(drOne2, "OrderAmountFee").ToString("N2");
                this.OrderAmountFee_Yesterday = base.GetFieldDecimalValue(drOne3, "OrderAmountFee").ToString("N2");
                this.ServiceOrderQty          = base.GetFieldValue(drOne, "ServiceOrderQty");
                this.lbServiceOrderQty.Text   = this.ServiceOrderQty;
                if (this.ServiceOrderQty == "0")
                {
                    this.lbServiceOrderQty.ForeColor = Color.Green;
                }
                else
                {
                    this.lbServiceOrderQty.ForeColor = Color.Red;
                }
                this.GoodsQty       = base.GetFieldValue(drOne, "GoodsQty");
                this.MemberQty      = base.GetFieldValue(drOne, "MemberQty");
                this.DistributorQty = base.GetFieldValue(drOne, "DistributorQty");
                //this.LoadTradeDataList(beginDate, 7);
                this.rptDistributor.DataSource = ShopStatisticHelper.ShopGlobal_GetSortList_Distributor(beginDate, 8);
                this.rptDistributor.DataBind();
                this.rptMember.DataSource = ShopStatisticHelper.ShopGlobal_GetSortList_Member(beginDate, 8);
                this.rptMember.DataBind();
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DateTime today     = DateTime.Today;
            DateTime beginDate = today.AddDays(-7.0);

            wid = GetCurWebId();
            if (string.IsNullOrEmpty(wid))
            {
                return;
            }

            if (!base.IsPostBack)
            {
                //SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
                //this.lbShopName.Text = masterSettings.SiteName;
                //this.imgLogo.Src = masterSettings.DistributorLogoPic;

                Chenduo.BLL.sf_website   bll     = new Chenduo.BLL.sf_website();
                Chenduo.Model.sf_website website = bll.GetModelByWid(wid);
                this.lbShopName.Text = website.sitename;
                this.imgLogo.Src     = website.logo;
                if (!File.Exists(base.Server.MapPath(website.logo /*masterSettings.DistributorLogoPic*/)))
                {
                    this.imgLogo.Src = "http://fpoimg.com/80x80";
                }
                int    port = base.Request.Url.Port;
                string str  = (port == 80) ? "" : (":" + port.ToString());
                this.showUrl = "http://" + base.Request.Url.Host + str + Globals.ApplicationPath + "/default.aspx?wid=" + this.wid;
                DataRow drOne = ShopStatisticHelper.ShopGlobal_GetMemberCount(this.wid);
                DataRow row2  = ShopStatisticHelper.ShopGlobal_GetOrderCountByDate(today, this.wid);
                DataRow row3  = ShopStatisticHelper.ShopGlobal_GetOrderCountByDate(today.AddDays(-1.0), this.wid);
                this.WaitSendOrderQty         = base.GetFieldValue(drOne, "WaitSendOrderQty");
                this.OrderQty_Today           = base.GetFieldValue(row2, "OrderQty");
                this.OrderQty_Yesterday       = base.GetFieldValue(row3, "OrderQty");
                this.OrderAmountFee_Today     = base.GetFieldDecimalValue(row2, "OrderAmountFee").ToString("N2");
                this.OrderAmountFee_Yesterday = base.GetFieldDecimalValue(row3, "OrderAmountFee").ToString("N2");
                this.ServiceOrderQty          = base.GetFieldValue(drOne, "ServiceOrderQty");
                this.lbServiceOrderQty.Text   = this.ServiceOrderQty;
                if (this.ServiceOrderQty == "0")
                {
                    this.lbServiceOrderQty.ForeColor = Color.Green;
                }
                else
                {
                    this.lbServiceOrderQty.ForeColor = Color.Red;
                }
                this.GoodsQty       = base.GetFieldValue(drOne, "GoodsQty");
                this.MemberQty      = base.GetFieldValue(drOne, "MemberQty");
                this.DistributorQty = base.GetFieldValue(drOne, "DistributorQty");
                this.LoadTradeDataList(beginDate, 7);
                this.rptDistributor.DataSource = ShopStatisticHelper.ShopGlobal_GetSortList_Distributor(beginDate, 8, this.wid);
                this.rptDistributor.DataBind();
                this.rptMember.DataSource = ShopStatisticHelper.ShopGlobal_GetSortList_Member(beginDate, 8, this.wid);
                this.rptMember.DataBind();
            }
        }