Exemplo n.º 1
0
        /// <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";
            }
        }
Exemplo n.º 2
0
        /// <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 + " &nbsp; " + 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";
            }
        }
Exemplo n.º 3
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
        }
Exemplo n.º 4
0
        /// <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);
            }
        }
Exemplo n.º 5
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 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
        }
Exemplo n.º 6
0
        /// <summary>
        /// 初始化基础信息
        /// </summary>
        private void InitBasicInfo()
        {
            if (UserInfoModel != null)
            {
                EyouSoft.Model.CompanyStructure.CompanyInfo comModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(UserInfoModel.CompanyID);
                if (comModel != null)
                {
                    this.lblLoginUser.Text = "您好," + UserInfoModel.UserName + Utils.GetCompanyLevImg(comModel.CompanyLev) + " 欢迎登录同业114。信息完整度:<a class=\"ff0000\" href='javascript:void(0);' onclick='topTab.open(\"/systemset/companyinfoset.aspx\",\"单位信息\");return false;' >" + (comModel.InfoFull * 100).ToString("00") + "%</a>";
                }
                else
                {
                    this.lblLoginUser.Text = "您好," + UserInfoModel.UserName + " 欢迎登录同业114。";
                }
            }
            EyouSoft.IBLL.CompanyStructure.ICompanySetting CSetBll   = EyouSoft.BLL.CompanyStructure.CompanySetting.CreateInstance();
            EyouSoft.Model.CompanyStructure.CompanySetting CSetModel = CSetBll.GetModel(UserInfoModel.CompanyID);
            if (CSetModel != null)
            {
                switch (CSetModel.FirstMenu)
                {
                case EyouSoft.Model.CompanyStructure.MenuSection.专线服务:
                    FirstMenu = "0";
                    break;

                case EyouSoft.Model.CompanyStructure.MenuSection.组团服务:
                    FirstMenu = "1";
                    break;

                case EyouSoft.Model.CompanyStructure.MenuSection.地接服务:
                    FirstMenu = "2";
                    break;

                case EyouSoft.Model.CompanyStructure.MenuSection.景区服务:
                    FirstMenu = "3";
                    break;

                default:
                    FirstMenu = "1";
                    break;
                }
            }

            #region 公告区
            EyouSoft.IBLL.SystemStructure.ISummaryCount SummaryBll   = EyouSoft.BLL.SystemStructure.SummaryCount.CreateInstance();
            EyouSoft.Model.SystemStructure.SummaryCount SummaryModel = SummaryBll.GetSummary();
            if (SummaryModel != null)
            {
                this.lblRouteAgencyCount.Text = (SummaryModel.TravelAgency + SummaryModel.TravelAgencyVirtual).ToString();
                this.lblHotelCount.Text       = (SummaryModel.Hotel + SummaryModel.HotelVirtual).ToString();
                this.lblSightCount.Text       = (SummaryModel.Sight + SummaryModel.SightVirtual).ToString();
                this.lblCarCount.Text         = (SummaryModel.Car + SummaryModel.CarVirtual).ToString();
                this.lblShoppingCount.Text    = (SummaryModel.Shop + SummaryModel.ShopVirtual).ToString();
            }
            SummaryModel = null;
            SummaryBll   = null;
            #endregion

            #region  业114提醒
            EyouSoft.Model.CompanyStructure.CompanyRole   RoleModel = UserInfoModel.CompanyRole;
            EyouSoft.Model.CompanyStructure.CompanyType[] enumType  = RoleModel.RoleItems;

            #region 专线和组团显示控制
            if (enumType != null && enumType.Length > 0)
            {
                foreach (EyouSoft.Model.CompanyStructure.CompanyType type in enumType)
                {
                    if (type == EyouSoft.Model.CompanyStructure.CompanyType.专线)
                    {
                        IsRouteAgency = true;
                    }
                    else if (type == EyouSoft.Model.CompanyStructure.CompanyType.组团 || type == EyouSoft.Model.CompanyStructure.CompanyType.其他采购商)
                    {
                        IsTourAgency = true;
                    }
                    else if (type == EyouSoft.Model.CompanyStructure.CompanyType.地接)
                    {
                        IsLocalAgency = true;
                    }
                    else if (type == EyouSoft.Model.CompanyStructure.CompanyType.景区)
                    {
                        IsSightAgency = true;
                    }
                    else
                    {
                        IsOther = true;
                    }
                }

                if (IsRouteAgency)   // 仅为专线
                {
                    this.span_RouteAgency.Visible = true;
                    this.ul_RouteAgency.Visible   = true;
                }
                if (IsTourAgency)     // 仅为组团
                {
                    this.span_TourAgency.Visible = true;
                    this.ul_TourAgency.Visible   = true;
                }
                if (IsLocalAgency)   //仅为地接
                {
                    this.span_ErAgency.Visible = true;
                    this.ul_ErAgency.Visible   = true;
                }
                if (IsSightAgency) //景区
                {
                    this.span_Scenic.Visible = true;
                    this.ul_Scenic.Visible   = true;
                }
                //if (IsOther)
                //{
                //    Utils.ShowError("对不起,您不是旅行社账户!", "");

                //    this.span_RouteAgency.Visible = false;
                //    this.ul_RouteAgency.Visible = false;
                //    this.span_TourAgency.Visible = false;
                //    this.ul_TourAgency.Visible = false;
                //    this.span_ErAgency.Visible = false;
                //    this.ul_ErAgency.Visible = false;
                //    this.span_Scenic.Visible = true;
                //    this.ul_Scenic.Visible = true;
                //    divNoLocalAgency.Visible = false;
                //}
            }
            #endregion

            EyouSoft.IBLL.TourStructure.ITour          TourBll   = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.IBLL.NewTourStructure.ITourList   iorderBll = EyouSoft.BLL.NewTourStructure.BTourList.CreateInstance();
            EyouSoft.IBLL.NewTourStructure.IPowderList powderBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance();
            EyouSoft.IBLL.NewTourStructure.IRoute      routeBll  = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance();
            Dictionary <string, int> dic = null;
            #region 组团提醒
            if (IsTourAgency)     // 组团提醒
            {
                //获得线路数和团队数
                EyouSoft.IBLL.SystemStructure.ISysCity CityBll   = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance();
                EyouSoft.Model.SystemStructure.SysCity CityModel = CityBll.GetSysCityModel(UserInfoModel.CityId);
                if (CityModel != null)
                {
                    this.lblCity.Text = CityModel.CityName;
                    this.lblTemplateTourCount.Text = CityModel.ParentTourCount.ToString();
                    this.lblChildTourCount.Text    = CityModel.TourCount.ToString();
                }
                CityModel = null;
                CityBll   = null;

                //获得组团订单信息
                dic = iorderBll.GetOrderTravelCount(UserInfoModel.CompanyID);
                if (dic != null)
                {
                    if (dic.ContainsKey("未发团散客预订单") && dic.ContainsKey("散客订单未处理") && dic.ContainsKey("散客订单预留待付款") && dic.ContainsKey("散客订单已确认"))
                    {
                        this.lblTourOrderFrist.Text = string.Format(
                            " 未发团散客预订单:<a class=\"ff0000\" href=\"/teamservice/fitorders.aspx?goTimeS={0}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                            DateTime.Now.ToShortDateString()) + dic["未发团散客预订单"].ToString() + "单</b></a>,";
                        this.lblTourOrderFrist.Text +=
                            string.Format(
                                "其中未处理<a class=\"ff0000\" href=\"/teamservice/fitorders.aspx?goTimeS={3}&status={0},{1},{2}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                                (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理,
                                (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社已阅,
                                (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商待处理,
                                DateTime.Now.ToShortDateString()) +
                            dic["散客订单未处理"].ToString() + "单</b></a>,";
                        this.lblTourOrderFrist.Text += string.Format(
                            "预留待付款<a class=\"ff0000\" href=\"/teamservice/fitorders.aspx?goTimeS={0}&status={1}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                            DateTime.Now.ToShortDateString(),
                            (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商预留)
                                                       + dic["散客订单预留待付款"].ToString() + "单</b></a>,";
                        this.lblTourOrderFrist.Text +=
                            string.Format(
                                "已确认<a href=\"/teamservice/fitorders.aspx?goTimeS={0}&status={1},{2}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                                DateTime.Now.ToShortDateString(),
                                (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商已确定,
                                (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.结单) +
                            dic["散客订单已确认"].ToString() + "单</b></a>";
                    }

                    if (dic.ContainsKey("未发团团队预订单") && dic.ContainsKey("团队未确认") && dic.ContainsKey("团队已确认"))
                    {
                        this.lblTourOrderSecond.Text = string.Format(
                            "未发团团队预订单:<a class=\"ff0000\" href=\"/teamservice/teamorders.aspx?ref=0&goTimeS={0}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                            DateTime.Now.ToShortDateString()) + dic["未发团团队预订单"].ToString() + "单</b></a>,";
                        this.lblTourOrderSecond.Text +=
                            string.Format(
                                "未确认订单<a class=\"ff0000\" href=\"/teamservice/teamorders.aspx?ref=0&goTimeS={1}&status={0}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                                (int)EyouSoft.Model.NewTourStructure.TourOrderStatus.未确认,
                                DateTime.Now.ToShortDateString()) +
                            dic["团队未确认"].ToString() + "单</b></a>,";
                        this.lblTourOrderSecond.Text +=
                            string.Format(
                                "已确认<a href=\"/teamservice/teamorders.aspx?ref=0&goTimeS={2}&status={0},{1}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                                (int)EyouSoft.Model.NewTourStructure.TourOrderStatus.已确认,
                                (int)EyouSoft.Model.NewTourStructure.TourOrderStatus.结单,
                                DateTime.Now.ToShortDateString()) +
                            dic["团队已确认"].ToString() + "单</b></a>";
                    }
                }
            }
            #endregion

            #region 专线提醒
            if (IsRouteAgency)
            {
                int ComingLeaveTourNumber = TourBll.GetComingExpireTourNumber();
                if (ComingLeaveTourNumber > 0)
                {
                    this.lblComingExpireToursCount.Text = "<img src='" + ImageServerPath + "/images/gantanhao.gif' />您当前共有<a href='/routeagency/notstartingteams.aspx' onclick=\"topTab.open($(this).attr('href'),'未出发团队');return false;\">" + ComingLeaveTourNumber + "个团</a>将于1周后到期,请及时更新计划,以方便组团社查询";
                }
                //获得专线下线路区域和团的数量

                IList <EyouSoft.Model.TourStructure.AreaStatInfo> TourByAreaCount = powderBll.GetCurrentUserTourByAreaStats();
                if (TourByAreaCount != null && TourByAreaCount.Count > 0)
                {
                    StringBuilder strTour = new StringBuilder();
                    foreach (EyouSoft.Model.TourStructure.AreaStatInfo AreaStaModel in TourByAreaCount)
                    {
                        strTour.Append("<a class=\"lan14\" href=\"/routeagency/scatteredfightplan.aspx?lineId=" + AreaStaModel.AreaId.ToString() + "\" onclick=\"topTab.open($(this).attr('href'),'我的散拼计划');return false;\">" + AreaStaModel.AreaName + "(" + AreaStaModel.Number.ToString() + ")</a>");
                    }
                    this.lblRoutePlanCount.Text = strTour.ToString();
                }

                dic = iorderBll.GetOrderBusinessCount(UserInfoModel.CompanyID);
                if (dic != null)
                {
                    //获得专线订单信息
                    if (dic.ContainsKey("有效散客订单") && dic.ContainsKey("散客订单未处理") && dic.ContainsKey("散客预留待付款") && dic.ContainsKey("散客订单已确认"))
                    {
                        this.lblRouteOrderFrist.Text  = "有效散客订单:<a href=\"/routeagency/allfitorders.aspx\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'所有散拼订单');return false;\"><b>" + dic["有效散客订单"].ToString() + "单</b></a>,";
                        this.lblRouteOrderFrist.Text += "其中未处理<a href=\"/routeagency/allfitorders.aspx?statue=2\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'所有散拼订单');return false;\"><b>" + dic["散客订单未处理"].ToString() + "单</b></a>,";
                        this.lblRouteOrderFrist.Text += "预留待付款<a href=\"/routeagency/allfitorders.aspx?statue=3\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'所有散拼订单');return false;\"><b>" + dic["散客预留待付款"].ToString() + "单</b></a>,";
                        this.lblRouteOrderFrist.Text += "已确认:<a href=\"/routeagency/allfitorders.aspx?statue=6\" onclick=\"topTab.open($(this).attr('href'),'所有散拼订单');return false;\"><b>" + dic["散客订单已确认"].ToString() + "单</b></a>";
                    }

                    if (dic.ContainsKey("团队订单") && dic.ContainsKey("团队订单未处理") && dic.ContainsKey("团队订单已确认"))
                    {
                        this.lblRouteOrderSecond.Text  = "有效团队订单:共有<a href=\"/teamservice/teamorders.aspx?routeSource=1\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单"].ToString() + "单</b></a>,";
                        this.lblRouteOrderSecond.Text += "其中未处理<a href=\"/teamservice/teamorders.aspx?routeSource=1&status=0\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单未处理"].ToString() + "单</b></a>,";
                        this.lblRouteOrderSecond.Text += " 已确认:<a href=\"/teamservice/teamorders.aspx?routeSource=1&status=1\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单已确认"] + "单</b></a>";
                    }

                    if (dic.ContainsKey("历史订单") && dic.ContainsKey("成人数") && dic.ContainsKey("儿童数"))
                    {
                        this.lblRouteOrderThird.Text = "历史订单:共计<a class=\"ff0000\"><b>" + dic["历史订单"].ToString() + "单</b></a>,人数" + dic["成人数"].ToString() + "大" + dic["儿童数"].ToString() + "小";
                    }
                }

                //获得专线商的访问数量
                this.lblBrowseUserCount.Text = TourBll.GetVisitedNumberByCompany(UserInfoModel.CompanyID).ToString();
            }
            #endregion

            #region 地接提醒
            if (IsLocalAgency)
            {
                //获得地接线路区域信息

                IList <EyouSoft.Model.TourStructure.AreaStatInfo> routeByAreaCount = routeBll.GetCurrentUserRouteByAreaStats();
                if (routeByAreaCount != null && routeByAreaCount.Count > 0)
                {
                    StringBuilder strTour = new StringBuilder();
                    foreach (EyouSoft.Model.TourStructure.AreaStatInfo AreaStaModel in routeByAreaCount)
                    {
                        strTour.Append("<a href='/routeagency/routemanage/routeview.aspx?routeSource=2' onclick=\"topTab.open($(this).attr('href'),'我的线路库',{isRefresh:false,data:{AreaId:" + AreaStaModel.AreaId + "}});return false;\" class='lan14'>" + AreaStaModel.AreaName + "(" + AreaStaModel.Number + ")</a><br />");
                    }
                    this.lblLocalRoute.Text = strTour.ToString();
                }

                dic = iorderBll.GetOrderGroundCount(UserInfoModel.CompanyID);
                if (dic != null)
                {
                    //获得地接团队订单信息
                    if (dic.ContainsKey("有效团队订单") && dic.ContainsKey("团队订单未处理") && dic.ContainsKey("团队订单已处理"))
                    {
                        this.lblLocalOrderCount.Text  = "有效团队订单:共有<a href=\"/teamservice/teamorders.aspx?routeSource=2\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["有效团队订单"].ToString() + "单</b></a>,";
                        this.lblLocalOrderCount.Text += "其中未处理<a href=\"/teamservice/teamorders.aspx?routeSource=2&status=0\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单未处理"].ToString() + "单</b></a>,";
                        this.lblLocalOrderCount.Text += "已确认:<a href=\"/teamservice/teamorders.aspx?routeSource=2&status=1\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单已处理"].ToString() + "单</b></a>";
                    }
                }
            }
            #endregion

            #region 景区提醒
            if (IsSightAgency)
            {
                //获得将过期景点门票
                this.lblScenicCountOver.Text = "您当前共有<a href=\"/ScenicManage/MyScenice.aspx\" onclick=\"topTab.open($(this).attr('href'),'我的景区');return false;\">" + EyouSoft.BLL.ScenicStructure.BScenicTickets.CreateInstance().GetExpireTickets(UserInfoModel.CompanyID).ToString() + "个景区门票</a>将于1周后到期,请及时更新计划,以方便旅行社查询";
                int recordCount = 0;
                IList <EyouSoft.Model.ScenicStructure.MScenicArea> scenicList = EyouSoft.BLL.ScenicStructure.BScenicArea.CreateInstance().GetListAndTickets(3, 1, ref recordCount, null);

                if (scenicList != null && scenicList.Count > 0)
                {
                    string sbScenic = "";
                    for (int i = 0; i < scenicList.Count; i++)
                    {
                        sbScenic += "<a class=\"lan14\" href=\"/ScenicManage/MyScenice.aspx\" onclick=\"topTab.open($(this).attr('href'),'我的景区');return false;\">" + scenicList[i].ScenicName + "</a>&nbsp;&nbsp;";
                    }
                    this.lblScenicCount.Text = sbScenic;
                }
            }
            #endregion
            #endregion
        }
Exemplo n.º 7
0
        /// <summary>
        /// 设置线路类型,即推广状态
        /// </summary>
        private void SetTourMarkerNote()
        {
            if (!IsGrantUpdate)
            {
                Response.Clear();
                Response.Write("[{isSuccess:false,ErrorMessage:'对不起,你当前登录的帐号没有权限执行该操作!'}]");
                Response.End();
            }
            RecommendType SpreadState = RecommendType.无;

            switch (Utils.GetQueryStringValue("TourMarkerNote"))
            {
            case "0":    //无
                SpreadState = RecommendType.无;
                break;

            case "1":    //推荐
                SpreadState = RecommendType.推荐;
                break;

            case "2":    //特价
                SpreadState = RecommendType.特价;
                break;

            case "3":    //豪华
                SpreadState = RecommendType.豪华;
                break;

            case "4":    //热门
                SpreadState = RecommendType.热门;
                break;

            case "5":    //新品
                SpreadState = RecommendType.新品;
                break;

            case "6":    //纯玩
                SpreadState = RecommendType.纯玩;
                break;

            case "7":    //经典
                SpreadState = RecommendType.经典;
                break;
            }
            string TemplateTourID = Utils.GetQueryStringValue("TemplateTourID");

            EyouSoft.IBLL.NewTourStructure.IPowderList Ibll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance();
            if (TemplateTourID.EndsWith("$"))
            {
                TemplateTourID = TemplateTourID.TrimEnd('$');
            }
            bool isTrue = Ibll.UpdatePowderRecommend(SpreadState, TemplateTourID.Split('$'));

            Ibll = null;
            if (isTrue)
            {
                Response.Clear();
                Response.Write("1");
                Response.End();
            }
        }
Exemplo n.º 8
0
        /// <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 + " &nbsp; " + 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") + "&nbsp" + 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
            }
        }
Exemplo n.º 9
0
        /// <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") + "&nbsp" + 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
            }
        }