protected void pageSave(string doType) { string id = Utils.GetQueryStringValue("id"); var model = new EyouSoft.Model.SSOStructure.MGuanLiYuanInfo(); #region 表单取值 string getusername = Utils.GetFormValue(userName.UniqueID); string getuserpwd = Utils.GetFormValue(userPwd.UniqueID); string getcontactname = Utils.GetFormValue(ContactName.UniqueID); string gettel = Utils.GetFormValue(tel.UniqueID); string getremark = Utils.GetFormValue(remark.UniqueID); #endregion #region 实体赋值 model.Username = getusername; model.MiMa = getuserpwd; model.XingMing = getcontactname; model.Telephone = gettel; model.BeiZhu = getremark; model.CreateTime = DateTime.Now; model.IsAdmin = false; string stroldupload = Utils.GetFormValue("hideFileInfo"); string newupload = Utils.GetFormValue(this.UploadSeal.ClientHideID); if (!string.IsNullOrEmpty(newupload)) { if (!string.IsNullOrEmpty(newupload)) { model.GongZhangFilepath = newupload.Split('|')[1]; } } else { model.GongZhangFilepath = stroldupload; } #endregion #region 提交保存 bool result = false; string msg = ""; Response.Clear(); model.LeiXing = Utils.GetEnumValue <Eyousoft_yhq.Model.WebmasterLeiXing>(Utils.GetFormValue("txtLeiXing"), Eyousoft_yhq.Model.WebmasterLeiXing.系统); Eyousoft_yhq.BLL.User BLL = new Eyousoft_yhq.BLL.User(); if (doType == "add") { result = BLL.Add(model); msg = result ? "添加成功!" : "添加失败!"; Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg)); } else { model.UserId = id; result = BLL.Update(model); msg = result ? "修改成功!" : "修改失败!"; Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg)); } Response.End(); #endregion }
protected void pageSave(string doType) { string id = Utils.GetQueryStringValue("id"); var model = new EyouSoft.Model.SSOStructure.MGuanLiYuanInfo(); #region 表单取值 string getusername = Utils.GetFormValue(userName.UniqueID); string getuserpwd = Utils.GetFormValue(userPwd.UniqueID); string getcontactname = Utils.GetFormValue(ContactName.UniqueID); string gettel = Utils.GetFormValue(tel.UniqueID); string getremark = Utils.GetFormValue(remark.UniqueID); #endregion #region 实体赋值 model.Username = getusername; model.MiMa = getuserpwd; model.XingMing = getcontactname; model.Telephone = gettel; model.BeiZhu = getremark; model.CreateTime = DateTime.Now; model.IsAdmin = false; string stroldupload = Utils.GetFormValue("hideFileInfo"); string newupload = Utils.GetFormValue(this.UploadSeal.ClientHideID); if (!string.IsNullOrEmpty(newupload)) { if (!string.IsNullOrEmpty(newupload)) { model.GongZhangFilepath = newupload.Split('|')[1]; } } else { model.GongZhangFilepath = stroldupload; } #endregion #region 提交保存 bool result = false; string msg = ""; Response.Clear(); model.LeiXing = Utils.GetEnumValue<Eyousoft_yhq.Model.WebmasterLeiXing>(Utils.GetFormValue("txtLeiXing"), Eyousoft_yhq.Model.WebmasterLeiXing.系统); Eyousoft_yhq.BLL.User BLL = new Eyousoft_yhq.BLL.User(); if (doType == "add") { result = BLL.Add(model); msg = result ? "添加成功!" : "添加失败!"; Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg)); } else { model.UserId = id; result = BLL.Update(model); msg = result ? "修改成功!" : "修改失败!"; Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg)); } Response.End(); #endregion }
protected void save() { bool Result = false; string dotype = Utils.GetQueryStringValue("dotype"); string RoleId = Utils.GetQueryStringValue("id"); EyouSoft.Model.SSOStructure.MGuanLiYuanInfo model = new EyouSoft.Model.SSOStructure.MGuanLiYuanInfo(); Eyousoft_yhq.BLL.User BComRoleBll = new Eyousoft_yhq.BLL.User(); int length = Utils.GetFormValues("chk_id").Length; for (int i = 0; i < length; i++) { model.Privs += Utils.GetFormValues("chk_id")[i] + ","; } if (!string.IsNullOrEmpty(model.Privs)) { model.Privs = model.Privs.Trim(','); } model.UserId = RoleId; Result = BComRoleBll.UpdatePrivs(model); if (Result) { Response.Write(UtilsCommons.AjaxReturnJson("1", "授权成功!")); } else { Response.Write(UtilsCommons.AjaxReturnJson("0", "授权失败!")); } Response.End(); }
protected void getSeal() { var admin = new Eyousoft_yhq.BLL.User().GetModel(HuiYuanInfo.UserId); if (admin != null) { SealImg = string.Format("<img id=\"Gimg\" src=\"{0}\" style=\"display:none\">", admin.GongZhangFilepath); } }
protected string initPrivList(string RoleID) { StringBuilder strCity = new StringBuilder(""); string[] strPriv; if (HuiYuanInfo.Username.ToLower() == "admin") { strPriv = new[] { "0" }; } else { strPriv = new[] { "0", "18" }; } var list = EnumObj.GetList(typeof(Eyousoft_yhq.Model.Privs), strPriv); if (list != null && list.Count > 0) { strCity.AppendFormat("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"><tbody>"); for (int i = 0; i < list.Count; i++) { if (i % 4 == 0) { strCity.AppendFormat("<tr>"); } var model = new Eyousoft_yhq.BLL.User().GetModel(RoleID); if (!string.IsNullOrEmpty(model.Privs) && model.Privs.Contains(list[i].Value)) { strCity.AppendFormat("<td height=\"26\" bgcolor=\"#FFFFFF\" align=\"left\"><label><input type=\"checkbox\" value=\"{0}\" id=\"{0}\" name=\"chk_id\" checked=\"checked\"> {1}</label></td>", list[i].Value, list[i].Text); } else { strCity.AppendFormat("<td height=\"26\" bgcolor=\"#FFFFFF\" align=\"left\"><label><input type=\"checkbox\" value=\"{0}\" id=\"{0}\" name=\"chk_id\"> {1}</label></td>", list[i].Value, list[i].Text); } if (i != 0 && i % 20 == 0 || i + 1 == list.Count) { strCity.AppendFormat("</tr>"); } } strCity.AppendFormat("</tbody></table>"); } return(strCity.ToString()); }
protected void initPage(string strid) { var model = new Eyousoft_yhq.BLL.User().GetModel(strid); if (model != null) { userName.Value = model.Username; userName.Attributes.Add("readonly", "readonly"); ContactName.Value = model.XingMing; tel.Value = model.Telephone; remark.Value = model.BeiZhu; if (!string.IsNullOrEmpty(model.GongZhangFilepath)) lblsealimg.Text = string.Format("<span class='upload_filename'><a href='{0}' target='_blank'>查看</a><a href=\"javascript:void(0)\" onclick=\"pageOpt.RemoveFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideFileInfo\" value='{0}'/></span>", model.GongZhangFilepath); LeiXing = ((int)model.LeiXing).ToString(); } }
protected string initPrivList(string RoleID) { StringBuilder strCity = new StringBuilder(""); string[] strPriv; if (HuiYuanInfo.Username.ToLower() == "admin") { strPriv = new[] { "0" }; } else { strPriv = new[] { "0", "18" }; } var list = EnumObj.GetList(typeof(Eyousoft_yhq.Model.Privs), strPriv); if (list != null && list.Count > 0) { strCity.AppendFormat("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"><tbody>"); for (int i = 0; i < list.Count; i++) { if (i % 4 == 0) { strCity.AppendFormat("<tr>"); } var model = new Eyousoft_yhq.BLL.User().GetModel(RoleID); if (!string.IsNullOrEmpty(model.Privs) && model.Privs.Contains(list[i].Value)) { strCity.AppendFormat("<td height=\"26\" bgcolor=\"#FFFFFF\" align=\"left\"><label><input type=\"checkbox\" value=\"{0}\" id=\"{0}\" name=\"chk_id\" checked=\"checked\"> {1}</label></td>", list[i].Value, list[i].Text); } else { strCity.AppendFormat("<td height=\"26\" bgcolor=\"#FFFFFF\" align=\"left\"><label><input type=\"checkbox\" value=\"{0}\" id=\"{0}\" name=\"chk_id\"> {1}</label></td>", list[i].Value, list[i].Text); } if (i != 0 && i % 20 == 0 || i + 1 == list.Count) { strCity.AppendFormat("</tr>"); } } strCity.AppendFormat("</tbody></table>"); } return strCity.ToString(); }
protected void initPage(string strid) { var model = new Eyousoft_yhq.BLL.User().GetModel(strid); if (model != null) { userName.Value = model.Username; userName.Attributes.Add("readonly", "readonly"); ContactName.Value = model.XingMing; tel.Value = model.Telephone; remark.Value = model.BeiZhu; if (!string.IsNullOrEmpty(model.GongZhangFilepath)) { lblsealimg.Text = string.Format("<span class='upload_filename'><a href='{0}' target='_blank'>查看</a><a href=\"javascript:void(0)\" onclick=\"pageOpt.RemoveFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideFileInfo\" value='{0}'/></span>", model.GongZhangFilepath); } LeiXing = ((int)model.LeiXing).ToString(); } }
/// <summary> /// 绑定省 /// </summary> /// <param name="selectItem">选中项</param> /// <returns></returns> public string BindProvice(string selectItem) { System.Text.StringBuilder query = new System.Text.StringBuilder(); var list = new Eyousoft_yhq.BLL.User().GetProList(new Eyousoft_yhq.Model.Pro_City_Area_StreetSer { level = 1 }); query.Append("<option value='0' >-请选择-</option>"); for (int i = 0; i < list.Count; i++) { if (list[i].code.ToString().Equals(selectItem)) { query.AppendFormat("<option value='{0}' selected='selected'>{1}</option>", list[i].code, list[i].name); } else { query.AppendFormat("<option value='{0}' >{1}</option>", list[i].code, list[i].name); } } return(query.ToString()); }
protected void initList() { Eyousoft_yhq.BLL.User bll = new Eyousoft_yhq.BLL.User(); var serchModel = new EyouSoft.Model.SSOStructure.MGuanLiYuanChaXunInfo(); serchModel.XingMing = Utils.GetQueryStringValue("contactName"); serchModel.Username = Utils.GetQueryStringValue("userName"); pageIndex = UtilsCommons.GetPagingIndex("Page"); var list = bll.GetList(pageSize, pageIndex, ref recordCount, serchModel); if (list != null && list.Count > 0) { rpt_list.DataSource = list; rpt_list.DataBind(); BindPage(); litMsg.Visible = false; } else { rpt_list.Visible = false; } }
/// <summary> /// 绑定管理员账号列表 /// </summary> /// <param name="areaId"></param> /// <returns></returns> protected string AdminList(IList<AdminNameList> items) { System.Text.StringBuilder option = new System.Text.StringBuilder(); //option.Append("<option value=''>-请选择-</option>"); Eyousoft_yhq.BLL.User bll = new Eyousoft_yhq.BLL.User(); var list = bll.GetList(null); for (int i = 0; i < items.Count(); i++) { if (list != null && list.Count > 0) { foreach (var item in list) { if (item.UserId == items[i].AdminN) { option.AppendFormat("<option value='{0}' >{1}</option>", item.UserId, item.Username); } } } } return option.ToString(); }
/// <summary> /// 绑定管理员账号列表 /// </summary> /// <param name="areaId"></param> /// <returns></returns> protected string BindAdmin(string id) { System.Text.StringBuilder option = new System.Text.StringBuilder(); //option.Append("<option value=''>-请选择-</option>"); Eyousoft_yhq.BLL.User bll = new Eyousoft_yhq.BLL.User(); var list = bll.GetList(null); if (list != null && list.Count > 0) { foreach (var item in list) { if (item.UserId.Equals(id)) { option.AppendFormat("<option value='{0}' selected='selected'>{1}</option>", item.UserId, item.Username); } else { option.AppendFormat("<option value='{0}' >{1}</option>", item.UserId, item.Username); } } } return option.ToString(); }
/// <summary> /// 绑定管理员账号列表 /// </summary> /// <param name="areaId"></param> /// <returns></returns> protected string BindAdmin(string id) { System.Text.StringBuilder option = new System.Text.StringBuilder(); //option.Append("<option value=''>-请选择-</option>"); Eyousoft_yhq.BLL.User bll = new Eyousoft_yhq.BLL.User(); var list = bll.GetList(null); if (list != null && list.Count > 0) { foreach (var item in list) { if (item.UserId.Equals(id)) { option.AppendFormat("<option value='{0}' selected='selected'>{1}</option>", item.UserId, item.Username); } else { option.AppendFormat("<option value='{0}' >{1}</option>", item.UserId, item.Username); } } } return(option.ToString()); }
/// <summary> /// 绑定管理员账号列表 /// </summary> /// <param name="areaId"></param> /// <returns></returns> protected string AdminList(IList <AdminNameList> items) { System.Text.StringBuilder option = new System.Text.StringBuilder(); //option.Append("<option value=''>-请选择-</option>"); Eyousoft_yhq.BLL.User bll = new Eyousoft_yhq.BLL.User(); var list = bll.GetList(null); for (int i = 0; i < items.Count(); i++) { if (list != null && list.Count > 0) { foreach (var item in list) { if (item.UserId == items[i].AdminN) { option.AppendFormat("<option value='{0}' >{1}</option>", item.UserId, item.Username); } } } } return(option.ToString()); }
/// <summary> /// 绑定城市 /// </summary> /// <param name="selectItem">选中项</param> /// <param name="proviceid">父级id</param> /// <returns></returns> public string BindCity(string selectItem,string proviceid) { System.Text.StringBuilder query = new System.Text.StringBuilder(); query.Append("<option value='0' >-请选择-</option>"); if (proviceid != "0") { var list = new Eyousoft_yhq.BLL.User().GetProList(new Eyousoft_yhq.Model.Pro_City_Area_StreetSer { level = 2, parentId = proviceid }); for (int i = 0; i < list.Count; i++) { if (list[i].code.ToString().Equals(selectItem)) { query.AppendFormat("<option value='{0}' selected='selected'>{1}</option>", list[i].code, list[i].name); } else { query.AppendFormat("<option value='{0}' >{1}</option>", list[i].code, list[i].name); } } } return query.ToString(); }
/// <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", "操作失败,此产品已经下架... ..."); }
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", "请先登录再操作!")); } }
/// <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", "操作失败,此产品已经下架... ...")); }
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", "请先登录再操作!"); } }