Exemple #1
0
        protected string BindAddress(object shopID)
        {
            Chain.BLL.SysShop   bllSysShop = new Chain.BLL.SysShop();
            Chain.Model.SysShop modelShop  = bllSysShop.GetModel(int.Parse(shopID.ToString()));
            int    ProvinceID = modelShop.ShopProvince;
            string province   = "";
            string city       = "";
            string county     = "";

            if (ProvinceID != 0)
            {
                province = PubFunction.SysAreaName(ProvinceID) + "省";
            }
            int CityID = modelShop.ShopCity;

            if (CityID != 0)
            {
                city = PubFunction.SysAreaName(CityID) + "市";
            }
            int CountyID = modelShop.ShopCounty;

            if (CountyID != 0)
            {
                county = PubFunction.SysAreaName(CountyID);
            }
            return(province + city + county + modelShop.ShopAddress);
        }
Exemple #2
0
    public static string GetSendContent(int intTemplateType, SmsTemplateParameter smsTemplateParameter, int intShopID)
    {
        Chain.BLL.SmsTemplate   bllTemplate   = new Chain.BLL.SmsTemplate();
        Chain.Model.SmsTemplate modelTemplate = new Chain.Model.SmsTemplate();
        modelTemplate = bllTemplate.GetModel(intTemplateType);
        StringBuilder strTemplateContent = new StringBuilder(modelTemplate.TemplateContent);

        strTemplateContent.Replace("{CardID}", smsTemplateParameter.strCardID);
        strTemplateContent.Replace("{LCardID}", smsTemplateParameter.strCardID.Substring(smsTemplateParameter.strCardID.Length - 3));
        strTemplateContent.Replace("{Name}", smsTemplateParameter.strName);
        strTemplateContent.Replace("{TempMoney}", smsTemplateParameter.dclTempMoney.ToString("0.00"));
        strTemplateContent.Replace("{Money}", smsTemplateParameter.dclMoney.ToString("0.00"));
        strTemplateContent.Replace("{Time}", DateTime.Now.ToString("yy年MM月dd日HH时mm分"));
        strTemplateContent.Replace("{TempPoint}", smsTemplateParameter.intTempPoint.ToString());
        strTemplateContent.Replace("{Point}", smsTemplateParameter.intPoint.ToString());
        Chain.BLL.MemLevel   bllMemLevel   = new Chain.BLL.MemLevel();
        Chain.Model.MemLevel modelMemLevel = new Chain.Model.MemLevel();
        modelMemLevel = bllMemLevel.GetModel(smsTemplateParameter.OldLevelID);
        strTemplateContent.Replace("{OldLevel}", modelMemLevel.LevelName);
        modelMemLevel = bllMemLevel.GetModel(smsTemplateParameter.NewLevelID);
        strTemplateContent.Replace("{NewLevel}", modelMemLevel.LevelName);
        strTemplateContent.Replace("{MemBirthday}", string.Format("{0}月{1}日", Convert.ToInt32(smsTemplateParameter.MemBirthday.ToString("MM")), Convert.ToInt32(smsTemplateParameter.MemBirthday.ToString("dd"))));
        strTemplateContent.Replace("{MemPastTime}", smsTemplateParameter.MemPastTime.ToString("yyyy-MM-dd"));
        strTemplateContent.Replace("{TempGoodsItem}", smsTemplateParameter.CountItemsString);
        if (modelTemplate.TemplateID < 13)
        {
            if (PubFunction.curParameter.bolIsSmsShopName)
            {
                if (PubFunction.curParameter.strSmsShopName != "")
                {
                    strTemplateContent.Append("【" + PubFunction.curParameter.strSmsShopName + "】");
                }
            }
            else
            {
                Chain.BLL.SysShop   bllShop   = new Chain.BLL.SysShop();
                Chain.Model.SysShop modelShop = new Chain.Model.SysShop();
                modelShop = bllShop.GetModel(intShopID);
                if (modelShop.ShopSmsName != "")
                {
                    strTemplateContent.Append("【" + modelShop.ShopSmsName + "】");
                }
            }
        }
        return(strTemplateContent.ToString());
    }
Exemple #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.txtShopID.Value = "1";
         Chain.BLL.SysShop   bllSysShop = new Chain.BLL.SysShop();
         Chain.Model.SysShop modelShop  = bllSysShop.GetModel(1);
         this.txtShopName.Value = modelShop.ShopName;
         PubFunction.BindProvinceSelect(this.sltProvince);
         this.txtShopType.Value = "1";
         this.bindSltList();
         this.sltShopList.SelectedIndex = 0;
         this.trSltShop.Attributes.Add("style", "display:none;");
         this.trShopSms.Attributes.Add("style", "display:none;");
         this.trShopPoint.Attributes.Add("style", "display:none;");
     }
 }
Exemple #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.txtShopID.Value = this.UserModel.UserShopID.ToString();
         Chain.BLL.SysShop   bllShop   = new Chain.BLL.SysShop();
         Chain.Model.SysShop modelShop = bllShop.GetModel(this.UserModel.UserShopID);
         this.txtShopType.Value = modelShop.ShopType.ToString();
         PubFunction.BindAllianceListSelect(this.UserModel.UserShopID, this.sltAlliance, true);
         int FatherShopID = -1;
         if (this.sltAlliance.Value != "")
         {
             FatherShopID = int.Parse(this.sltAlliance.Value);
         }
         PubFunction.BindShopListSelect(this.UserModel.UserShopID, FatherShopID, this.sltShop, true);
     }
 }
Exemple #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.BindPreferentialObject();
         this.rptShopBind();
         if (base.Request.QueryString["PromotionsID"] != null)
         {
             int PromotionsID = int.Parse(base.Request.QueryString["PromotionsID"]);
             Chain.BLL.Promotions   bllPromotions   = new Chain.BLL.Promotions();
             Chain.Model.Promotions modelPromotions = bllPromotions.GetModel(PromotionsID);
             this.txtPromotionsDesc.Value       = modelPromotions.PromotionsDesc;
             this.txtPromotionsID.Value         = PromotionsID.ToString();
             this.txtPromotionsRemark.Value     = modelPromotions.PromotionsRemark;
             this.txtUpdatePromotionsName.Value = modelPromotions.PromotionsPhoto;
             this.imgPromotionsPhoto.Src        = modelPromotions.PromotionsPhoto;
             this.txtPromotionsTitle.Value      = modelPromotions.PromotionsTitle;
             this.txtShopList.Value             = modelPromotions.ShopList;
             string[] shopList = this.txtShopList.Value.Split(new char[]
             {
                 ','
             });
             string shopname = "";
             for (int i = 0; i < shopList.Length; i++)
             {
                 Chain.BLL.SysShop   bllShop   = new Chain.BLL.SysShop();
                 Chain.Model.SysShop modelShop = bllShop.GetModel(int.Parse(shopList[i]));
                 shopname = shopname + modelShop.ShopName + ";";
             }
             shopname.TrimEnd(new char[]
             {
                 ';'
             });
             this.txtShopNameList.Value = shopname;
             this.ltlTitle.Text         = "微官网   >    优惠活动   >   优惠活动编辑 ";
         }
         else
         {
             this.ltlTitle.Text = "微官网   >   优惠活动   >   优惠活动新增 ";
         }
     }
 }
Exemple #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         if (base.Request.QueryString["ShopID"] != null)
         {
             int shopID = int.Parse(base.Request.QueryString["ShopID"].ToString());
             Chain.BLL.SysShop   bllSysShop = new Chain.BLL.SysShop();
             Chain.Model.SysShop modelShop  = bllSysShop.GetModel(int.Parse(shopID.ToString()));
             int    ProvinceID = modelShop.ShopProvince;
             string province   = "";
             string city       = "";
             string county     = "";
             if (ProvinceID != 0)
             {
                 province = PubFunction.SysAreaName(ProvinceID) + "省";
             }
             int CityID = modelShop.ShopCity;
             if (CityID != 0)
             {
                 city = PubFunction.SysAreaName(CityID) + "市";
             }
             int CountyID = modelShop.ShopCounty;
             if (CountyID != 0)
             {
                 county = PubFunction.SysAreaName(CountyID);
             }
             this.spAddress.InnerHtml = province + city + county + modelShop.ShopAddress;
             JavaScriptSerializer jsonReader  = new JavaScriptSerializer();
             HttpRequestHelper    httpRequest = new HttpRequestHelper();
             string         jsonString        = httpRequest.Reqeust("http://apis.map.qq.com/ws/geocoder/v1/?address=" + this.spAddress.InnerHtml + "&key=FMXBZ-MQALQ-ZCT5V-GB46R-G62I2-6MF7X");
             MapAddressInfo MapInfo           = jsonReader.Deserialize <MapAddressInfo>(jsonString);
             int            status            = MapInfo.Status;
             if (status == 0)
             {
                 this.spLat.InnerHtml = MapInfo.Result.Location.Lat.ToString();
                 this.spLng.InnerHtml = MapInfo.Result.Location.Lng.ToString();
             }
         }
     }
 }
Exemple #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.shopID                = this._UserShopID;
            this.UserGroupID           = this._UserGroupID;
            this.userid                = this._UserID;
            this.txtMemStartTime.Value = DateTime.Now.AddDays(-20.0).ToString("yyyy-MM-dd");
            this.txtMemEndTime.Value   = DateTime.Now.ToString("yyyy-MM-dd");
            this.strOrder              = " SysNoticeTime desc";
            this.sltShop.Value         = this.shopID.ToString();
            Chain.BLL.SysNotice bllNotice = new Chain.BLL.SysNotice();
            DataTable           dtNotice  = bllNotice.GetList(5, this.strSql, this.strOrder).Tables[0];

            this.rpNotice.DataSource = dtNotice;
            this.rpNotice.DataBind();
            Chain.BLL.Mem       bllMem    = new Chain.BLL.Mem();
            Chain.BLL.OrderLog  bllLog    = new Chain.BLL.OrderLog();
            Chain.BLL.SysShop   bllShop   = new Chain.BLL.SysShop();
            Chain.Model.SysShop modelShop = bllShop.GetModel(this.shopID);
            this.lblShopName.Text    = modelShop.ShopName;
            this.lblShopAddress.Text = modelShop.ShopAddress;
            this.lblShopMem.Text     = modelShop.ShopContactMan;
            this.lblShopPhone.Text   = modelShop.ShopTelephone;
            if (this.shopID != 1 && PubFunction.curParameter.bolShopPointManage)
            {
                this.lblPointCount.Text = modelShop.PointCount.ToString();
            }
            else
            {
                this.lblPoint.Visible = false;
            }
            if (this.shopID != 1 && PubFunction.curParameter.bolShopSmsManage)
            {
                this.lblSmsCount.Text = modelShop.SmsCount.ToString();
            }
            else
            {
                this.lblSms.Visible = false;
            }
            Chain.Model.SysGroup modelSysGroup = new Chain.BLL.SysGroup().GetModel(this.UserGroupID);
            this.lbGroupName.Text = modelSysGroup.GroupName;
            Chain.BLL.MemRecharge bllMemRecharge = new Chain.BLL.MemRecharge();
            Chain.BLL.OrderLog    bllOrderLog    = new Chain.BLL.OrderLog();
            Chain.BLL.MemCount    bllMemCount    = new Chain.BLL.MemCount();
            string strMemToday               = "CONVERT(varchar(10),MemCreateTime,120) = CONVERT(varchar(10),GETDATE(),120) AND MemID > 0";
            string strMemYesterday           = "CONVERT(varchar(10),MemCreateTime,120) = CONVERT(varchar(10), DATEADD(day,-1,GETDATE()),120) AND MemID > 0";
            string strMoneyToday             = "CONVERT(varchar(10),RechargeCreateTime,120) = CONVERT(varchar(10),GETDATE(),120)";
            string strMoneyYesterday         = "CONVERT(varchar(10),RechargeCreateTime,120) = CONVERT(varchar(10), DATEADD(day,-1,GETDATE()),120)";
            string strGetMoneyToday          = "CONVERT(varchar(10),OrderCreateTime,120) = CONVERT(varchar(10),GETDATE(),120)";
            string strGetMoneyYesterday      = "CONVERT(varchar(10),OrderCreateTime,120) = CONVERT(varchar(10), DATEADD(day,-1,GETDATE()),120)";
            string strGetCountMoneyToday     = "CONVERT(varchar(10),CountCreateTime,120) = CONVERT(varchar(10),GETDATE(),120)";
            string strGetCountMoneyYesterday = "CONVERT(varchar(10),CountCreateTime,120) = CONVERT(varchar(10), DATEADD(day,-1,GETDATE()),120)";

            if (modelShop.ShopID > 1)
            {
                strMemToday               += string.Format(" AND MemShopID = {0}", this.shopID);
                strMemYesterday           += string.Format(" AND MemShopID = {0}", this.shopID);
                strMoneyToday             += string.Format(" AND RechargeShopID = {0}", this.shopID);
                strMoneyYesterday         += string.Format(" AND RechargeShopID = {0}", this.shopID);
                strGetMoneyToday          += string.Format(" AND OrderShopID = {0}", this.shopID);
                strGetMoneyYesterday      += string.Format(" AND OrderShopID = {0}", this.shopID);
                strGetCountMoneyToday     += string.Format(" AND CountShopID = {0}", this.shopID);
                strGetCountMoneyYesterday += string.Format(" AND CountShopID = {0}", this.shopID);
            }
            this.ltlMemToday.Text          = bllMem.GetRecordCount(strMemToday).ToString();
            this.ltlMemYesterday.Text      = bllMem.GetRecordCount(strMemYesterday).ToString();
            this.lblrMoneyToday.Text       = bllMemRecharge.GetRecMoney(strMoneyToday).ToString("F2");
            this.lblrMoneyYesterday.Text   = bllMemRecharge.GetRecMoney(strMoneyYesterday).ToString("F2");
            this.lblGetMoneyToday.Text     = (bllOrderLog.GetTotalCash(strGetMoneyToday) + bllMemCount.GetTotalCash(strGetCountMoneyToday) + Convert.ToDecimal(this.lblrMoneyToday.Text)).ToString("F2");
            this.lblGetMoneyYesterday.Text = (bllOrderLog.GetTotalCash(strGetMoneyYesterday) + bllMemCount.GetTotalCash(strGetCountMoneyYesterday) + Convert.ToDecimal(this.lblrMoneyYesterday.Text)).ToString("F2");
            this.GetSysRemind();
        }