/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourID"></param> /// <param name="adultCount"></param> /// <param name="childCount"></param> /// <param name="contact"></param> /// <param name="tel"></param> private void PageInit(string tourID, string adultCount, string childCount, string contact, string tel) { EyouSoft.IBLL.NewTourStructure.IPowderList tourBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance(); EyouSoft.Model.NewTourStructure.MPowderList model = tourBll.GetModel(tourID); if (model != null) { EyouSoft.IBLL.NewTourStructure.IRoute routeBll = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance(); EyouSoft.Model.NewTourStructure.MRoute routeModel = routeBll.GetModel(model.RouteId); this.lblRouteName.Text = "<a href='/PrintPage/LineTourInfo.aspx?RouteID=" + model.RouteId + "' target='_blank'>" + model.RouteName + "</a>"; this.lblLeaveDate.Text = model.LeaveDate.ToString("yyyy-MM-dd") + "(" + Utils.GetDayOfWeek((int)model.LeaveDate.DayOfWeek) + ") "; //出团日期 this.lblCount.Text = model.MoreThan.ToString(); //余位 this.lblLeaveCityandTracffic.Text = model.StartTraffic + " " + model.StartCityName; //出发交通和城市 this.lbEndCityandTracffic.Text = model.EndTraffic + " " + model.EndCityName; //返程交通和城市 this.lblTourState.Text = model.PowderTourStatus.ToString(); //团队状态 this.lbLeavedate.Text = model.StartDate; //航班出发时间 this.lbEnddate.Text = model.EndDate; //航班返程时间 this.txtAdultCount.Value = adultCount; //成人数 this.txtChildCount.Value = childCount; //儿童数 this.txtContact.Value = contact; //联系人 this.txtConTactTel.Value = tel; //联系电话 if (model.RouteType == EyouSoft.Model.SystemStructure.AreaType.国际线) { this.lbd_price.Text = model.AdultPrice.ToString("F0") + "元/人 "; } #region 团队 价格信息 //市场价 this.lblRetailAdultPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.RetailAdultPrice); this.lblRetailChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.RetailChildrenPrice); this.lblMarketPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.MarketPrice); //结算价 this.lblSettlementAudltPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementAudltPrice); this.lblSettlementChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementChildrenPrice); #endregion //处理总金额 //市场价总价 this.lblReailPriceAll.Text = "0"; //结算总价 this.lblSettlePriceAll.Text = "0"; } }
/// <summary> /// 日历子团信息 /// 取有用到的数据,没登录时,过滤掉同行价 /// </summary> protected IList <EyouSoft.Model.NewTourStructure.MPowderList> filterChildren(IList <EyouSoft.Model.NewTourStructure.MPowderList> OldChildrens) { IList <EyouSoft.Model.NewTourStructure.MPowderList> NewChildrens = new List <EyouSoft.Model.NewTourStructure.MPowderList>(); foreach (EyouSoft.Model.NewTourStructure.MPowderList Model in OldChildrens) { EyouSoft.Model.NewTourStructure.MPowderList item = new EyouSoft.Model.NewTourStructure.MPowderList(); item.TourId = Model.TourId; item.TourNo = Model.TourNo; item.LeaveDate = Model.LeaveDate; item.RetailAdultPrice = Model.RetailAdultPrice; item.PowderTourStatus = Model.PowderTourStatus; item.MoreThan = Model.MoreThan; item.TourNum = Model.TourNum; item.IsLimit = Model.IsLimit; NewChildrens.Add(item); item = null; } return(NewChildrens); }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourID"></param> /// <param name="adultCount"></param> /// <param name="childCount"></param> /// <param name="contact"></param> /// <param name="tel"></param> private void PageInit(string tourID, string adultCount, string childCount, string contact, string tel) { EyouSoft.IBLL.NewTourStructure.IPowderList tourBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance(); EyouSoft.Model.NewTourStructure.MPowderList model = tourBll.GetModel(tourID); if (model != null) { EyouSoft.IBLL.NewTourStructure.IRoute routeBll = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance(); EyouSoft.Model.NewTourStructure.MRoute routeModel = routeBll.GetModel(model.RouteId); this.lblRouteName.Text = "<a href='/PrintPage/LineTourInfo.aspx?routeID=" + model.RouteId + "' target='_blank'>" + model.RouteName + "</a>"; this.lblLeaveDate.Text = model.LeaveDate.ToString("yyyy-MM-dd"); this.lblCount.Text = model.MoreThan.ToString(); this.lblLeaveCity.Text = model.StartCityName; this.lblCar.Text = model.StartTraffic + " " + model.EndTraffic; this.lblLeaveCon.Text = model.StartDate; this.lblBackCon.Text = model.EndDate; this.lblMsg.Text = model.SetDec; this.lblAllMsg.Text = model.TeamLeaderDec; #region 团队 价格信息 //市场价 this.lblRetailAdultPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.RetailAdultPrice); this.lblRetailChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.RetailChildrenPrice); this.lblMarketPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.MarketPrice); //结算价 this.lblSettlementAudltPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementAudltPrice); this.lblSettlementChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementChildrenPrice); #endregion //处理总金额 //市场价总价 this.lblReailPriceAll.Text = "0"; //结算总价 this.lblSettlePriceAll.Text = "0"; } }
private string FormSave() { //声明操作BLL EyouSoft.IBLL.NewTourStructure.IPowderList tourBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance(); //创建新的订单 EyouSoft.Model.NewTourStructure.MTourOrder orderModel = new EyouSoft.Model.NewTourStructure.MTourOrder(); string tourID = Utils.GetQueryStringValue("tourID"); //成人数 int adultCount = Utils.GetInt(Utils.GetFormValue(this.txtAdultCount.UniqueID)); if (adultCount == 0) { return("请输入成人数!"); } //儿童数 int childCount = Utils.GetInt(Utils.GetFormValue(this.txtChildCount.UniqueID)); //单房差 int otherCount = Utils.GetInt(Utils.GetFormValue(this.txtOtherCount.UniqueID)); //游客联系人 string contact = Utils.GetFormValue(this.txtContact.UniqueID); //游客联系电话 string conTactTel = Utils.GetFormValue(this.txtConTactTel.UniqueID); //负责人 string travelID = Utils.GetFormValue(this.hideTravelID.UniqueID); string travelName = Utils.GetFormValue(this.txtTravel.UniqueID); string fzr = Utils.GetFormValue(this.txtFzr.UniqueID); //负责人电话 string fzrTel = Utils.GetFormValue(this.txtFzrTel.UniqueID); //增减结算价 decimal addPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtAddPrice.UniqueID)); //游客备注 //组团备注 string remark = Utils.GetFormValue(this.txtRemark.UniqueID); #region 处理旅客 string[] txtName = Utils.GetFormValues("txtName"); string[] txtTel = Utils.GetFormValues("txtTel"); string[] txtCard = Utils.GetFormValues("txtCard"); string[] txtCardS = Utils.GetFormValues("txtCardS"); string[] txtCardT = Utils.GetFormValues("txtCardT"); string[] sltSex = Utils.GetFormValues("sltSex"); string[] sltChild = Utils.GetFormValues("sltChild"); string[] txtNumber = Utils.GetFormValues("txtNumber"); string[] txtRemarks = Utils.GetFormValues("txtRemarks"); string[] cbxVisitor = Utils.GetFormValues("cbxVisitor"); IList <EyouSoft.Model.NewTourStructure.MTourOrderCustomer> customerList = new List <EyouSoft.Model.NewTourStructure.MTourOrderCustomer>(); if (txtName.Length > 0) { for (int i = 0; i < txtName.Length; i++) { EyouSoft.Model.NewTourStructure.MTourOrderCustomer model = new EyouSoft.Model.NewTourStructure.MTourOrderCustomer(); model.CertificatesType = EyouSoft.Model.TicketStructure.TicketCardType.身份证; model.CompanyId = "";//SiteUserInfo.CompanyID if (cbxVisitor.Contains((i + 1).ToString())) { model.IsSaveToTicketVistorInfo = true; } model.ContactTel = txtTel[i]; model.CradType = sltChild[i] == "1" ? EyouSoft.Model.TicketStructure.TicketVistorType.成人 : EyouSoft.Model.TicketStructure.TicketVistorType.儿童; model.IdentityCard = txtCard[i]; model.IssueTime = DateTime.Now; model.Notes = txtRemarks[i]; model.OtherCard = txtCardT[i]; model.Passport = txtCardS[i]; model.Sex = sltSex[i] == "0" ? EyouSoft.Model.CompanyStructure.Sex.男 : EyouSoft.Model.CompanyStructure.Sex.女; model.SiteNo = txtNumber[i]; model.VisitorName = txtName[i]; customerList.Add(model); } } #endregion #region 订单实体赋值 orderModel.Reduction = addPrice; orderModel.AdultNum = adultCount; #region 获得计划中价格信息 decimal reAdultPrice = 0; decimal reChilePrice = 0; decimal reOtherPrice = 0; decimal seAdultPrice = 0; decimal seChildPrice = 0; EyouSoft.Model.NewTourStructure.MPowderList tourModel = tourBll.GetModel(tourID); if (tourModel != null) { reAdultPrice = tourModel.RetailAdultPrice; reChilePrice = tourModel.RetailChildrenPrice; reOtherPrice = tourModel.MarketPrice; seAdultPrice = tourModel.SettlementAudltPrice; seChildPrice = tourModel.SettlementChildrenPrice; //订单实体赋值 orderModel.BusinessNotes = ""; orderModel.DayNum = tourModel.Day; orderModel.LateNum = tourModel.Late; orderModel.LeaveDate = tourModel.LeaveDate; orderModel.RouteId = tourModel.RouteId; orderModel.RouteName = tourModel.RouteName; orderModel.ScheduleNum = tourModel.OrderPeopleNum; orderModel.TourId = tourModel.TourId; orderModel.TourNo = tourModel.TourNo; } #endregion orderModel.ChildPrice = reChilePrice; orderModel.ChildrenNum = childCount; orderModel.Customers = customerList; orderModel.IssueTime = DateTime.Now; orderModel.MarketPrice = reOtherPrice; orderModel.OperationMsg = ""; orderModel.OperatorId = ""; //SiteUserInfo.ID; orderModel.OperatorName = ""; // SiteUserInfo.ContactInfo.ContactName; orderModel.OrderStatus = EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理; orderModel.PaymentStatus = EyouSoft.Model.NewTourStructure.PaymentStatus.游客未支付; orderModel.PersonalPrice = reAdultPrice; orderModel.SaveDate = null; orderModel.SettlementAudltPrice = seAdultPrice; orderModel.SettlementChildrenPrice = seChildPrice; orderModel.SingleRoomNum = otherCount; orderModel.Travel = travelID; orderModel.TravelName = travelName; orderModel.TravelContact = fzr; orderModel.TravelTel = fzrTel; orderModel.VisitorContact = contact; orderModel.VisitorTel = conTactTel; orderModel.BusinessNotes = remark; orderModel.TotalSalePrice = adultCount * reAdultPrice + childCount * reChilePrice + otherCount * reOtherPrice + addPrice; orderModel.TotalSettlementPrice = adultCount * seAdultPrice + childCount * seChildPrice; if (EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance().AddOrUpdTourOrder(orderModel)) { return("ok"); } else { return("服务器忙,请稍后再试!"); } #endregion }
protected void Page_Load(object sender, EventArgs e) { this.Master.CTAB = SeniorOnlineShop.master.T4TAB.散拼计划; string RouteID = Utils.GetQueryStringValue("routeId"); if (!Page.IsPostBack) { EyouSoft.Model.CompanyStructure.CompanyDetailInfo Userinfo = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(this.Master.CompanyId); if (Userinfo != null) { if (Userinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.专线)) { Role = "1"; } if (Userinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.组团)) { Role = "2"; } if (!Userinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.专线) && !Userinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.组团)) { Role = "3"; } } if (IsLogin) { if (Userinfo != null) { if (Userinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.组团)) { Contect = this.Master.CompanyInfo.ContactInfo.ContactName; contecttel = this.Master.CompanyInfo.ContactInfo.Tel; } } } //根据团号取成人市场价 string tourid = Utils.GetQueryStringValue("tourid"); if (tourid != null && !string.IsNullOrEmpty(tourid)) { EyouSoft.Model.NewTourStructure.MPowderList PowderList = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance().GetModel(tourid); if (PowderList != null) { Response.Clear(); Response.Write("" + Utils.FilterEndOfTheZeroDecimal(PowderList.RetailAdultPrice) + ""); Response.End(); } } if (RouteID != "") { PrintUrl = "<a href=\"" + Domain.UserBackCenter + "/PrintPage/LineTourInfo.aspx?RouteId=" + RouteID + "\" target=\"_blank\"><img src=\"" + ImageServerPath + "/images/but03.gif\" border=\"0\" /></a>"; //初始化团队信息 this.GetTourInfo(RouteID); GetPowerList(RouteID); } else { Response.Clear(); Response.Redirect("" + Domain.SeniorOnlineShop + "/seniorshop/TourList.aspx"); Response.End(); } } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourID"></param> /// <param name="adultCount"></param> /// <param name="childCount"></param> /// <param name="contact"></param> /// <param name="tel"></param> private void PageInit(string tourID, string adultCount, string childCount, string contact, string tel) { EyouSoft.IBLL.NewTourStructure.IPowderList tourBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance(); EyouSoft.Model.NewTourStructure.MPowderList model = tourBll.GetModel(tourID); if (model != null) { EyouSoft.IBLL.NewTourStructure.IRoute routeBll = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance(); EyouSoft.Model.NewTourStructure.MRoute routeModel = routeBll.GetModel(model.RouteId); this.lblRouteName.Text = "<a href='/PrintPage/LineTourInfo.aspx?RouteID=" + model.RouteId + "' target='_blank'>" + model.RouteName + "</a>"; this.lblLeaveDate.Text = model.LeaveDate.ToString("yyyy-MM-dd") + "(" + Utils.GetDayOfWeek((int)model.LeaveDate.DayOfWeek) + ")"; this.lblCount.Text = model.MoreThan.ToString(); if (model.RouteType == EyouSoft.Model.SystemStructure.AreaType.国际线) { this.lbPrice_d.Text = model.AdultPrice.ToString("F0"); } this.lblTourState.Text = model.PowderTourStatus.ToString(); this.lblCompanyName.Text = " <a target=\"_blank\" href=\"" + Utils.GetShopUrl(model.Publishers) + "\">" + model.PublishersName + "</a>"; #region 获得专线公司信息 EyouSoft.Model.CompanyStructure.CompanyInfo comModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(model.Publishers); if (comModel != null && comModel.ContactInfo != null) { this.lblMq.Text = Utils.GetMQ(comModel.ContactInfo.MQ); this.lblQQ.Text = Utils.GetQQ(comModel.ContactInfo.QQ); } #endregion this.lblLeaveCityandTraffic.Text = model.StartTraffic + " " + model.StartCityName + " "; this.lblEndCityandTraffic.Text = model.EndTraffic + " " + model.EndCityName + " "; this.lbLeavedate.Text = model.StartDate; this.lbEnddate.Text = model.EndDate; this.lblMsg.Text = model.SetDec; this.lblAllMsg.Text = model.TeamLeaderDec; if (contact != "") { this.txtFzr.Value = contact; } else { this.txtFzr.Value = SiteUserInfo.ContactInfo.ContactName; } if (tel != "") { this.txtFzrTel.Value = tel; } else { this.txtFzrTel.Value = SiteUserInfo.ContactInfo.Tel; } if (adultCount != "") { this.txtAdultCount.Value = adultCount; } if (childCount != "") { this.txtChildCount.Value = childCount; } #region 团队 价格信息 //市场价 this.lblRetailAdultPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.RetailAdultPrice); this.lblRetailChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.RetailChildrenPrice); this.lblMarketPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.MarketPrice); //结算价 this.lblSettlementAudltPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementAudltPrice); this.lblSettlementChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementChildrenPrice); #endregion //处理总金额 //市场价总价 this.lblReailPriceAll.Text = Utils.FilterEndOfTheZeroDecimal(Utils.GetInt(adultCount) * model.RetailAdultPrice + Utils.GetInt(childCount) * model.RetailChildrenPrice); //结算总价 this.lblSettlePriceAll.Text = Utils.FilterEndOfTheZeroDecimal(Utils.GetInt(adultCount) * model.SettlementAudltPrice + Utils.GetInt(childCount) * model.SettlementChildrenPrice); } }
private string FormSave() { //声明操作BLL EyouSoft.IBLL.NewTourStructure.IPowderList tourBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance(); //创建新的订单 EyouSoft.Model.NewTourStructure.MTourOrder orderModel = new EyouSoft.Model.NewTourStructure.MTourOrder(); string tourID = Utils.GetQueryStringValue("tourID"); //成人数 int adultCount = Utils.GetInt(Utils.GetFormValue(this.txtAdultCount.UniqueID)); if (adultCount == 0) { return("请输入成人数!"); } //儿童数 int childCount = Utils.GetInt(Utils.GetFormValue(this.txtChildCount.UniqueID)); //单房差 int otherCount = Utils.GetInt(Utils.GetFormValue(this.txtOtherCount.UniqueID)); //游客联系人 string contact = Utils.GetFormValue(this.txtContact.UniqueID); //游客联系电话 string conTactTel = Utils.GetFormValue(this.txtConTactTel.UniqueID); //负责人 string fzr = Utils.GetFormValue(this.txtFzr.UniqueID); if (fzr == "") { fzr = SiteUserInfo.ContactInfo.ContactName; } //负责人电话 string fzrTel = Utils.GetFormValue(this.txtFzrTel.UniqueID); if (fzrTel == "") { fzrTel = SiteUserInfo.ContactInfo.Tel; } //增减价格 decimal addPrice = 0; decimal.TryParse(Utils.GetFormValue(this.txtAddPrice.UniqueID), out addPrice); //增减结算价 decimal reductPrice = 0; decimal.TryParse(Utils.GetFormValue(this.txtReductPrice.UniqueID), out reductPrice); //游客备注 string cusRemark = Utils.GetFormValue(this.txtCusRemark.UniqueID); //组团备注 string remark = Utils.GetFormValue(this.txtRemark.UniqueID); #region 处理旅客 string[] txtName = Utils.GetFormValues("txtName"); string[] txtTel = Utils.GetFormValues("txtTel"); string[] txtCard = Utils.GetFormValues("txtCard"); string[] txtCardS = Utils.GetFormValues("txtCardS"); string[] txtCardT = Utils.GetFormValues("txtCardT"); string[] sltSex = Utils.GetFormValues("sltSex"); string[] sltChild = Utils.GetFormValues("sltChild"); string[] txtNumber = Utils.GetFormValues("txtNumber"); string[] txtRemarks = Utils.GetFormValues("txtRemarks"); string[] cbxVisitor = Utils.GetFormValues("cbxVisitor"); IList <EyouSoft.Model.NewTourStructure.MTourOrderCustomer> customerList = new List <EyouSoft.Model.NewTourStructure.MTourOrderCustomer>(); if (txtName.Length > 0) { for (int i = 0; i < txtName.Length; i++) { EyouSoft.Model.NewTourStructure.MTourOrderCustomer model = new EyouSoft.Model.NewTourStructure.MTourOrderCustomer(); model.CertificatesType = EyouSoft.Model.TicketStructure.TicketCardType.身份证; model.CompanyId = SiteUserInfo.CompanyID; if (cbxVisitor.Contains((i + 1).ToString())) { model.IsSaveToTicketVistorInfo = true; } model.Mobile = txtTel[i]; model.CradType = sltChild[i] == "0" ? EyouSoft.Model.TicketStructure.TicketVistorType.成人 : EyouSoft.Model.TicketStructure.TicketVistorType.儿童; model.IdentityCard = txtCard[i]; model.IssueTime = DateTime.Now; model.Notes = txtRemarks[i]; model.OtherCard = txtCardT[i]; model.Passport = txtCardS[i]; model.Sex = sltSex[i] == "0" ? EyouSoft.Model.CompanyStructure.Sex.男 : EyouSoft.Model.CompanyStructure.Sex.女; model.SiteNo = txtNumber[i]; model.VisitorName = txtName[i]; customerList.Add(model); } } #endregion #region 订单实体赋值 orderModel.Add = addPrice; orderModel.AdultNum = adultCount; orderModel.Reduction = reductPrice; #region 获得计划中价格信息 decimal reAdultPrice = 0; decimal reChilePrice = 0; decimal reOtherPrice = 0; decimal seAdultPrice = 0; decimal seChildPrice = 0; EyouSoft.Model.NewTourStructure.MPowderList tourModel = tourBll.GetModel(tourID); if (tourModel != null) { reAdultPrice = tourModel.RetailAdultPrice; reChilePrice = tourModel.RetailChildrenPrice; reOtherPrice = tourModel.MarketPrice; seAdultPrice = tourModel.SettlementAudltPrice; seChildPrice = tourModel.SettlementChildrenPrice; //订单实体赋值 orderModel.BusinessNotes = ""; orderModel.DayNum = tourModel.Day; orderModel.LateNum = tourModel.Late; orderModel.LeaveDate = tourModel.LeaveDate; orderModel.RouteId = tourModel.RouteId; orderModel.RouteName = tourModel.RouteName; orderModel.ScheduleNum = tourModel.OrderPeopleNum; orderModel.TourId = tourModel.TourId; orderModel.TourNo = tourModel.TourNo; } else { Response.Clear(); Response.Write("error"); Response.End(); } #endregion orderModel.ChildPrice = reChilePrice; orderModel.ChildrenNum = childCount; orderModel.Customers = customerList; orderModel.IssueTime = DateTime.Now; orderModel.MarketPrice = reOtherPrice; orderModel.OperationMsg = ""; orderModel.OperatorId = SiteUserInfo.ID; orderModel.OperatorName = SiteUserInfo.ContactInfo.ContactName; orderModel.OrderStatus = EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理; orderModel.PaymentStatus = EyouSoft.Model.NewTourStructure.PaymentStatus.游客未支付; orderModel.PersonalPrice = reAdultPrice; orderModel.SaveDate = null; orderModel.SettlementAudltPrice = seAdultPrice; orderModel.SettlementChildrenPrice = seChildPrice; orderModel.SingleRoomNum = otherCount; orderModel.VisitorNotes = cusRemark; orderModel.Travel = SiteUserInfo.CompanyID; orderModel.TravelContact = fzr; orderModel.TravelName = SiteUserInfo.CompanyName; orderModel.TravelNotes = remark; orderModel.TravelTel = fzrTel; orderModel.VisitorContact = contact; orderModel.VisitorNotes = cusRemark; orderModel.VisitorTel = conTactTel; //计划销售总价 orderModel.TotalSalePrice = adultCount * reAdultPrice + childCount * reChilePrice + otherCount * reOtherPrice + addPrice; //计算结算总价 orderModel.TotalSettlementPrice = adultCount * seAdultPrice + childCount * seChildPrice + reductPrice; if (EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance().AddOrUpdTourOrder(orderModel)) { #region 发送短信模块 EyouSoft.Model.SystemStructure.MSysSettingInfo SettingInfoModel = EyouSoft.BLL.SystemStructure.SystemInfo.CreateInstance().GetSysSetting(); //获得组团公司实体 EyouSoft.Model.CompanyStructure.CompanyDetailInfo travelComModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID); ////获得专线或地接公司实体 EyouSoft.Model.CompanyStructure.CompanyDetailInfo tourComModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(tourModel.Publishers); if (SettingInfoModel != null && travelComModel != null && tourComModel != null) { if (SettingInfoModel.OrderSmsCompanyTypes.Contains(travelComModel.CompanyLev)) { string sendMsg = SettingInfoModel.OrderSmsTemplate; sendMsg = sendMsg.Replace("[预订公司]", SiteUserInfo.CompanyName); sendMsg = sendMsg.Replace("[预订联系电话]", SiteUserInfo.ContactInfo.Mobile); sendMsg = sendMsg.Replace("[预订出发时间]", tourModel.LeaveDate.ToString("yyyy-MM-dd")); sendMsg = sendMsg.Replace("[预订产品]", tourModel.RouteName); sendMsg = sendMsg.Replace("[预订数量]", orderModel.AdultNum.ToString() + "成," + orderModel.ChildrenNum.ToString() + "儿"); #region 发送操作 EyouSoft.Model.SMSStructure.SendMessageInfo sendMessageInfo = new EyouSoft.Model.SMSStructure.SendMessageInfo(); sendMessageInfo.CompanyId = orderModel.Travel; sendMessageInfo.CompanyName = orderModel.TravelName; sendMessageInfo.UserId = this.SiteUserInfo.ID; sendMessageInfo.UserFullName = SiteUserInfo.ContactInfo.ContactName; sendMessageInfo.SMSContent = sendMsg; sendMessageInfo.SendTime = DateTime.Now; //添加要发送的手机号码 List <EyouSoft.Model.SMSStructure.AcceptMobileInfo> moblieList = new List <EyouSoft.Model.SMSStructure.AcceptMobileInfo>(); EyouSoft.Model.SMSStructure.AcceptMobileInfo mobileModel = new EyouSoft.Model.SMSStructure.AcceptMobileInfo(); mobileModel.IsEncrypt = false; if (tourComModel.ContactInfo != null) { mobileModel.Mobile = tourComModel.ContactInfo.Mobile; } moblieList.Add(mobileModel); sendMessageInfo.Mobiles = moblieList; //发送通道 EyouSoft.Model.SMSStructure.SMSChannel sendChannel = new EyouSoft.Model.SMSStructure.SMSChannelList()[Convert.ToInt32(SettingInfoModel.OrderSmsChannelIndex)]; sendMessageInfo.SendChannel = sendChannel; sendMessageInfo.SendType = EyouSoft.Model.SMSStructure.SendType.直接发送; EyouSoft.IBLL.SMSStructure.ISendMessage sBll = EyouSoft.BLL.SMSStructure.SendMessage.CreateInstance(); EyouSoft.Model.SMSStructure.SendResultInfo SendResultModel = sBll.Send(sendMessageInfo); SendResultModel = null; sendMessageInfo = null; #endregion } } #endregion return("ok"); } else { return("服务器忙,请稍后再试!"); } #endregion }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourID"></param> /// <param name="adultCount"></param> /// <param name="childCount"></param> /// <param name="contact"></param> /// <param name="tel"></param> private void PageInit(string orderID) { EyouSoft.IBLL.NewTourStructure.ITourOrder orderBll = EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance(); EyouSoft.Model.NewTourStructure.MTourOrder model = orderBll.GetModel(orderID); if (model != null) { EyouSoft.IBLL.NewTourStructure.IPowderList tourBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance(); EyouSoft.Model.NewTourStructure.MPowderList tourModel = tourBll.GetModel(model.TourId); if (tourModel == null) { Utils.Show("error"); return; } this.lblRouteName.Text = "<a href='/PrintPage/LineTourInfo.aspx?RouteID=" + model.RouteId + "' target='_blank'>" + model.RouteName + "</a>"; this.lblLeaveDate.Text = model.LeaveDate.ToString("yyyy-MM-dd"); this.lblCompanyName.Text = " <a target=\"_blank\" href=\"" + Utils.GetCompanyDomain(model.Travel, EyouSoft.Model.CompanyStructure.CompanyType.组团) + "\">" + model.TravelName + "</a>"; #region 获得组团公司信息 EyouSoft.Model.CompanyStructure.CompanyInfo comModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(model.Travel); if (comModel != null && comModel.ContactInfo != null) { this.lblMq.Text = Utils.GetMQ(comModel.ContactInfo.MQ); this.lblQQ.Text = Utils.GetQQ(comModel.ContactInfo.QQ); } #endregion this.lblOrderNo.Text = model.OrderNo; this.lblTourState.Text = tourModel.PowderTourStatus.ToString(); this.lblCount.Text = tourModel.MoreThan.ToString(); this.lblLeaveCity.Text = tourModel.StartCityName; this.lblRemarks.Text = model.BusinessNotes; this.lblCar.Text = tourModel.StartTraffic + " " + tourModel.EndTraffic; this.lblLeaveCon.Text = tourModel.StartDate; this.lblBackCon.Text = tourModel.EndDate; this.lblMsg.Text = tourModel.SetDec; this.lblAllMsg.Text = tourModel.TeamLeaderDec; this.lblContact.Text = model.VisitorContact; this.lblConTactTel.Text = model.VisitorTel; this.lblFzr.Text = model.TravelContact; this.lblFzrTel.Text = model.TravelTel; this.txtAdultCount.Value = model.AdultNum.ToString(); this.txtChildCount.Value = model.ChildrenNum.ToString(); this.txtOtherCount.Value = model.SingleRoomNum.ToString(); this.lblAddDate.Text = model.IssueTime.ToString("yyyy-MM-dd") + " " + model.OperatorName; #region 团队 价格信息 //市场价 this.lblRetailAdultPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.PersonalPrice); this.lblRetailChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.ChildPrice); this.lblMarketPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.MarketPrice); //结算价 this.lblSettlementAudltPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementAudltPrice); this.lblSettlementChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementChildrenPrice); #endregion //处理总金额 //市场价总价 this.lblReailPriceAll.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalSalePrice); //结算总价 this.lblSettlePriceAll.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalSettlementPrice); // this.OrderCustomer1.TourOrderCustomer = model.Customers; #region 处理订单状态和支付状态 this.pnlSave.Visible = false; this.pnlYuLiu.Visible = false; this.pnlQueDing.Visible = false; this.pnlJieDan.Visible = false; switch (model.OrderStatus) { case EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理: case EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社已阅: case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商待处理: this.lblOrderState.Text = "未处理"; this.pnlSave.Visible = true; this.pnlYuLiu.Visible = true; this.pnlQueDing.Visible = true; this.pnlJieDan.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商预留: this.lblOrderState.Text = "专线预留,留位日期:" + Convert.ToDateTime(model.SaveDate).ToString("yyyy-MM-dd"); this.pnlSave.Visible = true; this.pnlQueDing.Visible = true; this.pnlJieDan.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.预留过期: this.lblOrderState.Text = "留位过期"; this.pnlSave.Visible = true; this.pnlQueDing.Visible = true; this.pnlJieDan.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.结单: this.lblOrderState.Text = "已结单"; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.取消: this.lblOrderState.Text = "已取消"; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商已确定: this.lblOrderState.Text = "专线已确定"; this.pnlJieDan.Visible = true; break; } this.pnlLitPay.Visible = false; this.pnlAllPay.Visible = false; switch (model.PaymentStatus) { case EyouSoft.Model.NewTourStructure.PaymentStatus.游客待支付: case EyouSoft.Model.NewTourStructure.PaymentStatus.游客未支付: this.lblPayState.Text = "游客未付款"; this.pnlLitPay.Visible = true; this.pnlAllPay.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付定金: this.lblPayState.Text = "游客已支付定金"; this.pnlLitPay.Visible = true; this.pnlAllPay.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付全款: this.lblPayState.Text = "游客已支付全款"; this.pnlLitPay.Visible = true; this.pnlAllPay.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付定金: this.lblPayState.Text = "已收定金"; this.pnlAllPay.Visible = true; this.pnlSave.Visible = false; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付全款: this.lblPayState.Text = "已收全款"; this.pnlSave.Visible = false; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.结账: this.lblPayState.Text = "该单已结账"; this.pnlSave.Visible = false; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.申请退款: this.lblPayState.Text = "申请退款"; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.已退款: this.lblPayState.Text = "已退款"; break; } #endregion } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourID"></param> /// <param name="adultCount"></param> /// <param name="childCount"></param> /// <param name="contact"></param> /// <param name="tel"></param> private void PageInit(string orderID) { EyouSoft.IBLL.NewTourStructure.ITourOrder orderBll = EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance(); EyouSoft.Model.NewTourStructure.MTourOrder model = orderBll.GetModel(orderID); if (model != null) { EyouSoft.IBLL.NewTourStructure.IPowderList tourBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance(); EyouSoft.Model.NewTourStructure.MPowderList tourModel = tourBll.GetModel(model.TourId); this.lblRouteName.Text = "<a href='/PrintPage/LineTourInfo.aspx?RouteID=" + model.RouteId + "' target='_blank'>" + model.RouteName + "</a>"; this.lblLeaveDate.Text = model.LeaveDate.ToString("yyyy-MM-dd") + "(" + Utils.GetDayOfWeek((int)model.LeaveDate.DayOfWeek) + ") ";//出团日期(周几) this.lblCount.Text = tourModel.MoreThan.ToString(); this.lblTourState.Text = tourModel.PowderTourStatus.ToString(); this.lblCompanyName.Text = " <a target=\"_blank\" href=\"" + Utils.GetShopUrl(tourModel.Publishers) + "\">" + tourModel.PublishersName + "</a>"; #region 获得专线公司信息 EyouSoft.Model.CompanyStructure.CompanyInfo comModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(tourModel.Publishers); if (comModel != null && comModel.ContactInfo != null) { this.lblMq.Text = Utils.GetMQ(comModel.ContactInfo.MQ); this.lblQQ.Text = Utils.GetQQ(comModel.ContactInfo.QQ); } #endregion this.txtAddPrice.Value = model.Add.ToString("0.00"); this.txtReductPrice.Value = model.Reduction.ToString("0.00"); this.lblLeaveCityandTracffic.Text = tourModel.StartTraffic + " " + tourModel.StartCityName; //出发交通和城市 this.lbEndCityandTracffic.Text = tourModel.EndTraffic + " " + tourModel.EndCityName; //返程交通和城市 //this.lbPrice_d.Text = tourModel.AdultPrice.ToString("F0"); this.lbEnddate.Text = tourModel.EndDate; this.lbLeavedate.Text = tourModel.StartDate; this.lblOrder.Text = model.OrderNo; this.lblMsg.Text = tourModel.SetDec; this.lblAllMsg.Text = tourModel.TeamLeaderDec; this.txtContact.Value = model.VisitorContact; this.txtConTactTel.Value = model.VisitorTel; this.txtFzr.Value = model.TravelContact; this.txtFzrTel.Value = model.TravelTel; this.txtAdultCount.Value = model.AdultNum.ToString(); this.txtChildCount.Value = model.ChildrenNum.ToString(); this.txtOtherCount.Value = model.SingleRoomNum.ToString(); this.lblAddDate.Text = model.IssueTime.ToString("yyyy-MM-dd") + " " + model.OperatorName; this.txtRemark.Value = model.TravelNotes; this.lblCusRemark.Text = model.VisitorNotes; #region 团队 价格信息 //市场价 this.lblRetailAdultPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.PersonalPrice); this.lblRetailChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.ChildPrice); this.lblMarketPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.MarketPrice); //结算价 this.lblSettlementAudltPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementAudltPrice); this.lblSettlementChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementChildrenPrice); #endregion //处理总金额 //市场价总价 this.lblReailPriceAll.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalSalePrice); //结算总价 this.lblSettlePriceAll.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalSettlementPrice); this.OrderCustomer1.TourOrderCustomer = model.Customers; #region 处理订单状态和支付状态 this.pnlSave.Visible = false; this.pnlCanel.Visible = false; switch (model.OrderStatus) { case EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理: case EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社已阅: case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商待处理: this.lblOrderState.Text = "专线待处理"; this.pnlSave.Visible = true; this.pnlCanel.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商预留: this.lblOrderState.Text = "专线预留,留位日期:" + model.SaveDate == null ? "" : Convert.ToDateTime(model.SaveDate).ToString("yyyy-MM-dd"); this.pnlCanel.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.预留过期: this.lblOrderState.Text = "留位过期"; this.pnlCanel.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.结单: this.lblOrderState.Text = "已结单"; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.取消: this.lblOrderState.Text = "已取消"; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商已确定: this.lblOrderState.Text = "专线已确定"; this.pnlCanel.Visible = true; break; } this.pnlLitPay.Visible = false; this.pnlAllPay.Visible = false; this.pnlTuiKuan.Visible = false; switch (model.PaymentStatus) { case EyouSoft.Model.NewTourStructure.PaymentStatus.游客待支付: case EyouSoft.Model.NewTourStructure.PaymentStatus.游客未支付: this.lblPayState.Text = "待支付"; this.pnlLitPay.Visible = true; this.pnlAllPay.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付定金: this.lblPayState.Text = "已支付定金"; this.pnlAllPay.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付全款: this.lblPayState.Text = "已支付全款"; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付定金: this.lblPayState.Text = "专线已收定金"; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付全款: this.lblPayState.Text = "专线已收全款"; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.结账: this.lblPayState.Text = "已付全款"; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.申请退款: this.lblPayState.Text = "申请退款"; this.pnlTuiKuan.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.已退款: this.lblPayState.Text = "已退款"; break; } #endregion } }