/// <summary> /// 新增记录 /// </summary> /// <param name="model">消息提醒记录实体</param> /// <returns></returns> public virtual bool Add(EyouSoft.Model.ToolStructure.MsgTipRecord model) { string SQL = "INSERT INTO tbl_MsgTipList (ID,ToMQID,Mobile,Email,MsgType,SendWay,FromMQID,SendTime,SendState,IssueTime) VALUES (@ID,@ToMQID,@Mobile,@Email,@MsgType,@SendWay,@FromMQID,@SendTime,@SendState,@IssueTime);"; if (model.SendWay == EyouSoft.Model.ToolStructure.MsgSendWay.SMS) { SQL += "UPDATE tbl_MsgTip_SmsRemain SET count=count-1;"; } DbCommand dc = this._database.GetSqlStringCommand(SQL); this._database.AddInParameter(dc, "ID", DbType.AnsiStringFixedLength, Guid.NewGuid().ToString()); this._database.AddInParameter(dc, "ToMQID", DbType.AnsiString, model.ToMQID); this._database.AddInParameter(dc, "Mobile", DbType.String, model.Mobile); this._database.AddInParameter(dc, "Email", DbType.String, model.Email); this._database.AddInParameter(dc, "MsgType", DbType.Byte, Convert.ToByte(model.MsgType)); this._database.AddInParameter(dc, "SendWay", DbType.Byte, Convert.ToByte(model.SendWay)); this._database.AddInParameter(dc, "FromMQID", DbType.AnsiString, model.FromMQID); this._database.AddInParameter(dc, "SendTime", DbType.DateTime, DateTime.Now); this._database.AddInParameter(dc, "SendState", DbType.Byte, 0); this._database.AddInParameter(dc, "IssueTime", DbType.DateTime, DateTime.Now); if (DbHelper.ExecuteSql(dc, this._database) > 0) { return(true); } else { return(false); } }
/// <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> /// <param name="srcMq">发送人</param> /// <param name="dstMq">接收人</param> public void SendMessage(int srcMq, int dstMq) { Model.CompanyStructure.CompanyUser ToCompany = uIdal.GetModel(dstMq); Model.CompanyStructure.CompanyAndUserInfo fromCompany = GetUserCompanyModel(srcMq); if (ToCompany != null && fromCompany != null) { if (IsSendMsgTip(EyouSoft.Model.ToolStructure.MsgType.MQNoReadMsg, EyouSoft.Model.ToolStructure.MsgSendWay.SMS, dstMq.ToString(), ToCompany.CityId)) { SendMail(ToCompany.ContactInfo.Email, ToCompany.UserName, dstMq.ToString(), ToCompany.PassWordInfo.NoEncryptPassword); SendSms(ToCompany.ContactInfo.Mobile, fromCompany.Company.CompanyName, fromCompany.User.ContactInfo.ContactName, ToCompany.UserName); EyouSoft.Model.ToolStructure.MsgTipRecord tipModel = new EyouSoft.Model.ToolStructure.MsgTipRecord(); tipModel.Email = string.Empty; tipModel.FromMQID = srcMq.ToString(); tipModel.ToMQID = dstMq.ToString(); tipModel.Mobile = ToCompany.ContactInfo.Mobile; tipModel.MsgType = EyouSoft.Model.ToolStructure.MsgType.MQNoReadMsg; tipModel.SendWay = EyouSoft.Model.ToolStructure.MsgSendWay.SMS; idal.Add(tipModel); } } }
/// <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>"); } }
public void Test() { return; string companyid = "a0e2aceb-4ffe-4f9f-8413-96f9b13cf820"; EyouSoft.IDAL.CompanyStructure.ICompanyAttachInfo idal5 = EyouSoft.Component.Factory.ComponentFactory.CreateDAL <EyouSoft.IDAL.CompanyStructure.ICompanyAttachInfo>(); EyouSoft.Model.CompanyStructure.CompanyAttachInfo modelattach = new EyouSoft.Model.CompanyStructure.CompanyAttachInfo(); modelattach.Bronze = "Bronze"; modelattach.BusinessCertif.BusinessCertImg = "BusinessCertif.BusinessCertImg"; modelattach.BusinessCertif.LicenceImg = "BusinessCertif.LicenceImg"; modelattach.BusinessCertif.TaxRegImg = "BusinessCertif.TaxRegImg"; modelattach.CommitmentImg = "CommitmentImg"; modelattach.CompanyCard.ImageLink = "CompanyCard.ImageLink"; modelattach.CompanyCard.ImagePath = "CompanyCard.ImagePath"; modelattach.CompanyCard.ThumbPath = "CompanyCard.ThumbPath"; modelattach.CompanyId = companyid; modelattach.CompanyImg.ImageLink = "CompanyImg.ImageLink"; modelattach.CompanyImg.ImagePath = "CompanyImg.ImagePath"; modelattach.CompanyImg.ThumbPath = "CompanyImg.ThumbPath"; modelattach.CompanyLogo.ImageLink = "CompanyLogo.ImageLink"; modelattach.CompanyLogo.ImagePath = "CompanyLogo.ImagePath"; modelattach.CompanyLogo.ThumbPath = "CompanyLogo.ThumbPath"; modelattach.CompanyMQAdv.ImageLink = "CompanyMQAdv.ImageLink"; modelattach.CompanyMQAdv.ImagePath = "CompanyMQAdv.ImagePath"; modelattach.CompanyMQAdv.ThumbPath = "CompanyMQAdv.ThumbPath"; //modelattach.CompanyShopBanner.ImageLink = "CompanyShopBanner.ImageLink"; modelattach.CompanyShopBanner.ImagePath = "CompanyShopBanner.ImagePath"; //modelattach.CompanyShopBanner.ThumbPath = "CompanyShopBanner.ThumbPath"; modelattach.CompanySignet = "CompanySignet"; modelattach.TradeAward = "TradeAward"; modelattach.CompanyShopBanner.BannerType = EyouSoft.Model.CompanyStructure.ShopBannerType.Default; modelattach.CompanyShopBanner.CompanyLogo = "CompanyLogo.ImagePath"; modelattach.CompanyShopBanner.ImagePath = "CompanyShopBanner.ImagePath"; modelattach.CompanyShopBanner.BannerBackground = "CompanyShopBanner.BannerBackground"; bool result = idal5.SetCompanyAttachInfo(modelattach); EyouSoft.Model.CompanyStructure.CardInfo card = new EyouSoft.Model.CompanyStructure.CardInfo(); card.ImageLink = "card.ImageLink"; card.ImagePath = "card.ImagePath"; card.ThumbPath = "card.ThumbPath"; bool result1 = idal5.SetCompanyCard(companyid, card); EyouSoft.Model.CompanyStructure.CompanyImg img = new EyouSoft.Model.CompanyStructure.CompanyImg(); img.ImageLink = "img.ImageLink"; img.ImagePath = "img.ImagePath"; img.ThumbPath = "img.ThumbPath"; bool result2 = idal5.SetCompanyImage(companyid, img); EyouSoft.Model.CompanyStructure.CompanyLogo logo = new EyouSoft.Model.CompanyStructure.CompanyLogo(); logo.ImageLink = "logo.ImageLink"; logo.ImagePath = "logo.ImagePath"; logo.ThumbPath = "logo.ThumbPath"; bool result3 = idal5.SetCompanyLogo(companyid, logo); EyouSoft.Model.CompanyStructure.CompanyMQAdv mqadv = new EyouSoft.Model.CompanyStructure.CompanyMQAdv(); mqadv.ImageLink = "mqadv.ImageLink"; mqadv.ImagePath = "mqadv.ImagePath"; mqadv.ThumbPath = "mqadv.ThumbPath"; bool result4 = idal5.SetCompanyMQAdv(companyid, mqadv); EyouSoft.Model.CompanyStructure.CompanyShopBanner shop = new EyouSoft.Model.CompanyStructure.CompanyShopBanner(); //shop.ImageLink = "shop.ImageLink"; shop.ImagePath = "shop.ImagePath"; //shop.ThumbPath = "shop.ThumbPath"; shop.BannerType = EyouSoft.Model.CompanyStructure.ShopBannerType.Default; shop.CompanyLogo = "shop.CompanyLogo"; shop.ImagePath = "shop.ImagePath"; shop.BannerBackground = "shop.BannerBackground"; bool result5 = idal5.SetCompanyShopBanner(companyid, shop); EyouSoft.Model.CompanyStructure.CompanyAttachInfo attachmodel = idal5.GetModel(companyid); int i = 0; return; EyouSoft.IDAL.MQStructure.IIMMessage idal4 = EyouSoft.Component.Factory.ComponentFactory.CreateDAL <EyouSoft.IDAL.MQStructure.IIMMessage>(); IList <EyouSoft.Model.MQStructure.IMMessage> list4 = idal4.GetTodayLastMessage(0); return; bool issend = false; issend = EyouSoft.BLL.ToolStructure.MsgTipRecord.CreateInstance().IsSendMsgTip(EyouSoft.Model.ToolStructure.MsgType.AddFriend, EyouSoft.Model.ToolStructure.MsgSendWay.SMS, "48075", 362); return; EyouSoft.IDAL.MQStructure.IIMMember idal1 = EyouSoft.Component.Factory.ComponentFactory.CreateDAL <EyouSoft.IDAL.MQStructure.IIMMember>(); IList <Model.CompanyStructure.CompanyUserBase> list1 = idal1.GetLongOffLineList(29, 362); EyouSoft.IDAL.CompanyStructure.ICompanyUser idal2 = EyouSoft.Component.Factory.ComponentFactory.CreateDAL <EyouSoft.IDAL.CompanyStructure.ICompanyUser>(); EyouSoft.Model.CompanyStructure.CompanyUser model2 = idal2.GetAdminModel("40e1a851-6057-4dd9-ae0b-c270566303ac"); EyouSoft.IDAL.ToolStructure.IMsgTipRecord idal3 = EyouSoft.Component.Factory.ComponentFactory.CreateDAL <EyouSoft.IDAL.ToolStructure.IMsgTipRecord>(); EyouSoft.Model.ToolStructure.MsgTipRecord msgmodel = new EyouSoft.Model.ToolStructure.MsgTipRecord(); msgmodel.Email = "*****@*****.**"; msgmodel.FromMQID = "35967"; //mqlogin msgmodel.ToMQID = "48075"; //mqlogin_1 msgmodel.Mobile = "13777476875"; msgmodel.MsgType = EyouSoft.Model.ToolStructure.MsgType.AddFriend; msgmodel.SendWay = EyouSoft.Model.ToolStructure.MsgSendWay.Email; bool istrue = idal3.Add(msgmodel); int count = idal3.GetTodayCount(EyouSoft.Model.ToolStructure.MsgType.AddFriend, EyouSoft.Model.ToolStructure.MsgSendWay.Email, "48075"); }
/// <summary> /// 新增记录 /// </summary> /// <param name="model">消息提醒记录实体</param> /// <returns></returns> public bool Add(EyouSoft.Model.ToolStructure.MsgTipRecord model) { return(idal.Add(model)); }