/// <summary> /// 更新收货地址 /// </summary> /// <param name="context"></param> /// <returns></returns> private string Update(HttpContext context) { string addressId = context.Request["address_id"]; string consigneeName = context.Request["consigneename"]; string address = context.Request["address"]; string phone = context.Request["phone"]; string isDefault = context.Request["isdefault"]; string province = context.Request["province"]; string provinceCode = context.Request["province_code"]; string city = context.Request["city"]; string cityCode = context.Request["city_code"]; string dist = context.Request["dist"]; string distCode = context.Request["dist_code"]; string zipCode = context.Request["zip_code"]; string msg = ""; if (bllMall.EditConsigneeAddress(addressId, currentUserInfo.UserID, consigneeName, address, phone, isDefault, province, provinceCode, city, cityCode, dist, distCode, zipCode, out msg)) { WebsiteInfo websiteModel = bllWebsite.GetWebsiteInfo(bllWebsite.WebsiteOwner); //if (websiteModel.IsSynchronizationData == 1 && websiteModel.IsSynchronizationData!=null) //{ // CurrentUserInfo.TrueName = consigneeName; // CurrentUserInfo.Phone = phone; // bllWebsite.Update(CurrentUserInfo); //} if (string.IsNullOrWhiteSpace(currentUserInfo.TrueName)) { currentUserInfo.TrueName = consigneeName; bllMall.Update(currentUserInfo, string.Format(" TrueName = '{0}' ", consigneeName), string.Format(" AutoID = {0} ", currentUserInfo.AutoID)); } if (string.IsNullOrWhiteSpace(currentUserInfo.Phone) && ZentCloud.Common.MyRegex.PhoneNumLogicJudge(phone)) { currentUserInfo.Phone = phone; bllMall.Update(currentUserInfo, string.Format(" Phone = '{0}' ", phone), string.Format(" AutoID = {0} ", currentUserInfo.AutoID)); } resp.errmsg = "ok"; } else { resp.errcode = 1; resp.errmsg = msg; } return(ZentCloud.Common.JSONHelper.ObjectToJson(resp)); }
protected void Page_Load(object sender, EventArgs e) { BLLWebSite bllWebsite = new BLLWebSite(); string websiteOwner = bllWebsite.WebsiteOwner; model = bllWebsite.GetWebsiteInfo(websiteOwner); string fields = "'DistributionRateLevel0First','DistributionRateLevel1First','DistributionRateLevel0','DistributionRateLevel1','RebateScoreRate','DistributionRateLevel2','DistributionRateLevel3','FromHistoryScore','ToHistoryScore','Discount','DistributionRateLevel1Ex1','AccumulationFundRateLevel1','RebateMemberRate','AwardAmount'"; tbFieldList = bllTableFieldMap.GetTableFieldMapByWebsite(websiteOwner, "ZCJ_UserLevelConfig", null, null, "0", "AutoId,Field,MappingName,IsShowInList", fields); }
protected void Page_Load(object sender, EventArgs e) { WebsiteInfo webSiteModel = bllWebsite.GetWebsiteInfo(); UserInfo curUser = bllWebsite.GetCurrentUserInfo(); if (webSiteModel.WebsiteExpirationDate.HasValue && webSiteModel.WebsiteExpirationDate.Value.AddDays(1).AddSeconds(-1) < DateTime.Now && curUser.UserType != 1) { this.Response.Redirect("/Error/expire.htm"); } }
private void GetWebsiteConfig() { WebsiteInfo model = bllWeisite.GetWebsiteInfo(); if (model != null && !string.IsNullOrEmpty(model.WeiXinBindDomain)) { strDomain = model.WeiXinBindDomain; } else { strDomain = Request.Url.Authority; } }
protected void Page_Load(object sender, EventArgs e) { /// <summary> /// 菜单BLL /// </summary> BLLMenuPermission bllMenu = new BLLMenuPermission(""); /// 权限BLL /// </summary> BLLPermission.BLLPermission bllPms = new BLLPermission.BLLPermission(); /// <summary> /// 站点BLL /// </summary> BLLWebSite bllWebSite = new BLLWebSite(); UserInfo currUser = DataLoadTool.GetCurrUserModel(); if (currUser == null) { this.Response.Redirect(ConfigHelper.GetConfigString("logoutUrl")); return; } curUserID = currUser.UserID; websiteOwner = bllWebSite.WebsiteOwner; WebsiteVersion = bllWebSite.GetWebsiteVersion(websiteOwner); WebsiteInfo websiteInfo = bllWebSite.GetWebsiteInfo(); WebsiteLogo = websiteInfo != null ? websiteInfo.WebsiteLogo : ""; if (string.IsNullOrEmpty(websiteInfo.WebsiteLogo)) { WebsiteLogo = ConfigHelper.GetConfigString("WebsiteLogo"); } ExpirationDate = websiteInfo.WebsiteExpirationDate.HasValue ? websiteInfo.WebsiteExpirationDate.Value.ToString("yyyy-MM-dd") : ""; //IsValid = websiteInfo.WebsiteExpirationDate.HasValue && websiteInfo.WebsiteExpirationDate.Value.AddDays(1) < DateTime.Now ? false : true; WebsiteName = websiteInfo.WebsiteName; LogoutHref = ConfigHelper.GetConfigString("logoutUrl") + "?op=logout"; }
/// <summary> /// 编辑报名数据 /// </summary> /// <param name="context"></param> /// <returns></returns> private string EditActivityData(HttpContext context) { string activityId = context.Request["ActivityID"]; int uId = Convert.ToInt32(context.Request["UID"]); BLLJIMP.Model.ActivityDataInfo model = bllActivity.Get <BLLJIMP.Model.ActivityDataInfo>(string.Format(" ActivityID = '{0}' AND UID = {1} ", activityId, uId)); BLLJIMP.Model.ActivityDataInfo reqModel = bllActivity.ConvertRequestToModel <BLLJIMP.Model.ActivityDataInfo>(new BLLJIMP.Model.ActivityDataInfo()); WebsiteInfo websiteModel = bllWebsite.GetWebsiteInfo(bllWebsite.WebsiteOwner); reqModel.InsertDate = model.InsertDate; reqModel.IsDelete = model.IsDelete; reqModel.WeixinOpenID = model.WeixinOpenID; reqModel.SpreadUserID = model.SpreadUserID; reqModel.WebsiteOwner = model.WebsiteOwner; reqModel.MonitorPlanID = model.MonitorPlanID; reqModel.PaymentStatus = model.PaymentStatus; reqModel.OrderId = model.OrderId; reqModel.IsSignIn = model.IsSignIn; reqModel.UserId = model.UserId; reqModel.ActivityID = model.ActivityID; reqModel.Amount = model.Amount; reqModel.ArticleType = model.ArticleType; reqModel.CategoryId = model.CategoryId; reqModel.CouponName = model.CouponName; reqModel.Distance = model.Distance; reqModel.DistributionOffLineRecommendCode = model.DistributionOffLineRecommendCode; reqModel.DistributionOffLineRecommendName = model.DistributionOffLineRecommendName; reqModel.FromUserId = model.FromUserId; reqModel.GuaranteeCreditAcount = model.GuaranteeCreditAcount; reqModel.InsertDateStr = model.InsertDateStr; reqModel.IsFee = model.IsFee; reqModel.ItemAmount = model.ItemAmount; reqModel.ItemName = model.ItemName; reqModel.SpreadUserID = model.SpreadUserID; reqModel.Status = model.Status; reqModel.ToUserId = model.ToUserId; reqModel.UID = model.UID; reqModel.UseAmount = model.UseAmount; reqModel.UserLatitude = model.UserLatitude; reqModel.UserLongitude = model.UserLongitude; reqModel.UseScore = model.UseScore; if ( websiteModel.IsSynchronizationData == 1 && websiteModel.IsSynchronizationData != null && !string.IsNullOrWhiteSpace(model.UserId) ) { UserInfo userModel = bllUser.GetUserInfo(model.UserId); if (userModel != null) { userModel.Phone = model.Phone; userModel.TrueName = model.Name; bllWebsite.Update(userModel); } } if (bllActivity.Update(reqModel)) { resp.Status = 1; } else { resp.Msg = "编辑失败"; } return(Common.JSONHelper.ObjectToJson(resp)); }