/// <summary> /// 初始化页面 /// </summary> /// <param name="id">产品编号</param> protected void pageInit(string id) { var model = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo(); if (model != null) { hybh = model.UserID; } Eyousoft_yhq.BLL.Product bll = new Eyousoft_yhq.BLL.Product(); gModel = new Eyousoft_yhq.Model.Product(); gModel = bll.GetModel(id); if (gModel != null) { lbl_ProName.Text = gModel.ProductName; shichangjia = gModel.MarketPrice.ToString("C0"); appjia = gModel.AppPrice.ToString("C0"); dianhua = gModel.LinkTel; descript = Utils.GetText2(gModel.ProductDis, 30, true); //Lit_chutuan.Text = gModel.SendTourKnow.Replace("\n", "<br/>"); //Lit_conpair.Text = gModel.Scompare.Replace("\n", "<br/>"); //Lit_xingcheng.Text = gModel.TourDis.Replace("\n", "<br/>"); //Lit_jieshao.Text = gModel.ProductDis.Replace("\n", "<br/>"); yhm = gModel.FavourCode; pinglunshu = new Eyousoft_yhq.BLL.Comment().GetCountNum(gModel.ProductID).ToString(); if (DateTime.Compare(DateTime.Now, Utils.GetDateTime(gModel.ValidiDate.ToString())) > 0 && !gModel.IsEveryDay) { spanResult.Visible = false; } switch (gModel.PType) { case 2: lit_Menu.Text = string.Format("<div class=\"pro_content\"> <h3><ul class=\"tiaozheng\"><li li_index=\"1\" class=\"active\">产品介绍</li><li li_index=\"2\">使用须知</li></ul></h3><div class=\"contentbox\"><div>{0}</div><div style=\"display: none\">{1}</div> </div><div><img src=\"/images/pro_b.png\" width=\"300\"></div></div>", gModel.ProductDis.Replace("\n", "<br/>"), gModel.SendTourKnow.Replace("\n", "<br/>")); break; case 3: lit_Menu.Text = string.Format("<div class=\"pro_content\"> <h3><ul class=\"tiaozheng\"><li li_index=\"1\" class=\"active\">产品介绍</li><li li_index=\"2\">使用须知</li></ul></h3><div class=\"contentbox\"><div>{0}</div><div style=\"display: none\">{1}</div> </div><div><img src=\"/images/pro_b.png\" width=\"300\"></div></div>", gModel.ProductDis.Replace("\n", "<br/>"), gModel.SendTourKnow.Replace("\n", "<br/>")); break; default: lit_Menu.Text = string.Format("<div class=\"pro_content\"> <h3><ul class=\"tiaozheng\"><li li_index=\"1\" class=\"active\">产品介绍</li><li li_index=\"2\">参考行程</li><li li_index=\"3\">出团须知</li><li li_index=\"4\">同类比较</li></ul></h3><div class=\"contentbox\"><div>{0}</div><div style=\"display: none\">{1}</div> <div style=\"display: none\">{2}</div><div style=\"display: none\">{3}</div></div><div><img src=\"/images/pro_b.png\" width=\"300\"></div></div>", gModel.ProductDis.Replace("\n", "<br/>"), gModel.TourDis.Replace("\n", "<br/>"), gModel.SendTourKnow.Replace("\n", "<br/>"), gModel.Scompare); break; } } else { lit_Menu.Text = string.Format("<div class=\"pro_content\"> <h3><ul class=\"tiaozheng\"><li li_index=\"1\" class=\"active\">产品介绍</li><li li_index=\"2\">参考行程</li><li li_index=\"3\">出团须知</li><li li_index=\"4\">同类比较</li></ul></h3><div class=\"contentbox\"><div></div><div style=\"display: none\"></div> <div style=\"display: none\"></div><div style=\"display: none\"></div></div><div><img src=\"/images/pro_b.png\" width=\"300\"></div></div>"); } }
protected string MemberOrder(string PId) { var model = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo(); //用户是否登录 if (model != null) { Eyousoft_yhq.BLL.Product ProductBll = new Eyousoft_yhq.BLL.Product(); var ProModel = ProductBll.GetModel(PId); Eyousoft_yhq.Model.Order order = new Eyousoft_yhq.Model.Order(); //产品是否存在 if (ProModel != null) { if (ProModel != null && ProModel.ResidueNum <= 0) { Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); //短信数量 if (exModel != null && exModel.MsgNumber > 0) { IList<Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels(); bool IsMsgAdd = AddOrder(PId, (int)Eyousoft_yhq.Model.OrderState.未处理, ProModel.AppPrice, out order); if (IsMsgAdd) { string result = string.Empty;//返回发送结果 string sendNum = string.Empty; //发送账号 Eyousoft_yhq.BLL.ProductType ProductTypeBll = new Eyousoft_yhq.BLL.ProductType(); var ProductTypeModel = ProductTypeBll.GetModel(ProModel.ProductType); var AdminUser = new EyouSoft.Model.SSOStructure.MWebmasterInfo(); if (ProductTypeModel != null) { for (int i = 0; i < ProductTypeModel.AdminName.Count; i++) { AdminUser = new Eyousoft_yhq.BLL.User().GetModel(ProductTypeModel.AdminName[i].AdminN); if (AdminUser != null) sendNum = AdminUser.Telephone; string Msg = string.Format("产品{0}有未处理订单,订单号:{1}!【惠旅游】", ProModel.ProductName, order.OrderCode); Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(sendNum, Msg, channel[0], out result);//发送 #region 短信日志 Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog { TelCode = sendNum, MsgText = Msg, ReResult = result }; new Eyousoft_yhq.BLL.MsgLog().Add(MsLog); #endregion } } if (result == "成功") return UtilsCommons.AjaxReturnJson("1", "下单成功,订单由客服人员进行座位确认,在72小时内会短信通知您是否成交"); return UtilsCommons.AjaxReturnJson("1", "下单成功,我们会尽快与您联系!"); } else { return UtilsCommons.AjaxReturnJson("0", "下单失败,请重新下单"); } } else { return UtilsCommons.AjaxReturnJson("0", "短信系统维护中,请稍后再试!"); } } else { bool IsAdd = AddOrder(PId, (int)Eyousoft_yhq.Model.OrderState.待付款, ProModel.AppPrice, out order); if (IsAdd) { return UtilsCommons.AjaxReturnJson("99", "下单成功,请付款", order.OrderID); } else { return UtilsCommons.AjaxReturnJson("0", "下单失败,请重新下单"); } } } else { return UtilsCommons.AjaxReturnJson("0", "商品已下价!"); } } else { return UtilsCommons.AjaxReturnJson("2", "请先登录再操作!"); } }
protected string MemberOrder(string PId) { var model = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo(); //用户是否登录 if (model != null) { Eyousoft_yhq.BLL.Product ProductBll = new Eyousoft_yhq.BLL.Product(); var ProModel = ProductBll.GetModel(PId); Eyousoft_yhq.Model.Order order = new Eyousoft_yhq.Model.Order(); //产品是否存在 if (ProModel != null) { if (ProModel != null && ProModel.ResidueNum <= 0) { Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); //短信数量 if (exModel != null && exModel.MsgNumber > 0) { IList <Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels(); bool IsMsgAdd = AddOrder(PId, (int)Eyousoft_yhq.Model.OrderState.未处理, ProModel.AppPrice, out order); if (IsMsgAdd) { string result = string.Empty; //返回发送结果 string sendNum = string.Empty; //发送账号 Eyousoft_yhq.BLL.ProductType ProductTypeBll = new Eyousoft_yhq.BLL.ProductType(); var ProductTypeModel = ProductTypeBll.GetModel(ProModel.ProductType); var AdminUser = new EyouSoft.Model.SSOStructure.MWebmasterInfo(); if (ProductTypeModel != null) { for (int i = 0; i < ProductTypeModel.AdminName.Count; i++) { AdminUser = new Eyousoft_yhq.BLL.User().GetModel(ProductTypeModel.AdminName[i].AdminN); if (AdminUser != null) { sendNum = AdminUser.Telephone; } string Msg = string.Format("产品{0}有未处理订单,订单号:{1}!【惠旅游】", ProModel.ProductName, order.OrderCode); Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(sendNum, Msg, channel[0], out result);//发送 #region 短信日志 Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog { TelCode = sendNum, MsgText = Msg, ReResult = result }; new Eyousoft_yhq.BLL.MsgLog().Add(MsLog); #endregion } } if (result == "成功") { return(UtilsCommons.AjaxReturnJson("1", "下单成功,订单由客服人员进行座位确认,在72小时内会短信通知您是否成交")); } return(UtilsCommons.AjaxReturnJson("1", "下单成功,我们会尽快与您联系!")); } else { return(UtilsCommons.AjaxReturnJson("0", "下单失败,请重新下单")); } } else { return(UtilsCommons.AjaxReturnJson("0", "短信系统维护中,请稍后再试!")); } } else { bool IsAdd = AddOrder(PId, (int)Eyousoft_yhq.Model.OrderState.待付款, ProModel.AppPrice, out order); if (IsAdd) { return(UtilsCommons.AjaxReturnJson("99", "下单成功,请付款", order.OrderID)); } else { return(UtilsCommons.AjaxReturnJson("0", "下单失败,请重新下单")); } } } else { return(UtilsCommons.AjaxReturnJson("0", "商品已下价!")); } } else { return(UtilsCommons.AjaxReturnJson("2", "请先登录再操作!")); } }