/// <summary> /// 审核 /// </summary> protected bool CheckCompany() { bool Result = false; string CompanyId = Request.QueryString["CompanyId"]; if (!string.IsNullOrEmpty(CompanyId)) { Result = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().PassRegister(CompanyId); } if (Result) { EyouSoft.Model.CompanyStructure.CompanyDetailInfo _detailCompanyInfo = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(CompanyId); //公司信息 EyouSoft.Model.CompanyStructure.CompanyUser _companyUser = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance().GetAdminModel(CompanyId); //公司管理员信息 if (_detailCompanyInfo != null) { //审核通过发送短信 bool isSend = Utils.SendSMSForReminderRegPass(_detailCompanyInfo.ContactInfo.Mobile, _detailCompanyInfo.AdminAccount.UserName, _detailCompanyInfo.ContactInfo.MQ, _detailCompanyInfo.CityId); if (isSend) { //发送短信记录 EyouSoft.Model.ToolStructure.MsgTipRecord tipModel = new EyouSoft.Model.ToolStructure.MsgTipRecord(); tipModel.Email = string.Empty; tipModel.FromMQID = _detailCompanyInfo.ContactInfo.MQ; tipModel.ToMQID = _detailCompanyInfo.ContactInfo.MQ; tipModel.Mobile = _detailCompanyInfo.ContactInfo.Mobile; tipModel.MsgType = EyouSoft.Model.ToolStructure.MsgType.RegPass; tipModel.SendWay = EyouSoft.Model.ToolStructure.MsgSendWay.SMS; EyouSoft.BLL.ToolStructure.MsgTipRecord msgTipBll = new EyouSoft.BLL.ToolStructure.MsgTipRecord(); msgTipBll.Add(tipModel); } //审核通过发送邮件 EyouSoft.Common.Email.ReminderEmailHelper.SendRegPassEmail( _detailCompanyInfo.AdminAccount.UserName, _detailCompanyInfo.ContactInfo.Email, _companyUser != null ? _companyUser.PassWordInfo.NoEncryptPassword : ""); _detailCompanyInfo = null; } } return(Result); }
/// <summary> /// 加好友时,设置我的客户 /// </summary> private void SetCustomer() { if (SiteUserInfo != null && !string.IsNullOrEmpty(SiteUserInfo.ID)) { string companyId = Utils.InputText(Request.QueryString["CompanyId"]); if (EyouSoft.BLL.CompanyStructure.MyCustomer.CreateInstance().SetMyCustomer(SiteUserInfo.ID, companyId)) { //得到需要发送的公司的信息 EyouSoft.Model.CompanyStructure.CompanyDetailInfo model = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(companyId); //得到需要发送的公司的管理员用户信息 EyouSoft.Model.CompanyStructure.CompanyUser companyUser = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance().GetAdminModel(companyId); //添加短信提示功能 add by dyz 2010-10-25 bool isSend = Utils.SendSMSForReminderAddFriend(model.ContactInfo.MQ, model.ContactInfo.Mobile, SiteUserInfo.CompanyName, SiteUserInfo.ContactInfo.ContactName, model.CityId); if (isSend) { //发送短信记录 EyouSoft.Model.ToolStructure.MsgTipRecord tipModel = new EyouSoft.Model.ToolStructure.MsgTipRecord(); tipModel.Email = string.Empty; tipModel.FromMQID = SiteUserInfo.ContactInfo.MQ; tipModel.ToMQID = model.ContactInfo.MQ; //接收方MQ tipModel.Mobile = model.ContactInfo.Mobile; //接收方手机 tipModel.MsgType = EyouSoft.Model.ToolStructure.MsgType.AddFriend; tipModel.SendWay = EyouSoft.Model.ToolStructure.MsgSendWay.SMS; EyouSoft.BLL.ToolStructure.MsgTipRecord msgTipBll = new EyouSoft.BLL.ToolStructure.MsgTipRecord(); msgTipBll.Add(tipModel); } //添加邮件提示功能 add by dyz 2010-10-26 EyouSoft.Common.Email.ReminderEmailHelper.SendAddFriendEmail( model.AdminAccount.UserName, model.ContactInfo.Email, companyUser != null ? companyUser.PassWordInfo.NoEncryptPassword : "", SiteUserInfo.ContactInfo.ContactName); } } }
protected void SaveOrder() { //团队所属公司ID string TourCompanyId = ""; //获得订单信息 tourModel = tourBll.GetTourInfo(tourId); string priceId = Utils.GetFormValue("ro_rdiPriceStandId");//获取选择的报价等级编号 EyouSoft.Model.TourStructure.TourOrder orderModel = new EyouSoft.Model.TourStructure.TourOrder(); orderModel.AdultNumber = Utils.GetInt(Utils.GetFormValue("ro_txtManCount"), 0); //获取成人数 orderModel.BuyCompanyID = SiteUserInfo.CompanyID; //预定单位 orderModel.BuyCompanyName = SiteUserInfo.CompanyName; //预定单位名 orderModel.ChildNumber = Utils.GetInt(Utils.GetFormValue("ro_txtChildCount"), 0); //儿童数 EyouSoft.Model.TourStructure.TourPriceDetail price = tourModel.TourPriceDetail.Where(i => i.PriceStandId == priceId).First(); //根据获取的报价等级编号获取相应报价等级 orderModel.ChildPrice = price.PriceDetail.Where(i => i.CustomerLevelType == EyouSoft.Model.CompanyStructure.CustomerLevelType.行).First().ChildrenPrice;//儿童价 TourCompanyId = tourModel.CompanyID; orderModel.CompanyID = TourCompanyId; orderModel.ContactFax = SiteUserInfo.ContactInfo.Fax; orderModel.ContactMQ = SiteUserInfo.ContactInfo.MQ; orderModel.ContactName = SiteUserInfo.ContactInfo.ContactName; orderModel.ContactQQ = SiteUserInfo.ContactInfo.QQ; orderModel.ContactTel = SiteUserInfo.ContactInfo.Tel; orderModel.LastOperatorID = SiteUserInfo.ID; //最后操作人 orderModel.MarketNumber = int.Parse(Utils.GetFormValue("ro_txtOneRoomCount")); //单房差数 orderModel.MarketPrice = price.PriceDetail.Where(i => i.CustomerLevelType == EyouSoft.Model.CompanyStructure.CustomerLevelType.单房差).First().AdultPrice; //单房差价 orderModel.OperatorContent = Utils.GetFormValue("ro_txtOperatorContent"); //操作留言 orderModel.OperatorID = SiteUserInfo.ID; //操作人ID orderModel.OperatorName = SiteUserInfo.ContactInfo.ContactName; //操作人名 orderModel.OrderType = 0; //预定类型 orderModel.OtherPrice = decimal.Parse(Utils.GetFormValue("ro_txtOtherPrice")); //其他费用 orderModel.PeopleNumber = orderModel.ChildNumber + orderModel.AdultNumber; //总人数 if (orderModel.PeopleNumber == 0) { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('请填写游客!');</script>"); } orderModel.AreaType = tourModel.AreaType; orderModel.AreaId = tourModel.AreaId; orderModel.PersonalPrice = price.PriceDetail.Where(i => i.CustomerLevelType == EyouSoft.Model.CompanyStructure.CustomerLevelType.行).First().AdultPrice; //成人价 orderModel.PriceStandId = priceId; //报价等级 orderModel.RouteName = tourModel.RouteName; orderModel.LeaveDate = tourModel.LeaveDate; //出发时间 orderModel.SpecialContent = Utils.GetFormValue("ro_txtSpecialContent"); //特别要求 orderModel.SumPrice = orderModel.AdultNumber * orderModel.PersonalPrice + orderModel.ChildNumber * orderModel.ChildPrice + orderModel.MarketNumber * orderModel.MarketPrice + orderModel.OtherPrice; //总金额 orderModel.TourCompanyId = tourModel.CompanyID; //专线编号 orderModel.TourCompanyName = tourModel.CompanyName; //专线公司名 orderModel.TourDays = tourModel.TourDays; //天数 orderModel.SaveSeatDate = DateTime.Now; //留位时间 orderModel.TourId = tourModel.ID; //团队编号 orderModel.TourNo = tourModel.TourNo; //团号 orderModel.TourType = EyouSoft.Model.TourStructure.TourType.组团团队; orderModel.IssueTime = DateTime.Now; //添加时间 orderModel.OrderSource = EyouSoft.Model.TourStructure.TourOrderOperateType.组团社下单; //订单来源 //获得游客信息 List <EyouSoft.Model.TourStructure.TourOrderCustomer> customerList = new List <EyouSoft.Model.TourStructure.TourOrderCustomer>(); List <string> custNoList = Request.Form.AllKeys.Where(i => i.Contains("CustomerName")).Select(i => i.Substring(12, i.Length - 12)).ToList(); foreach (string customerNo in custNoList) { EyouSoft.Model.TourStructure.TourOrderCustomer customerModel = new EyouSoft.Model.TourStructure.TourOrderCustomer(); customerModel.CompanyID = SiteUserInfo.CompanyID; //所属公司 customerModel.CompanyName = SiteUserInfo.CompanyName; //所属公司名 customerModel.ContactTel = Utils.GetFormValue("CustomerTelphone" + customerNo); customerModel.CradNumber = Utils.GetFormValue("CertificateNo" + customerNo); //证件编号 customerModel.CradType = (EyouSoft.Model.TourStructure.CradType) int.Parse(Utils.GetFormValue("CertificateName" + customerNo)); //证件类型 customerModel.Remark = Utils.GetFormValue("CustomerRemark" + customerNo); //备注信息 customerModel.Sex = Utils.GetFormValue("CustomerSex" + customerNo) == "1"?true:false; //性别 customerModel.SiteNo = Utils.GetFormValue("CustomerSiteNo" + customerNo); //座位号 orderModel.SeatList += customerModel.SiteNo + ","; //座位号集 customerModel.VisitorName = Utils.GetFormValue("CustomerName" + customerNo); //姓名 customerModel.VisitorType = Utils.GetFormValue("CustomerType" + customerNo) == "1"?true:false; //类型(成人,儿童) customerModel.IssueTime = DateTime.Now; customerModel.RouteName = routeName; customerModel.TourId = tourId; //团队ID customerModel.TourNo = tourModel.TourNo; //团号 customerList.Add(customerModel); } orderModel.SeatList = orderModel.SeatList.TrimEnd(','); //获得座位号 orderModel.TourOrderCustomer = customerList; //保存游客信息 EyouSoft.IBLL.TourStructure.ITourOrder tourOrderBll = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance(); //开始下订单 if (tourOrderBll.AddTourOrder(orderModel) > 0) { EyouSoft.Model.CompanyStructure.CompanyDetailInfo _companyInfo = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(TourCompanyId); bool isSend = Utils.SendSMSForReminderOrder( TourCompanyId, SiteUserInfo.CompanyName, SiteUserInfo.ContactInfo.ContactName, _companyInfo != null ? _companyInfo.CityId : 0); if (isSend) { EyouSoft.Model.CompanyStructure.CompanyDetailInfo model = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(TourCompanyId); //发送短信记录 EyouSoft.Model.ToolStructure.MsgTipRecord tipModel = new EyouSoft.Model.ToolStructure.MsgTipRecord(); tipModel.Email = string.Empty; tipModel.FromMQID = SiteUserInfo.ContactInfo.MQ; tipModel.ToMQID = model.ContactInfo.MQ; //接收方MQ tipModel.Mobile = model.ContactInfo.Mobile; //接收方手机 tipModel.MsgType = EyouSoft.Model.ToolStructure.MsgType.NewOrder; tipModel.SendWay = EyouSoft.Model.ToolStructure.MsgSendWay.SMS; EyouSoft.BLL.ToolStructure.MsgTipRecord msgTipBll = new EyouSoft.BLL.ToolStructure.MsgTipRecord(); msgTipBll.Add(tipModel); } Utils.SendEmailForReminderOrder(TourCompanyId, SiteUserInfo.CompanyName, SiteUserInfo.UserName); Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('预定成功!');if(window.parent.Boxy){window.parent.Boxy.getIframeDialog('" + Request.QueryString["iframeId"] + "').hide();if(window.parent.RouteStock){window.parent.RouteStock.refresh();};}else{window.close();}</script>"); } else { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('预定失败!');</script>"); } }