/// <summary> /// 获取首页所有相关Banner /// </summary> /// <returns></returns> public static HomBannersVM GetHomeBanners(int sliderCount = 5, int middleItemCount = 5, int bottomItemCount = 5) { PageType pageType = PageType.Home; int pageID = 0; string cacheKey = CommonFacade.GenerateKey("GetBannerInfoOfHome", pageType.ToString(), pageID.ToString()); if (HttpRuntime.Cache[cacheKey] != null) { return((HomBannersVM)HttpRuntime.Cache[cacheKey]); } List <BannerInfo> bannerInfoList = RecommendDA.GetBannerInfoByPositionID(pageID, pageType, null); HomBannersVM result = new HomBannersVM(); //首页轮播广告 result.Sliders = bannerInfoList.Where(item => item.PositionID == BannerPosition.HomePage_Top_Slider).Take(sliderCount).ToList(); //新闻公告下部 result.UnderNews = bannerInfoList.FirstOrDefault(item => item.PositionID == BannerPosition.HomePage_UnderNews); //首页底部精选品牌 result.Bottom = bannerInfoList.Where(item => item.PositionID == BannerPosition.HomePage_Bottom).Take(bottomItemCount).ToList(); HttpRuntime.Cache.Insert(cacheKey, result, null, DateTime.Now.AddSeconds(CacheTime.Long), Cache.NoSlidingExpiration); return(result); }
public static bool ValidateCustomerPhone(string cellNumber, string confimKey, Point point) { using (var tran = TransactionManager.Create()) { if (CustomerDA.ValidateCustomerPhone(cellNumber, confimKey) == false) { return(false); } PointFilter filter = new PointFilter { CustomerSysNo = point.CustomerSysNo, ObtainType = point.ObtainType, LanguageCode = ConstValue.LanguageCode, CompanyCode = ConstValue.CompanyCode, CurrencyCode = ConstValue.CurrencySysNo.ToString(), StoreCompanyCode = ConstValue.StoreCompanyCode }; if (CommonDA.ExistsPoint(filter) <= 0) { CommonFacade.AddPoint(point); } tran.Complete(); return(true); } }
/// <summary> /// 一级类别新品上架 /// </summary> /// <param name="c1SysNo">前台一级类别</param> /// <param name="languageCode"></param> /// <param name="companyCode"></param> /// <returns></returns> public static List <RecommendProduct> QueryNewProductForC1(int c1SysNo, string languageCode = "zh-CN", string companyCode = "8601") { string cacheKey = CommonFacade.GenerateKey("QueryNewProductForC1", c1SysNo.ToString(), languageCode, companyCode); if (HttpRuntime.Cache[cacheKey] != null) { return((List <RecommendProduct>)HttpRuntime.Cache[cacheKey]); } var count = 4; var p1 = QueryRecommendProduct(c1SysNo, (int)PageType.TabStore, (int)RecommendPosition.TabStore_NewProduct, count, languageCode, companyCode); if (p1.Count < count) { var p2 = RecommendDA.QueryNewProductForC1(c1SysNo, languageCode, companyCode); p2.ForEach(p => { if (p1.All(f => f.SysNo != p.SysNo)) { p1.Add(p); } }); } List <RecommendProduct> result = p1.Take(count).ToList(); HttpRuntime.Cache.Insert(cacheKey, result, null, DateTime.Now.AddSeconds(CacheTime.Long), Cache.NoSlidingExpiration); return(result); }
/// <summary> /// 购物车热卖推荐(推荐位补位) /// </summary> /// <returns></returns> public static List <RecommendProduct> QueryShoppingCartList() { string cacheKey = CommonFacade.GenerateKey("QueryShoppingCartList"); if (HttpRuntime.Cache[cacheKey] != null) { return((List <RecommendProduct>)HttpRuntime.Cache[cacheKey]); } var count = 4; var p1 = RecommendFacade.QueryRecommendProduct(0, (int)PageType.ShoppingCart, 5001, count); if (p1.Count < count) { var p2 = RecommendDA.QueryNewProduct(ConstValue.LanguageCode, ConstValue.CompanyCode); p2.ForEach(p => { if (p1.All(f => f.SysNo != p.SysNo)) { p1.Add(p); } }); } List <RecommendProduct> result = p1.Take(count).ToList(); HttpRuntime.Cache.Insert(cacheKey, result, null, DateTime.Now.AddSeconds(CacheTime.Long), Cache.NoSlidingExpiration); return(result); }
/// <summary> /// (已缓存)查询最近7天下单最多的前5个商品 /// </summary> /// <param name="c3SysNo">前台三级类别sysno</param> /// <param name="languageCode"></param> /// <param name="companyCode"></param> /// <returns></returns> public static List <RecommendProduct> QueryWeekRankingForC3(int c3SysNo, string languageCode = "zh-CN", string companyCode = "8601") { string cacheKey = CommonFacade.GenerateKey("QueryWeekRankingForC3", c3SysNo.ToString(), languageCode, companyCode); if (HttpRuntime.Cache[cacheKey] != null) { return((List <RecommendProduct>)HttpRuntime.Cache[cacheKey]); } const int count = 8; var p1 = CategoryDA.QueryWeekRankingForC3(Convert.ToInt32(c3SysNo)); if (p1.Count < 8) { var p2 = RecommendDA.QuerySuperSpecialProductForC3(Convert.ToInt32(c3SysNo), languageCode, companyCode); p2.ForEach(p => { if (p1.All(f => f.SysNo != p.SysNo)) { p1.Add(p); } }); } List <RecommendProduct> result = p1.Take(count).ToList(); HttpRuntime.Cache.Insert(cacheKey, result, null, DateTime.Now.AddSeconds(CacheTime.Long), Cache.NoSlidingExpiration); return(result); }
public override bool IsUserInRole(string username, string screenCode) { IUserFacade userFacade = null; ICommonFacade commonFacade = null; try { userFacade = new UserFacade(); commonFacade = new CommonFacade(); int userRole = userFacade.GetRoleByUser(username); int accessRoles = commonFacade.GetRoleValueByScreenCode(screenCode); if (accessRoles != 0 && (accessRoles & userRole) == 0) { return(false); } return(true); } finally { if (userFacade != null) { userFacade.Dispose(); } if (commonFacade != null) { commonFacade.Dispose(); } } }
private void DeleteBankTran(PosInOutputData thePosInputData, PosInOutputData theOutPutData) { LogService.GlobalInfoMessage("HIS处理失败,请用银行的撤消交易开始!"); DateTime dtCurrenTime = new CommonFacade().GetServerDateTime(); PosInOutputData theCancelInput = new PosInOutputData(); theCancelInput.TransType = "02"; theCancelInput.TransAmount = thePosInputData.TransAmount; theCancelInput.TransDate = dtCurrenTime.ToString("yyyyMMdd"); theCancelInput.TransTime = dtCurrenTime.ToString("HHmmss"); theCancelInput.HISLSH = thePosInputData.HISLSH.Trim() + "R"; theCancelInput.ReceiptNo = theOutPutData.ReceiptNo; theCancelInput.RefNo = theOutPutData.RefNo; StringBuilder sbInput = new StringBuilder(theCancelInput.GetInput()); try { StringBuilder sbOutPut = new StringBuilder(150); //调用银行交易 int intResult = Pos_ECRCOMM(sbInput, sbOutPut); if (intResult != 1) { throw new Exception("调用银行POS机接口失败,返回错误代码:" + intResult); } } catch (Exception ex) { LogService.GlobalInfoMessage("调用银行交易方法ECRCOMM失败:" + ex.Message); throw ex; } }
public ActionResult GetID(string name) { CommonFacade facade = new CommonFacade(); string uid = facade.GetUid(name); return(Content(this.GetJSON(new { ID = uid }), this.JsonContentType())); }
public ActionResult SendFindPasswordSMS(FormCollection form) { string cell = CookieHelper.GetCookie <String>("FindPasswordCustomerCellPhone"); if (!string.IsNullOrEmpty(cell)) { SMSInfo item = new SMSInfo(); //item.CustomerSysNo = int.Parse(CookieHelper.GetCookie<String>("FindPasswordCustomerSysNo")); item.CreateUserSysNo = int.Parse(CookieHelper.GetCookie <String>("FindPasswordCustomerSysNo")); item.CellNumber = cell; item.Status = SMSStatus.NoSend; item.Type = SMSType.FindPassword; item.Priority = 100; item.RetryCount = 0; string code = VerifyImage.CreateRandomNumber(); CookieHelper.SaveCookie <string>("FindPasswordSMSCode", code); item.SMSContent = string.Format(AppSettingManager.GetSetting("SMSTemplate", "AlertConfirmPhoneCode"), DateTime.Now.ToString("MM月dd日 HH:mm"), code); if (CommonFacade.InsertNewSMS(item)) { return(Json("s", JsonRequestBehavior.AllowGet)); } } return(Json("服务器忙,稍后重试", JsonRequestBehavior.AllowGet)); }
public static List <RecommendProduct> QueryGroupBuyingRecommendProductList() { string cacheKey = CommonFacade.GenerateKey("QueryGroupBuyingRecommendProductList"); if (HttpRuntime.Cache[cacheKey] != null) { return((List <RecommendProduct>)HttpRuntime.Cache[cacheKey]); } var count = 8; var p1 = RecommendFacade.QueryRecommendProduct(0, (int)PageType.GroupBuying, (int)RecommendPosition.GroupBuy_HotSalesProduct, count); //泰隆银行商品很少,可能有些分类下面就没有商品,这样补位 就会出现 有时能补上,有时补不上;这样还照常客户困惑和质疑;所有暂时去掉补位逻辑 //if (p1.Count < count) //{ // Random rand = new Random(); // var allCategory = CategoryFacade.QueryCategoryInfosForHomePage(); // var c1SysNoList = allCategory.FindAll(x => x.CategoryType == CategoryType.TabStore).Select(x => x.CategoryID).ToList(); // int c1SysNo = c1SysNoList[rand.Next(0, c1SysNoList.Count)]; // var p2 = RecommendDA.QueryHotProductForC1(c1SysNo, ConstValue.LanguageCode, ConstValue.CompanyCode); // p2.ForEach(p => // { // if (p1.All(f => f.SysNo != p.SysNo)) // { // p1.Add(p); // } // }); //} List <RecommendProduct> result = p1.Take(count).ToList(); HttpRuntime.Cache.Insert(cacheKey, result, null, DateTime.Now.AddSeconds(CacheTime.Long), Cache.NoSlidingExpiration); return(result); }
/// <summary> /// 发表回复 /// </summary> /// <param name="replyInfo"></param> /// <returns></returns> public static bool CreateProductReviewReply(Product_ReplyDetail replyInfo, int SoSysNo) { string cacheKey = CommonFacade.GenerateKey("CreateProductReviewReply", replyInfo.Customer.SysNo.ToString(), replyInfo.ReviewSysNo.ToString()); DateTime now = DateTime.Now; int nowTimePoint = now.Hour * 3600 + now.Minute * 60 + now.Second; if (HttpRuntime.Cache[cacheKey] != null) { int preTimePoint = (int)HttpRuntime.Cache[cacheKey]; if (nowTimePoint - preTimePoint < 60) { throw new BusinessException("很抱歉,您发表评论的频率过快,请稍后再试。"); } } else { HttpRuntime.Cache.Insert(cacheKey, 0, null, DateTime.Now.AddSeconds(CacheTime.Shortest), Cache.NoSlidingExpiration); } bool result = ReviewDA.CreateProductReviewReply(replyInfo); //确认不需要发邮件 //if (result) //{ // SendMailReviewReply(replyInfo, SoSysNo); //} if (result) { now = DateTime.Now; nowTimePoint = now.Hour * 3600 + now.Minute * 60 + now.Second; HttpRuntime.Cache[cacheKey] = nowTimePoint; } return(result); }
/// <summary> /// 作废订单,调用ECCservice进行作废 /// </summary> /// <param name="orderSysNo">订单编号</param> /// <param name="message"></param> /// <param name="userSysNo"></param> /// <returns>如果返回的空字符串则作废成功,否则显示返回的字符串</returns> public static string VoidedOrder(int orderSysNo, string message, int userSysNo) { var orderInfo = CustomerFacade.GetCenterSODetailInfo(userSysNo, orderSysNo); if (orderInfo == null) { throw new BusinessException("订单不存在"); } if (orderInfo.HoldMark) { throw new BusinessException("订单已被锁定不能作废。如有疑问,请联系客服人员。"); } var client = new Common.RestClient.RestClient(ConstValue.ECCServiceBaseUrl, ConstValue.LanguageCode); var serviceUrl = "/SOService/SO/Abandon"; RestServiceError error; client.Update(serviceUrl, new { IsCreateAO = false, ImmediatelyReturnInventory = false, SOSysNoList = new List <int> { orderSysNo } }, out error); if (error != null) { var sb = new StringBuilder(); error.Faults.ForEach(e => sb.AppendLine(e.ErrorDescription)); if (error.Faults.All(e => e.IsBusinessException)) { return(sb.ToString()); } throw new ApplicationException(sb.ToString()); } CustomerDA.InsertSOLog(userSysNo, CommonFacade.GetIP(), orderSysNo, message, 201); //将作废的订单的SOSysNo保存到Cookies中 var values = CookieHelper.GetCookie <List <int> >(ConstValue.Cookie_Name_VoidedOrder); if (values != null) { values.Add(orderSysNo); } else { values = new List <int>(); values.Add(orderSysNo); } CookieHelper.SaveCookie <List <int> >(ConstValue.Cookie_Name_VoidedOrder, values); return(""); }
/// <summary> /// 获取咨询列表 /// </summary> /// <param name="queryInfo"></param> /// <returns></returns> public static PagedResult <ConsultationInfo> GetProductDetailConsultList(ConsultQueryInfo queryInfo) { PagedResult <ConsultationInfo> productConsultation = ConsultationDA.GetProductDetailConsultList(queryInfo); if (productConsultation != null) { foreach (var item in productConsultation) { item.Content = CommonFacade.SetCannotOnlineWordsMask(item.Content); } } return(productConsultation); }
/// <summary> /// 获取撮合交易列表 /// </summary> /// <param name="queryInfo"></param> /// <returns></returns> public static PagedResult <MatchedTradingInfo> GetProductDetailMatchedTradingList(MatchedTradingQueryInfo queryInfo) { PagedResult <MatchedTradingInfo> productConsultation = MatchedTradingDA.GetProductDetailMatchedTradingList(queryInfo); if (productConsultation != null) { foreach (var item in productConsultation) { item.Content = CommonFacade.SetCannotOnlineWordsMask(item.Content); } } return(productConsultation); }
/// <summary> /// 获取推荐品牌 /// </summary> /// <returns></returns> public static List <RecommendBrandInfo> GetRecommendBrands(PageType pageType, int pageID) { string cacheKey = CommonFacade.GenerateKey("GetRecommendBrands", pageType.ToString(), pageID.ToString()); if (HttpRuntime.Cache[cacheKey] != null) { return((List <RecommendBrandInfo>)HttpRuntime.Cache[cacheKey]); } List <RecommendBrandInfo> result = RecommendDA.GetRecommendBrands(pageType, pageID); HttpRuntime.Cache.Insert(cacheKey, result, null, DateTime.Now.AddSeconds(CacheTime.Long), Cache.NoSlidingExpiration); return(result); }
public ActionResult AddUser(RegisterViewModel input) { List <string> errorMsg = new List <string>(); CommonFacade.AddUserData(input, out errorMsg); if (errorMsg.Count > 0) { return(Json(new { result = "ERROR", errorMsg = errorMsg })); } else { return(Json(new { result = "OK" })); } }
public static List <BannerInfo> GetBannerInfoByPositionID(int pageID, PageType pageType, BannerPosition positionID) { string cacheKey = CommonFacade.GenerateKey("GetBannerInfoByPositionID", pageType.ToString(), pageID.ToString(), positionID.ToString()); if (HttpRuntime.Cache[cacheKey] != null) { return((List <BannerInfo>)HttpRuntime.Cache[cacheKey]); } List <BannerInfo> bannerInfoList = RecommendDA.GetBannerInfoByPositionID(pageID, pageType, positionID); HttpRuntime.Cache.Insert(cacheKey, bannerInfoList, null, DateTime.Now.AddSeconds(CacheTime.Long), Cache.NoSlidingExpiration); return(bannerInfoList); }
/// <summary> /// 获取指定数量,指定页面,指定位置的Topic /// </summary> /// <param name="newsType"></param> /// <param name="refSysNo"></param> /// <param name="topNum"></param> /// <param name="pageShowInheritance"></param> /// <returns></returns> public static List <NewsInfo> GetTopTopicList(NewsType newsType, int?refSysNo, int?pageShowInheritance, int topNum) { string cacheKey = CommonFacade.GenerateKey("GetTopTopicList", newsType.ToString(), refSysNo.HasValue ? refSysNo.ToString() : "N", pageShowInheritance.HasValue ? pageShowInheritance.ToString() : "N", topNum.ToString()); if (HttpRuntime.Cache[cacheKey] != null) { return((List <NewsInfo>)HttpRuntime.Cache[cacheKey]); } List <NewsInfo> result = TopicDA.GetTopTopicList(newsType, refSysNo, pageShowInheritance, topNum); HttpRuntime.Cache.Insert(cacheKey, result, null, DateTime.Now.AddSeconds(CacheTime.Long), Cache.NoSlidingExpiration); return(result); }
private static List <CountDownInfo> GetAllCountDown() { string cacheKey = CommonFacade.GenerateKey("GetAllCountDown"); if (HttpRuntime.Cache[cacheKey] != null) { return((List <CountDownInfo>)HttpRuntime.Cache[cacheKey]); } List <CountDownInfo> countdownList = CountDownDA.GetAllCountDown(ConstValue.LimitBuyEarlyShowTimeSetting); HttpRuntime.Cache.Insert(cacheKey, countdownList, null, DateTime.Now.AddSeconds(CacheTime.Shortest), Cache.NoSlidingExpiration); return(countdownList); }
/// <summary> /// 查询检验中间表,查询患者检验报告信息 /// </summary> /// <returns></returns> private DataTable GetListData() { try { DataTable dtAllReport = this.CreateDataTable(); #region 查询杏和LIS数据 StringBuilder sb = new StringBuilder(); sb.Append("select distinct OUTPATIENT_ID,REQUISITION_ID,TEST_ORDER_NAME,SAMPLING_TIME from HIS_INSPECTION_SAMPLE left outer join T_PRINT_RECORD tp on HIS_INSPECTION_SAMPLE.REQUISITION_ID=tp.PRINTBUSINESSID where PATIENT_TYPE='2'and OUTPATIENT_ID=@OUTPATIENT_ID AND ( SAMPLING_TIME IS NOT NULL OR SAMPLING_TIME<>'') AND LENGTH(SAMPLING_TIME)>6 AND TP.PRINTCOUNT IS NULL"); Hashtable ht1 = new Hashtable(); ht1.Add("@OUTPATIENT_ID", SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["DIAGNOSEID"].ToString()); QuerySolutionFacade facade1 = new QuerySolutionFacade(); DataSet ds1 = facade1.ExeQuery(sb.ToString(), ht1); if (ds1 != null && ds1.Tables.Count != 0 && ds1.Tables[0].Rows.Count != 0) { for (int i = 0; i < ds1.Tables[0].Rows.Count; i++) { string ora_startDate = new CommonFacade().GetServerDateTime().AddMonths(-3).ToString("yyyy-MM-dd 00:00:00"); if (ds1.Tables[0].Rows[i]["SAMPLING_TIME"].ToString().Trim() != "") { DateTime samplingTime = Convert.ToDateTime(ds1.Tables[0].Rows[i]["SAMPLING_TIME"].ToString().Trim().Replace("@", ":")); ds1.Tables[0].Rows[i]["SAMPLING_TIME"] = samplingTime.ToString("yyyy-MM-dd HH:mm:ss"); if (samplingTime <= Convert.ToDateTime(ora_startDate)) { continue; } } else { continue; } object[] obj = new object[dtAllReport.Columns.Count]; ds1.Tables[0].Rows[i].ItemArray.CopyTo(obj, 0); dtAllReport.Rows.Add(obj); } } #endregion return(dtAllReport); } catch (Exception ex) { Skynet.LoggingService.LogService.GlobalErrorMessage("查询检验结果报表失败,原因:" + ex.Message); return(null); } }
/// <summary> /// 获取团购分类 /// </summary> /// <returns></returns> public static List <GroupBuyingCategoryInfo> GetGroupBuyingCategory() { string cacheKey = CommonFacade.GenerateKey("GroupBuying_GetGroupBuyingCategory"); if (HttpRuntime.Cache[cacheKey] != null) { return((List <GroupBuyingCategoryInfo>)HttpRuntime.Cache[cacheKey]); } List <GroupBuyingCategoryInfo> result = GroupBuyingDA.GetGroupBuyingCategory(); HttpRuntime.Cache.Insert(cacheKey, result, null, DateTime.Now.AddSeconds(CacheTime.Longest), Cache.NoSlidingExpiration); return(result); }
public static List <RecommendProduct> QueryWeeklyHotProduct(string languageCode = "zh-CN", string companyCode = "8601") { string cacheKey = CommonFacade.GenerateKey("QueryWeeklyHotProduct"); if (HttpRuntime.Cache[cacheKey] != null) { return((List <RecommendProduct>)HttpRuntime.Cache[cacheKey]); } var result = RecommendDA.QueryWeeklyHotProduct(languageCode, companyCode); HttpRuntime.Cache.Insert(cacheKey, result, null, DateTime.Now.AddSeconds(CacheTime.Long), Cache.NoSlidingExpiration); return(result); }
/// <summary> /// (已缓存)所有的前台商品类别 /// </summary> /// <returns></returns> public static List <CategoryInfo> QueryCategoryInfos() { string cacheKey = CommonFacade.GenerateKey("QueryCategoryInfos"); if (HttpRuntime.Cache[cacheKey] != null) { return((List <CategoryInfo>)HttpRuntime.Cache[cacheKey]); } List <CategoryInfo> result = CategoryDA.QueryCategories(); HttpRuntime.Cache.Insert(cacheKey, result, null, DateTime.Now.AddSeconds(CacheTime.Longest), Cache.NoSlidingExpiration); return(result); }
/// <summary> /// 获取首页新闻公告信息 /// </summary> /// <returns></returns> public static List <NewsInfo> GetHomePageNews(NewsType newsType, int topNum = 5) { string cacheKey = CommonFacade.GenerateKey("GetHomePageNews", newsType.ToString()); if (HttpRuntime.Cache[cacheKey] != null) { return((List <NewsInfo>)HttpRuntime.Cache[cacheKey]); } List <NewsInfo> entityList = TopicDA.GetNewsInfoByNewsType(newsType, topNum); HttpRuntime.Cache.Insert(cacheKey, entityList, null, DateTime.Now.AddSeconds(CacheTime.Long), Cache.NoSlidingExpiration); return(entityList); }
/// <summary> /// 获取品牌专区所有热销商品 /// </summary> /// <returns></returns> private static List <ProductItemInfo> GetAllHotProductList() { string cacheKey = CommonFacade.GenerateKey("GetHotProductList"); if (HttpRuntime.Cache[cacheKey] != null) { return((List <ProductItemInfo>)HttpRuntime.Cache[cacheKey]); } List <ProductItemInfo> allHotProducts = BrandZoneDA.GetAllHotProductList(); HttpRuntime.Cache.Insert(cacheKey, allHotProducts, null, DateTime.Now.AddSeconds(CacheTime.Longest), Cache.NoSlidingExpiration); return(allHotProducts); }
/// <summary> /// 所有的有效的二级域名商家 /// </summary> /// <returns></returns> public static List <StoreDomainPage> GetAllStoreDomainHomePageList() { string cacheKey = CommonFacade.GenerateKey("GetAllStoreDomainHomePageList"); if (HttpRuntime.Cache[cacheKey] != null) { return((List <StoreDomainPage>)HttpRuntime.Cache[cacheKey]); } List <StoreDomainPage> result = StoreDA.GetAllStoreDomainHomePageList(); if (result != null) { HttpRuntime.Cache.Insert(cacheKey, result, null, DateTime.Now.AddSeconds(CacheTime.Middle), Cache.NoSlidingExpiration); } return(result); }
/// <summary> /// 获取咨询 /// </summary> /// <param name="queryInfo"></param> /// <returns></returns> public static ConsultationInfo GetConsultListBySysNo(ConsultQueryInfo queryInfo) { ConsultationInfo consultationInfo = ConsultationDA.GetConsultListBySysNo(queryInfo); if (consultationInfo != null) { consultationInfo.Content = CommonFacade.SetCannotOnlineWordsMask(consultationInfo.Content); if (consultationInfo.PagedReplyList != null) { foreach (var reply in consultationInfo.PagedReplyList) { reply.Content = CommonFacade.SetCannotOnlineWordsMask(reply.Content); } } } return(consultationInfo); }
// Check MobileNo Existing public ActionResult CheckMobileNo(string mobileno) { if (mobileno != null) { var check = CommonFacade.IsUserMobileNoExists(mobileno); if (check == true) { return(Json(new { result = "ERROR" })); } else { return(Json(new { result = "OK" })); } } return(Json(new { result = "ERROR" })); }
// Check Email Existing public ActionResult CheckEmail(string email) { if (email != null) { var check = CommonFacade.IsUserEmailExists(email); if (check == true) { return(Json(new { result = "ERROR" })); } else { return(Json(new { result = "OK" })); } } return(Json(new { result = "ERROR" })); }
/// <summary> /// 为首页的限时抢购推荐位提供数据 /// </summary> /// <returns></returns> public static List <CountDownInfo> GetHomepageRecommendCountDown() { string cacheKey = CommonFacade.GenerateKey("GetHomepageRecommendCountDown"); if (HttpRuntime.Cache[cacheKey] != null) { return((List <CountDownInfo>)HttpRuntime.Cache[cacheKey]); } List <CountDownInfo> list = GetCountDownList(1, 5).ResultList; if (list == null) { list = new List <CountDownInfo>(); } HttpRuntime.Cache.Insert(cacheKey, list, null, DateTime.Now.AddSeconds(CacheTime.Shortest), Cache.NoSlidingExpiration); return(list); }