void sendAppDown(string Tel) { string CodeStr = string.Format("你正在下载惠旅游手机App应用,下载地址:{0} \n如果不是本人操作可以忽略!【惠旅游】", "http://t.cn/8DFctTQ"); Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (exModel.MsgNumber <= 0) { result = "短信中心维护中!"; return; } IList <Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels(); Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(Tel, CodeStr, channel[0], out result);//发送 #region 短信日志 Eyousoft_yhq.Model.MsgLog MsLogEnd = new Eyousoft_yhq.Model.MsgLog { TelCode = Tel, MsgText = CodeStr, ReResult = result }; new Eyousoft_yhq.BLL.MsgLog().Add(MsLogEnd); #endregion if (result == "成功") { result = "短信发送成功,请注意查收! "; return; } else { result = "短信中心维护中,请稍后再试! "; return; } }
protected void Page_Load(object sender, EventArgs e) { var model = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (model != null) { lbl_ABOUT.Text = model.About; } }
protected void NewSedCode(string Tel) { string Code = string.Empty; Code = new Random().Next(1000, 9999).ToString(); string SendByteCode = ""; for (int i = 0; i < Code.Length; i++) { SendByteCode += Code[i] + "、"; } SendByteCode = SendByteCode.TrimEnd('、'); string CodeStr = string.Format("你正在注册惠旅游,验证码为{0},验证码为{0},有效期为五分钟,请不要向别人泄露验证码!如果不是本人操作可以忽略!【惠旅游】", SendByteCode); Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (exModel.MsgNumber <= 0) { result = "短信中心维护中!"; return; } result = Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMSVoice(Tel, CodeStr); #region 短信日志 Eyousoft_yhq.Model.MsgLog MsLogS = new Eyousoft_yhq.Model.MsgLog { TelCode = Tel, MsgText = CodeStr, ReResult = result }; new Eyousoft_yhq.BLL.MsgLog().Add(MsLogS); #endregion if (result == "成功") { List<string[]> list = new List<string[]>(); if (Session[Tel] != null) { list = Session[Tel] as List<string[]>; if (list.Count > 5) { result = "重复次数过多,请24小时之后再操作!"; return; } string[] arrStr = new string[] { Tel, Code, DateTime.Now.ToString() }; list.Add(arrStr); } else { list.Add(new string[] { Tel, Code, DateTime.Now.ToString() }); Session[Tel] = list; } Session.Timeout = 1440; } else { result = "短信中心维护中!"; } }
private void InitPage() { var model = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (model == null) return; txtAboutUs.Text = model.About; txtTitle.Text = model.Title; txtKeys.Text = model.Keywords; txtDescript.Text = model.Description; lbl_MsgCount.Text = model.MsgNumber.ToString(); }
/// <summary> /// 保存操作 /// </summary> /// <param name="doType"></param> protected void pageSave(string doType) { Eyousoft_yhq.Model.Order model = new Eyousoft_yhq.Model.Order(); Eyousoft_yhq.BLL.Order bll = new Eyousoft_yhq.BLL.Order(); model.OrderID = Utils.GetQueryStringValue("orderid"); model.OrderState = (Eyousoft_yhq.Model.OrderState)Utils.GetInt(Utils.GetFormValue(this.ddl_orderState.UniqueID)); model.Remark = Utils.GetFormValue(this.txtSpecialMark.UniqueID); model.OrderPrice = Utils.GetDecimal(Utils.GetFormValue(this.lblOrderPrice.UniqueID)); model.SendFile = NewGetAttach(); string OrderIhpone = this.lblPtel.Text; string OrderCode = this.InOrderId.Value; bool result = false; string msg = ""; Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (model.OrderState == Eyousoft_yhq.Model.OrderState.待付款 || model.OrderState == Eyousoft_yhq.Model.OrderState.已取消) { if (exModel != null && exModel.MsgNumber > 0) { if (doType == "save") { result = bll.Update(model) > 0 ? true : false; msg = result ? "修改成功!" : "修改失败!"; if (result == true) { SendMsg(model.OrderState, OrderIhpone, OrderCode, model.OrderID); } } } else { msg = "短信数量不足,修改短信发送失败!"; } } else { if (doType == "save") { result = bll.Update(model) > 0 ? true : false; msg = result ? "修改成功!" : "修改失败!"; } } if (doType == "savepdf") { result = bll.SavePDF(model) > 0 ? true : false; msg = result ? "保存成功!" : "保存失败!"; } Response.Clear(); Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg)); Response.End(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var model = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (model != null) { ltrInfo.Text = model.About; } } }
private Eyousoft_yhq.Model.MCompanySetting GetFormValue() { var model = new Eyousoft_yhq.BLL.KV().GetCompanySetting() ?? new Eyousoft_yhq.Model.MCompanySetting(); model.About = Utils.EditInputText(txtAboutUs.Text); model.Title = Utils.EditInputText(txtTitle.Text); model.Keywords = Utils.EditInputText(txtKeys.Text); model.Description = Utils.EditInputText(txtDescript.Text); return model; }
protected void sendCode(string Tel) { string Code = string.Empty; Code = new Random().Next(100000, 999999).ToString(); string CodeStr = string.Format("你正在注册惠旅游,验证码:{0},有效期为五分钟,请不要向别人泄露验证码!如果不是本人操作可以忽略!【惠旅游】", Code); Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (exModel.MsgNumber <= 0) { result = "短信中心维护中!"; return; } IList <Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels(); Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(Tel, CodeStr, channel[0], out result);//发送 #region 短信日志 Eyousoft_yhq.Model.MsgLog MsLogS = new Eyousoft_yhq.Model.MsgLog { TelCode = Tel, MsgText = CodeStr, ReResult = result }; new Eyousoft_yhq.BLL.MsgLog().Add(MsLogS); #endregion if (result == "成功") { List <string[]> list = new List <string[]>(); if (Session[Tel] != null) { list = Session[Tel] as List <string[]>; if (list.Count > 5) { result = "重复次数过多,请24小时之后再操作!"; return; } string[] arrStr = new string[] { Tel, Code, DateTime.Now.ToString() }; list.Add(arrStr); } else { list.Add(new string[] { Tel, Code, DateTime.Now.ToString() }); Session[Tel] = list; } Session.Timeout = 1440; } else { result = "短信中心维护中!"; } }
private Eyousoft_yhq.Model.MCompanySetting GetFormValue() { var model = new Eyousoft_yhq.BLL.KV().GetCompanySetting() ?? new Eyousoft_yhq.Model.MCompanySetting(); model.About = Utils.EditInputText(txtAboutUs.Text); model.Title = Utils.EditInputText(txtTitle.Text); model.Keywords = Utils.EditInputText(txtKeys.Text); model.Description = Utils.EditInputText(txtDescript.Text); return(model); }
protected void Page_Load(object sender, EventArgs e) { Ititle = "惠旅游手机应用"; var KVModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (KVModel != null) { Ititle = Ititle + "-" + KVModel.Title; KeyWords = KVModel.Keywords; Description = KVModel.Description; } }
private void InitPage() { var model = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (model == null) { return; } txtAboutUs.Text = model.About; txtTitle.Text = model.Title; txtKeys.Text = model.Keywords; txtDescript.Text = model.Description; lbl_MsgCount.Text = model.MsgNumber.ToString(); }
protected void Page_Load(object sender, EventArgs e) { if (EyouSoft.Common.Page.HuiyuanPage.GetUserInfo() != null) { PlaceHolder1.Visible = true; a_regeister.HRef = a_login.HRef = "/Huiyuan/PersonalInfo.aspx"; } Ititle = Page.Title; var KVModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (KVModel != null) { Ititle = Ititle + "-" + KVModel.Title; KeyWords = KVModel.Keywords; Description = KVModel.Description; } }
protected void Page_Load(object sender, EventArgs e) { if (Request.RawUrl.ToLower() == "/index.aspx") { PlaceHolder1.Visible = true; PlaceHolder2.Visible = false; } InitList(); var model = new Eyousoft_yhq.BLL.KV().GetComLianMeng(); if (model != null) { fuwushang = model.Agent.ToString(); dingdanliang = model.OorderCount.ToString(); chengjiaoe = model.SealMoney.ToString("C0"); } }
/// <summary> /// 添加订单 /// </summary> /// <returns></returns> private string saveOrder() { Eyousoft_yhq.Model.OrderState Orderstate = Eyousoft_yhq.Model.OrderState.未处理; int orderNums = Utils.GetInt(Utils.GetFormValue("orderNum")); string id = Utils.GetFormValue("id"); var model = new Eyousoft_yhq.BLL.Product().GetModel(id); if (model != null) { if (model.ResidueNum - orderNums >= 0) { Orderstate = Eyousoft_yhq.Model.OrderState.待付款; } Eyousoft_yhq.BLL.Order OrderBll = new Eyousoft_yhq.BLL.Order(); var MemberModel = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo(); if (MemberModel != null) { Eyousoft_yhq.Model.Order OrderModel = new Eyousoft_yhq.Model.Order() { ProductID = id, OrderCode = DateTime.Now.ToString("yyyy-MM-dd "), MemberID = MemberModel.UserID, MemberTel = Utils.GetFormValue("receiveMobile"), MemberName = Utils.GetFormValue("receiveName"), MemberSex = MemberModel.ContactSex, OrderState = Orderstate, PayState = Eyousoft_yhq.Model.PaymentState.未支付, IsCheck = true, ConfirmCode = "", Remark = "", OrderPrice = model.AppPrice * orderNums, PeopleNum = orderNums }; int num = OrderBll.Add(OrderModel); if (num > 0 && Orderstate == Eyousoft_yhq.Model.OrderState.待付款) { return UtilsCommons.AjaxReturnJson("1", "操作成功,请及时付款!", OrderModel.OrderID); } if (num > 0 && Orderstate == Eyousoft_yhq.Model.OrderState.未处理) { string result = string.Empty;//返回发送结果 string sendNum = string.Empty; //发送账号 Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (exModel == null || exModel.MsgNumber <= 0) return UtilsCommons.AjaxReturnJson("2", "操作成功,等待审核!短信发送失败,请联系我们!"); IList<Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels(); var ProductTypeModel = new Eyousoft_yhq.BLL.ProductType().GetModel(model.ProductType); if (ProductTypeModel == null || ProductTypeModel.AdminName == null) { sendNum = HuiYuanInfo.ContactTel; string Msg = "收到新订单请处理,订单号为:" + OrderModel.OrderCode.Trim() + "!【惠旅游】"; 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 } else { for (int i = 0; i < ProductTypeModel.AdminName.Count; i++) { sendNum = new Eyousoft_yhq.BLL.User().GetModel(ProductTypeModel.AdminName[i].AdminN).Telephone; string Msg = "收到新订单请处理,订单号为:" + OrderModel.OrderCode.Trim() + "!【惠旅游】"; 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("2", "操作成功,等待审核!已通知客服人员!"); return UtilsCommons.AjaxReturnJson("2", "操作成功,等待审核!短信发送失败,请联系我们!"); } return UtilsCommons.AjaxReturnJson("0", "操作失败!"); } else { return UtilsCommons.AjaxReturnJson("0", "操作失败,请登陆后重新操作... ..."); } } return UtilsCommons.AjaxReturnJson("0", "操作失败,此产品已经下架... ..."); }
void sendAppDown(string Tel) { string CodeStr = string.Format("你正在下载惠旅游手机App应用,下载地址:{0} \n如果不是本人操作可以忽略!【惠旅游】", "http://t.cn/8DFctTQ"); Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (exModel.MsgNumber <= 0) { result = "短信中心维护中!"; return; } IList<Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels(); Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(Tel, CodeStr, channel[0], out result);//发送 #region 短信日志 Eyousoft_yhq.Model.MsgLog MsLogEnd = new Eyousoft_yhq.Model.MsgLog { TelCode = Tel, MsgText = CodeStr, ReResult = result }; new Eyousoft_yhq.BLL.MsgLog().Add(MsLogEnd); #endregion if (result == "成功") { result = "短信发送成功,请注意查收! "; return; } else { result = "短信中心维护中,请稍后再试! "; return; } }
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 void sendMsg(string pid, string FavourCode) { Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (exModel.MsgNumber > 0) { var model = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo(); IList<Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels(); string code = string.Empty; if (model != null && model.UserName != "") { bool isSend = new Eyousoft_yhq.BLL.SendMsg().exists(model.UserName, pid, FavourCode); if (isSend) { result = "您已经领取过此产品的优惠码!"; return; } if (!model.valiUser) { var sendModel = new Eyousoft_yhq.BLL.Product().GetModel(pid); if (sendModel != null && !sendModel.IsEveryDay) { code = string.Format("您成功获取{0},{3}出团,优惠价{1}元,优惠码:{2}!【惠旅游】" , sendModel.ProductName , sendModel.AppPrice.ToString("C2") , sendModel.FavourCode , Utils.GetDateTime(sendModel.TourDate.ToString()).ToString("yyyy-MM-dd")); Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(model.UserName, code, channel[0], out result);//发送 } else if (sendModel != null && sendModel.IsEveryDay) { code = string.Format("您成功获取{0},优惠价{1}元,优惠码:{2}!【惠旅游】" , sendModel.ProductName , sendModel.AppPrice.ToString("C2") , sendModel.FavourCode); Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(model.UserName, code, channel[0], out result);//发送 } else { result = "此产品已下架!"; } #region 短信日志 Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog { TelCode = model.UserName, MsgText = code, ReResult = result }; new Eyousoft_yhq.BLL.MsgLog().Add(MsLog); #endregion } } else { Response.Redirect("/login.aspx"); } if (result == "成功") { int minusNum = code.Length % 70 == 0 ? code.Length / 70 : (code.Length / 70) + 1; new Eyousoft_yhq.BLL.SendMsg().Add(new Eyousoft_yhq.Model.SendMSG { SendNum = model.UserName, SendText = code, IssueTime = DateTime.Now, ProductID = pid, minusNum = minusNum, FavourCode = FavourCode }); result = "短信已发送,请注意查收!"; } else { result = "领取失败!"; } } else { result = "短信系统维护中,请稍后再试!"; } }
protected void sendCode(string Tel) { string Code = string.Empty; Code = new Random().Next(100000, 999999).ToString(); string CodeStr = string.Format("你正在注册惠旅游,验证码:{0},有效期为五分钟,请不要向别人泄露验证码!如果不是本人操作可以忽略!【惠旅游】", Code); Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (exModel.MsgNumber <= 0) { result = "短信中心维护中!"; return; } IList<Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels(); Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(Tel, CodeStr, channel[0], out result);//发送 #region 短信日志 Eyousoft_yhq.Model.MsgLog MsLogS = new Eyousoft_yhq.Model.MsgLog { TelCode = Tel, MsgText = CodeStr, ReResult = result }; new Eyousoft_yhq.BLL.MsgLog().Add(MsLogS); #endregion if (result == "成功") { List<string[]> list = new List<string[]>(); if (Session[Tel] != null) { list = Session[Tel] as List<string[]>; if (list.Count > 5) { result = "重复次数过多,请24小时之后再操作!"; return; } string[] arrStr = new string[] { Tel, Code, DateTime.Now.ToString() }; list.Add(arrStr); } else { list.Add(new string[] { Tel, Code, DateTime.Now.ToString() }); Session[Tel] = list; } Session.Timeout = 1440; } else { result = "短信中心维护中!"; } }
protected void NewSedCode(string Tel) { string Code = string.Empty; Code = new Random().Next(1000, 9999).ToString(); string SendByteCode = ""; for (int i = 0; i < Code.Length; i++) { SendByteCode += Code[i] + "、"; } SendByteCode = SendByteCode.TrimEnd('、'); string CodeStr = string.Format("你正在注册惠旅游,验证码为{0},验证码为{0},有效期为五分钟,请不要向别人泄露验证码!如果不是本人操作可以忽略!【惠旅游】", SendByteCode); Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (exModel.MsgNumber <= 0) { result = "短信中心维护中!"; return; } result = Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMSVoice(Tel, CodeStr); #region 短信日志 Eyousoft_yhq.Model.MsgLog MsLogS = new Eyousoft_yhq.Model.MsgLog { TelCode = Tel, MsgText = CodeStr, ReResult = result }; new Eyousoft_yhq.BLL.MsgLog().Add(MsLogS); #endregion if (result == "成功") { List <string[]> list = new List <string[]>(); if (Session[Tel] != null) { list = Session[Tel] as List <string[]>; if (list.Count > 5) { result = "重复次数过多,请24小时之后再操作!"; return; } string[] arrStr = new string[] { Tel, Code, DateTime.Now.ToString() }; list.Add(arrStr); } else { list.Add(new string[] { Tel, Code, DateTime.Now.ToString() }); Session[Tel] = list; } Session.Timeout = 1440; } else { result = "短信中心维护中!"; } }
protected void sendMsg(string pid, string FavourCode) { Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (exModel.MsgNumber > 0) { var model = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo(); IList <Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels(); string code = string.Empty; if (model != null && model.UserName != "") { bool isSend = new Eyousoft_yhq.BLL.SendMsg().exists(model.UserName, pid, FavourCode); if (isSend) { result = "您已经领取过此产品的优惠码!"; return; } if (!model.valiUser) { var sendModel = new Eyousoft_yhq.BLL.Product().GetModel(pid); if (sendModel != null && !sendModel.IsEveryDay) { code = string.Format("您成功获取{0},{3}出团,优惠价{1}元,优惠码:{2}!【惠旅游】" , sendModel.ProductName , sendModel.AppPrice.ToString("C2") , sendModel.FavourCode , Utils.GetDateTime(sendModel.TourDate.ToString()).ToString("yyyy-MM-dd")); Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(model.UserName, code, channel[0], out result);//发送 } else if (sendModel != null && sendModel.IsEveryDay) { code = string.Format("您成功获取{0},优惠价{1}元,优惠码:{2}!【惠旅游】" , sendModel.ProductName , sendModel.AppPrice.ToString("C2") , sendModel.FavourCode); Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(model.UserName, code, channel[0], out result);//发送 } else { result = "此产品已下架!"; } #region 短信日志 Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog { TelCode = model.UserName, MsgText = code, ReResult = result }; new Eyousoft_yhq.BLL.MsgLog().Add(MsLog); #endregion } } else { Response.Redirect("/login.aspx"); } if (result == "成功") { int minusNum = code.Length % 70 == 0 ? code.Length / 70 : (code.Length / 70) + 1; new Eyousoft_yhq.BLL.SendMsg().Add(new Eyousoft_yhq.Model.SendMSG { SendNum = model.UserName, SendText = code, IssueTime = DateTime.Now, ProductID = pid, minusNum = minusNum, FavourCode = FavourCode }); result = "短信已发送,请注意查收!"; } else { result = "领取失败!"; } } else { result = "短信系统维护中,请稍后再试!"; } }
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 void btnSave_Click(object sender, EventArgs e) { bool r = new Eyousoft_yhq.BLL.KV().SetCompanySetting(this.GetFormValue()); EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this, string.Format("保存{0}!", r ? "成功" : "失败"), "/WebMaster/CompanyInfo.aspx"); }
/// <summary> /// 添加订单 /// </summary> /// <returns></returns> private string saveOrder() { Eyousoft_yhq.Model.OrderState Orderstate = Eyousoft_yhq.Model.OrderState.未处理; int orderNums = Utils.GetInt(Utils.GetFormValue("orderNum")); string id = Utils.GetFormValue("id"); var model = new Eyousoft_yhq.BLL.Product().GetModel(id); if (model != null) { if (model.ResidueNum - orderNums >= 0) { Orderstate = Eyousoft_yhq.Model.OrderState.待付款; } Eyousoft_yhq.BLL.Order OrderBll = new Eyousoft_yhq.BLL.Order(); var MemberModel = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo(); if (MemberModel != null) { Eyousoft_yhq.Model.Order OrderModel = new Eyousoft_yhq.Model.Order() { ProductID = id, OrderCode = DateTime.Now.ToString("yyyy-MM-dd "), MemberID = MemberModel.UserID, MemberTel = Utils.GetFormValue("receiveMobile"), MemberName = Utils.GetFormValue("receiveName"), MemberSex = MemberModel.ContactSex, OrderState = Orderstate, PayState = Eyousoft_yhq.Model.PaymentState.未支付, IsCheck = true, ConfirmCode = "", Remark = "", OrderPrice = model.AppPrice * orderNums, PeopleNum = orderNums }; int num = OrderBll.Add(OrderModel); if (num > 0 && Orderstate == Eyousoft_yhq.Model.OrderState.待付款) { return(UtilsCommons.AjaxReturnJson("1", "操作成功,请及时付款!", OrderModel.OrderID)); } if (num > 0 && Orderstate == Eyousoft_yhq.Model.OrderState.未处理) { string result = string.Empty; //返回发送结果 string sendNum = string.Empty; //发送账号 Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting(); if (exModel == null || exModel.MsgNumber <= 0) { return(UtilsCommons.AjaxReturnJson("2", "操作成功,等待审核!短信发送失败,请联系我们!")); } IList <Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels(); var ProductTypeModel = new Eyousoft_yhq.BLL.ProductType().GetModel(model.ProductType); if (ProductTypeModel == null || ProductTypeModel.AdminName == null) { sendNum = HuiYuanInfo.ContactTel; string Msg = "收到新订单请处理,订单号为:" + OrderModel.OrderCode.Trim() + "!【惠旅游】"; 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 } else { for (int i = 0; i < ProductTypeModel.AdminName.Count; i++) { sendNum = new Eyousoft_yhq.BLL.User().GetModel(ProductTypeModel.AdminName[i].AdminN).Telephone; string Msg = "收到新订单请处理,订单号为:" + OrderModel.OrderCode.Trim() + "!【惠旅游】"; 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("2", "操作成功,等待审核!已通知客服人员!")); } return(UtilsCommons.AjaxReturnJson("2", "操作成功,等待审核!短信发送失败,请联系我们!")); } return(UtilsCommons.AjaxReturnJson("0", "操作失败!")); } else { return(UtilsCommons.AjaxReturnJson("0", "操作失败,请登陆后重新操作... ...")); } } return(UtilsCommons.AjaxReturnJson("0", "操作失败,此产品已经下架... ...")); }