Esempio n. 1
0
        /// <summary>
        /// 修改状态:处理中
        /// </summary>
        private void ChangeOrderSate()
        {
            EyouSoft.IBLL.TourStructure.ITourOrder Ibll = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            bool isTrue = Ibll.SetTourOrderState(OrderID, EyouSoft.Model.TourStructure.OrderState.处理中, DateTime.Now);

            Ibll = null;
        }
Esempio n. 2
0
 /// <summary>
 /// 初始化
 /// </summary>
 private void InitPage()
 {
     if (Request.QueryString["TourID"] != null && !string.IsNullOrEmpty(Request.QueryString["TourID"]))
     {
         TourID = Utils.InputText(Request.QueryString["TourID"]);
         //获取批发商团队信息集合
         EyouSoft.IBLL.TourStructure.ITourOrder         Ibll  = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
         IList <EyouSoft.Model.TourStructure.TourOrder> lists = Ibll.GetOrderList(SellCompanyID, null, TourID, TourNo, "", null, null, null);
         if (lists != null && lists.Count > 0)
         {
             RouteName = lists[0].RouteName;
             LeaveTime = lists[0].LeaveDate.ToShortDateString();
             if (!string.IsNullOrEmpty(Request.QueryString["OrderID"]))
             {
                 ltrBookName.Text = "订单人员名单";
                 IList <EyouSoft.Model.TourStructure.TourOrder> bindList = ((List <EyouSoft.Model.TourStructure.TourOrder>)lists).FindAll(item =>
                 {
                     return(item.ID == OrderID);
                 });
                 rptBookingList.DataSource = bindList;
                 rptBookingList.DataBind();
             }
             else
             {
                 rptBookingList.DataSource = lists;
                 rptBookingList.DataBind();
             }
         }
         lists = null;
         Ibll  = null;
     }
 }
Esempio n. 3
0
        protected void BindRecord()
        {
            EyouSoft.IBLL.TourStructure.ITourOrder         tourOrderBll = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            IList <EyouSoft.Model.TourStructure.TourOrder> orderList;

            if (SiteUserInfo.CompanyRole.Length == 1)
            {
                orderList = tourOrderBll.GetRetailersOrderList(pageSize, pageIndex, ref recordCount, 1, SiteUserInfo.CompanyID, companyId, SiteUserInfo.CompanyRole.RoleItems[0], EyouSoft.Model.TourStructure.OrderState.已成交);
            }
            else
            {
                orderList = tourOrderBll.GetRetailersOrderList(pageSize, pageIndex, ref recordCount, 1, SiteUserInfo.CompanyID, companyId, null, EyouSoft.Model.TourStructure.OrderState.已成交);
            }
            if (orderList != null && orderList.Count > 0)
            {
                tr_rpt_TradeList.DataSource = orderList;
                tr_rpt_TradeList.DataBind();
                BindPage();
            }
            else
            {
                this.tr_noData.Style.Remove("display");
                this.ExportPageInfo1.Visible = false;
            }
            orderList = null;
        }
Esempio n. 4
0
        /// <summary>
        /// 修改订单状态
        /// 公用方法
        /// </summary>
        /// <param name="state"></param>
        /// <returns></returns>
        private bool UpdateOrderState(EyouSoft.Model.TourStructure.OrderState state, DateTime NowDate)
        {
            EyouSoft.IBLL.TourStructure.ITourOrder Ibll = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            bool isTrue = Ibll.SetTourOrderState(OrderID, state, NowDate);

            Ibll = null;
            return(isTrue);
        }
Esempio n. 5
0
        /// <summary>
        /// 绑定子Repeater数据
        /// </summary>
        /// <param name="rptChild">Repeater</param>
        /// <param name="HavingModel">拥有订单的团队信息业务实体</param>
        private void Binding_OrderHistoryChild(Repeater rptChild, EyouSoft.Model.TourStructure.HavingOrderTourInfo HavingModel)
        {
            EyouSoft.IBLL.TourStructure.ITourOrder         Ibll           = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            IList <EyouSoft.Model.TourStructure.TourOrder> TourOrderlists = new List <EyouSoft.Model.TourStructure.TourOrder>();

            TourOrderlists = Ibll.GetOrderList(CompanyId, UserId, HavingModel.ID, "", null, null, null, null);
            //绑定数据
            rptChild.DataSource = TourOrderlists;
            rptChild.DataBind();
            HavingModel    = null;
            TourOrderlists = null;
            Ibll           = null;
        }
Esempio n. 6
0
        private void InitPage()
        {
            EyouSoft.IBLL.TourStructure.ITourOrder Ibll  = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            EyouSoft.Model.TourStructure.TourOrder Model = new EyouSoft.Model.TourStructure.TourOrder();
            Model = Ibll.GetOrderModel(OrderID);
            List <EyouSoft.Model.TourStructure.TourOrder> lists = new List <EyouSoft.Model.TourStructure.TourOrder>();

            if (Model != null)
            {
                if (this.SiteUserInfo.CompanyID == Model.CompanyID)
                {
                    isRouteCompanyProduct = true;
                }
                if (this.SiteUserInfo.CompanyID == Model.BuyCompanyID)
                {
                    isTourCompanyProduct = true;
                }
                //该产品既不属于专线,也不是组团所买的产品时
                if (!isTourCompanyProduct && !isRouteCompanyProduct)
                {
                    Response.Clear();
                    Response.Write("对不起,该订单你没有修改和查看的权限!");
                    Response.End();
                }
                InitButtonSate(Model.OrderState);
                TourID = Model.TourId;
                lists.Add(Model);
                ShowRemnantNumber = EyouSoft.BLL.TourStructure.Tour.CreateInstance().GetTourInfo(Model.TourId).RealRemnantNumber;
                BuyCompanyName    = Model.BuyCompanyName;
                ContactName       = Model.ContactName;
                ContactTel        = Model.ContactTel;
                ContactQQ         = Model.ContactQQ;
                LeaveDate         = Model.LeaveDate.ToShortDateString();
                ContactMQ         = Model.ContactMQ;
                LeaveTraffic      = Model.LeaveTraffic;
                OrderSource       = (int)Model.OrderSource;
                OrderState        = (int)Model.OrderState;
                //游客
                InitCustomers(Model.TourOrderCustomer);
                this.rptEditOrder.DataSource = lists;
                this.rptEditOrder.DataBind();
                Model = null;
                Ibll  = null;
                Model = null;
            }
            else
            {
                InitButtonSate(null);
            }
            lists = null;
        }
Esempio n. 7
0
        /// <summary>
        /// 绑定子Repeater数据
        /// </summary>
        /// <param name="rptChild">Repeater</param>
        /// <param name="HavingModel">拥有订单的团队信息业务实体</param>
        private void Binding_OrdersReceivedChild(Repeater rptChild, EyouSoft.Model.TourStructure.HavingOrderTourInfo HavingModel)
        {
            EyouSoft.IBLL.TourStructure.ITourOrder         Ibll           = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            IList <EyouSoft.Model.TourStructure.TourOrder> TourOrderlists = new List <EyouSoft.Model.TourStructure.TourOrder>();

            EyouSoft.Model.TourStructure.OrderState[] orderstate = new EyouSoft.Model.TourStructure.OrderState[] { EyouSoft.Model.TourStructure.OrderState.未处理, EyouSoft.Model.TourStructure.OrderState.处理中 };
            TourOrderlists = Ibll.GetOrderList(CompanyId, null, HavingModel.ID, "", null, null, null, orderstate);
            //绑定数据
            rptChild.DataSource = TourOrderlists;
            rptChild.DataBind();
            HavingModel    = null;
            TourOrderlists = null;
            Ibll           = null;
        }
Esempio n. 8
0
        /// <summary>
        /// 删除无效订单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            EyouSoft.IBLL.TourStructure.ITourOrder Ibll = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            bool isTrue = Ibll.UpdateIsDelete(OrderID);

            Ibll = null;
            if (isTrue)
            {
                EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, "alert('执行删除无效订单操作成功!');closeWin()");
            }
            else
            {
                InitPage();
                EyouSoft.Common.Function.MessageBox.Show(this.Page, "执行删除无效订单操作失败!");
            }
        }
Esempio n. 9
0
        /// <summary>
        /// 保存修改订单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            EyouSoft.Model.TourStructure.TourOrder model = new EyouSoft.Model.TourStructure.TourOrder();
            EyouSoft.IBLL.TourStructure.ITourOrder Ibll  = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            model.TourOrderCustomer = TourOrderCustomer();
            model.SeatList          = SeatList.Trim(',');
            if (model.TourOrderCustomer == null || model.TourOrderCustomer.Count == 0)
            {
                EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, "alert('抱歉,游客人数必须大于0,将不能保存,请重新填写游客数和游客信息!');");
                InitPage();
                return;
            }
            if (model.PeopleNumber > Utils.GetInt(Request.Form["hidRemnantNumber"], 0))
            {
                EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, "alert('抱歉,剩余数不能大于游客数,不能保存,请重新填写游客数和游客信息!');");
                InitPage();
                return;
            }
            InputValueToModel(model);
            model.OrderState   = (EyouSoft.Model.TourStructure.OrderState)Utils.GetInt(Utils.GetFormValue("hidOrderState"));
            model.SaveSeatDate = DateTime.Now;
            int ReturnValue = Ibll.UpdateTourOrder(model);

            model = null;
            Ibll  = null;
            switch (ReturnValue)
            {
            case -1:
                EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, "alert('写入订单信息失败!');closeWin()");
                break;

            case 0:
                EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, "alert('订单实体为空!');closeWin()");
                break;

            default:
                EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, "alert('订单保存成功!');closeWin()");
                break;
            }
        }
Esempio n. 10
0
        /// <summary>
        /// 同意留位
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnYes_Click(object sender, EventArgs e)
        {
            EyouSoft.IBLL.TourStructure.ITourOrder Ibll  = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            EyouSoft.Model.TourStructure.TourOrder model = new EyouSoft.Model.TourStructure.TourOrder();
            model.TourOrderCustomer = TourOrderCustomer();
            model.SeatList          = SeatList.Trim(',');
            InputValueToModel(model);
            model.OrderState = EyouSoft.Model.TourStructure.OrderState.已留位;
            if (Utils.GetDateTime(Utils.GetFormValue("txtEndTime$dateTextBox")) <= DateTime.Now)
            {
                InitPage();
                EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, "alert('留位日期不能小于等于当前日期!');");
                return;
            }
            if (model.PeopleNumber > Utils.GetInt(hidRemnantNumber.Value))
            {
                InitPage();
                EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, "alert('抱歉,剩余数不能大于游客数,不能保存,请重新填写游客数和游客信息!');");
                return;
            }
            model.SaveSeatDate = Utils.GetDateTime(Utils.GetFormValue("txtEndTime$dateTextBox"));
            int ReturnValue = Ibll.UpdateTourOrder(model);

            Ibll  = null;
            model = null;
            switch (ReturnValue)
            {
            case -1:
                EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, "alert('写入订单信息失败!');closeWin()");
                break;

            case 0:
                EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, "alert('订单实体为空!');closeWin()");
                break;

            default:
                EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, "alert('订单保存成功!');closeWin()");
                break;
            }
        }
Esempio n. 11
0
 /// <summary>
 /// 初始化
 /// </summary>
 private void InitPage()
 {
     #region 查询条件
     UserID = Utils.GetQueryStringValue("UserID");
     if (Request.QueryString["Page"] != null)
     {
         intPageIndex = Utils.GetInt(Request.QueryString["Page"]);
     }
     dplUserList.SelectedValue = UserID;
     BuyCompanyName            = Utils.GetQueryStringValue("BuyCompanyName");
     BuyCompanyName            = Server.UrlDecode(BuyCompanyName).Trim();
     BeginDate = Utils.GetDateTimeNullable(Request.QueryString["BeginDate"]);
     if (!string.IsNullOrEmpty(Request.QueryString["BeginDate"]))
     {
         ShowBeginDate = Utils.GetDateTime(Request.QueryString["BeginDate"]).ToShortDateString();
     }
     EndDate = Utils.GetDateTimeNullable(Request.QueryString["EndDate"]);
     if (!string.IsNullOrEmpty(Request.QueryString["EndDate"]))
     {
         ShowEndDate = Utils.GetDateTime(Request.QueryString["EndDate"]).ToShortDateString();
     }
     #endregion
     int intRecordCount = 0;
     EyouSoft.IBLL.TourStructure.ITourOrder Ibll = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
     IList <EyouSoft.Model.TourStructure.OrderStatistics> TourOrderlists = new List <EyouSoft.Model.TourStructure.OrderStatistics>();
     TourOrderlists = Ibll.GetOrderStatistics(intPageSize, intPageIndex, ref intRecordCount, 1, SellCompanyID, UserID, BuyCompanyName, BeginDate, EndDate);
     rptTradedCustomers.DataSource = TourOrderlists;
     rptTradedCustomers.DataBind();
     if (rptTradedCustomers.Items.Count < 1)
     {
         NoData.Visible = true;
     }
     Ibll           = null;
     TourOrderlists = null;
     this.ExportPageInfo1.intPageSize    = intPageSize;
     this.ExportPageInfo1.CurrencyPage   = intPageIndex;
     this.ExportPageInfo1.intRecordCount = intRecordCount;
     this.ExportPageInfo1.PageLinkURL    = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?";
 }
Esempio n. 12
0
        /// <summary>
        /// 绑定子Repeater数据
        /// </summary>
        /// <param name="rptChild">Repeater</param>
        /// <param name="HavingModel">拥有订单的团队信息业务实体</param>
        private void Binding_OrderProcessedChild(Repeater rptChild, EyouSoft.Model.TourStructure.HavingOrderTourInfo HavingModel)
        {
            EyouSoft.IBLL.TourStructure.ITourOrder         Ibll           = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            IList <EyouSoft.Model.TourStructure.TourOrder> TourOrderlists = new List <EyouSoft.Model.TourStructure.TourOrder>();

            EyouSoft.Model.TourStructure.OrderState[] orderstate = new EyouSoft.Model.TourStructure.OrderState[] { EyouSoft.Model.TourStructure.OrderState.受理, EyouSoft.Model.TourStructure.OrderState.已成交, EyouSoft.Model.TourStructure.OrderState.已留位, EyouSoft.Model.TourStructure.OrderState.留位过期, EyouSoft.Model.TourStructure.OrderState.处理中 };
            if (State != null)
            {
                EyouSoft.Model.TourStructure.OrderState[] orderstate2 = new EyouSoft.Model.TourStructure.OrderState[] { (EyouSoft.Model.TourStructure.OrderState)State };
                TourOrderlists = Ibll.GetOrderList(CompanyId, UserId, HavingModel.ID, "", null, null, null, orderstate2);
            }
            else
            {
                TourOrderlists = Ibll.GetOrderList(CompanyId, UserId, HavingModel.ID, "", null, null, null, orderstate);
            }
            //绑定数据
            rptChild.DataSource = TourOrderlists;
            rptChild.DataBind();
            HavingModel    = null;
            TourOrderlists = null;
            Ibll           = null;
        }
Esempio n. 13
0
        private void InitPage()
        {
            string BuyCompanyID = Request.QueryString["BuyCompanyID"];
            string CompanyId    = this.SiteUserInfo.CompanyID;
            int    RecordCount  = 0;

            if (!string.IsNullOrEmpty(BuyCompanyID))
            {
                EyouSoft.IBLL.TourStructure.ITourOrder         Ibll           = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
                IList <EyouSoft.Model.TourStructure.TourOrder> TourOrderlists = new List <EyouSoft.Model.TourStructure.TourOrder>();
                EyouSoft.Model.TourStructure.OrderState?       Sate           = null;
                if (!string.IsNullOrEmpty(Request.QueryString["OrderState"]))
                {
                    Sate = (EyouSoft.Model.TourStructure.OrderState)Enum.Parse(typeof(EyouSoft.Model.TourStructure.OrderState), Request.QueryString["OrderState"]);
                    ltrOrderSateText.Text = Sate.ToString() + "列表";
                    TradedState           = Sate.ToString();
                }
                TourOrderlists = Ibll.GetOrderList(PageSize, PageIndex, ref RecordCount, 1, CompanyId, BuyCompanyID, Sate);
                //绑定数据
                rptHasTradedTeam.DataSource = TourOrderlists;
                rptHasTradedTeam.DataBind();
                TourOrderlists = null;
                Ibll           = null;
                if (rptHasTradedTeam.Items.Count < 1)
                {
                    NoData.Visible = true;
                }
                this.ExportPageInfo1.intPageSize    = PageSize;
                this.ExportPageInfo1.CurrencyPage   = PageIndex;
                this.ExportPageInfo1.intRecordCount = RecordCount;
                this.ExportPageInfo1.PageLinkURL    = Request.Url.ToString() + "&";
            }
            else
            {
                NoData.Visible = true;
            }
        }
Esempio n. 14
0
        /// <summary>
        /// 确认成交订单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            EyouSoft.Model.TourStructure.TourOrder model = new EyouSoft.Model.TourStructure.TourOrder();
            EyouSoft.IBLL.TourStructure.ITourOrder Ibll  = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            model.TourOrderCustomer = TourOrderCustomer();
            model.SeatList          = SeatList.Trim(',');
            if (model.TourOrderCustomer == null || model.TourOrderCustomer.Count == 0)
            {
                EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, "alert('抱歉,游客人数必须大于0,将不能保存,请重新填写游客数和游客信息!');");
                InitPage();
                return;
            }
            InputValueToModel(model);
            if (model.PeopleNumber > Utils.GetInt(hidRemnantNumber.Value))
            {
                EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, "alert('抱歉,剩余数不能大于游客数,不能保存,请重新填写游客数和游客信息!');");
                InitPage();
                return;
            }
            model.OrderState   = (EyouSoft.Model.TourStructure.OrderState)Utils.GetInt(Utils.GetFormValue("hidOrderState"));
            model.OrderState   = EyouSoft.Model.TourStructure.OrderState.已成交;
            model.SaveSeatDate = DateTime.Now;
            int ReturnValue = Ibll.UpdateTourOrder(model);

            model = null;
            Ibll  = null;
            if (ReturnValue > 0)
            {
                EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, "alert('执行确认成交操作成功!');closeWin()");
            }
            else
            {
                InitPage();
                EyouSoft.Common.Function.MessageBox.Show(this.Page, "执行确认成交操作失败!");
            }
        }
Esempio n. 15
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitPage(bool isShow)
        {
            #region 根据订单号获取相关信息
            //EyouSoft.Model.TourStructure.TourOrder
            EyouSoft.IBLL.TourStructure.ITourOrder IOrderbll  = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            EyouSoft.Model.TourStructure.TourOrder OrderModel = IOrderbll.GetOrderModel(OrderID);
            if (OrderModel != null)
            {
                BuyCompanyID  = OrderModel.BuyCompanyID;
                SellCompanyID = OrderModel.CompanyID;
                RouteName     = OrderModel.RouteName;

                if (!string.IsNullOrEmpty(OrderModel.LeaveTraffic))
                {
                    ltrTraffic.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(OrderModel.LeaveTraffic);
                }
                else
                {
                    Tr_Traffic.Visible = false;
                }

                ComfirmTime        = DateTime.Now.ToShortDateString();
                AdultPrice         = OrderModel.PersonalPrice.ToString("F2");
                this.ChildrenPrice = OrderModel.ChildPrice.ToString("F2");
                SumPrice           = OrderModel.SumPrice.ToString("F2");
                AdultNum           = OrderModel.AdultNumber;
                ChildrenNum        = OrderModel.ChildNumber;
            }
            else
            {
                return;
            }
            #endregion

            #region 游客信息
            if (OrderModel.TourOrderCustomer != null && OrderModel.TourOrderCustomer.Count > 0)
            {
                IList <EyouSoft.Model.TourStructure.TourOrderCustomer> OrderCustomerList = OrderModel.TourOrderCustomer;
                this.rptCustomers.DataSource = OrderCustomerList;
                this.rptCustomers.DataBind();
                if (rptCustomers.Items.Count < 1)
                {
                    this.tblCustomers.Visible = false;
                }
            }
            #endregion

            #region 专线公司信息
            EyouSoft.Model.CompanyStructure.CompanyInfo SellCompany = new EyouSoft.Model.CompanyStructure.CompanyInfo();
            SellCompany = this.GetCompanyInfo(SellCompanyID);
            if (SellCompany != null)
            {
                txtSellCompanyName.Value = SellCompany.CompanyName;
                txtSellConnectName.Value = SellCompany.ContactInfo.ContactName;
                txtSellConnectFax.Value  = SellCompany.ContactInfo.Fax;
                txtSellConnectTel.Value  = SellCompany.ContactInfo.Tel;
            }
            #endregion

            #region 组团公司信息
            EyouSoft.Model.CompanyStructure.CompanyInfo BuyCompany = new EyouSoft.Model.CompanyStructure.CompanyInfo();
            BuyCompany = this.GetCompanyInfo(BuyCompanyID);
            if (BuyCompany != null)
            {
                txtBuyCompanyName.Value = BuyCompany.CompanyName;
                txtBuyConnectName.Value = BuyCompany.ContactInfo.ContactName;
                txtBuyConnectFax.Value  = BuyCompany.ContactInfo.Fax;
                txtBuyConnectTel.Value  = BuyCompany.ContactInfo.Tel;
            }
            #endregion

            if (this.IsLogin)
            {
                CompanyID = this.SiteUserInfo.CompanyID;
                ltrSellCompanyName.Text = this.SiteUserInfo.CompanyName;
            }

            #region 银行帐号信息
            EyouSoft.IBLL.CompanyStructure.IBankAccount         IbankBll = EyouSoft.BLL.CompanyStructure.BankAccount.CreateInstance();
            IList <EyouSoft.Model.CompanyStructure.BankAccount> bankList = IbankBll.GetList(SellCompanyID);
            if (bankList != null && bankList.Count > 0)
            {
                EyouSoft.Model.CompanyStructure.BankAccount CompanyBankAccount = bankList.FirstOrDefault(BankItem =>
                {
                    return(BankItem.AccountType == EyouSoft.Model.CompanyStructure.BankAccountType.公司);
                });
                if (CompanyBankAccount != null)
                {
                    ltrSellCompanyName.Text    = CompanyBankAccount.BankAccountName;
                    ltrBuyComapnyBankName.Text = CompanyBankAccount.BankName;
                    ltrBuyComapnyBankNo.Text   = CompanyBankAccount.AccountNumber;
                }

                rptBankAccount.DataSource = ((List <EyouSoft.Model.CompanyStructure.BankAccount>)bankList).FindAll(BankItem =>
                {
                    return(BankItem.AccountType == EyouSoft.Model.CompanyStructure.BankAccountType.个人);
                });
                rptBankAccount.DataBind();
                IbankBll           = null;
                bankList           = null;
                CompanyBankAccount = null;
            }
            #endregion

            #region 团队信息
            EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = Ibll.GetTourInfo(TourID);
            if (model != null)
            {
                RouteName = model.RouteName;
                TourDays  = model.TourDays;
                LeaveDate = model.LeaveDate;
                if (model.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Standard)//标准发布
                {
                    if (!string.IsNullOrEmpty(model.MeetTourContect))
                    {
                        ltrMeetTourContect.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.MeetTourContect);
                    }
                    else
                    {
                        tr_MeetTourContect.Visible = false;
                    }
                    if (!string.IsNullOrEmpty(model.CollectionContect))
                    {
                        ltrCollectionContect.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.CollectionContect);
                    }
                    else
                    {
                        tr_CollectionContect.Visible = false;
                    }
                    ResideContent       = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.ResideContent);       //住宿
                    DinnerContent       = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.DinnerContent);       //用餐
                    SightContent        = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.SightContent);        //景点
                    CarContent          = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.CarContent);          //用车
                    GuideContent        = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.GuideContent);        //导游
                    TrafficContent      = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.TrafficContent);      //往返交通
                    IncludeOtherContent = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.IncludeOtherContent); //其它
                    NotContainService   = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.NotContainService);   //其它说明
                    //备注
                    SpeciallyNotice = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.SpeciallyNotice);
                    //行程信息
                    rptStandardPlan.DataSource = model.StandardPlan;
                    rptStandardPlan.DataBind();
                }
                else//快速发布
                {
                    tr_MeetTourContect.Visible   = false;
                    tr_CollectionContect.Visible = false;
                    pnlQuickPlan.Visible         = true;
                    pnlNotQuickPlan.Visible      = false;
                    QuickPlanContent             = model.QuickPlan;
                }
            }
            Ibll       = null;
            model      = null;
            IOrderbll  = null;
            OrderModel = null;
            #endregion

            #region 公司盖章信息
            if (!string.IsNullOrEmpty(OrderID))
            {
                //判断是否属于该订单的专线商或组团社
                if (this.SiteUserInfo.CompanyID == BuyCompanyID || this.SiteUserInfo.CompanyID == SellCompanyID)
                {
                    string[] imgPath = EyouSoft.BLL.TourStructure.CompanyContractSignet.CreateInstance().GetConfirmationSignet(OrderID);
                    if (imgPath.Length > 0)
                    {
                        imgBuyCompany.ImageUrl = Domain.FileSystem + imgPath[0];
                        if (!string.IsNullOrEmpty(imgPath[0]))
                        {
                            imgBuyCompany.Visible = true;
                        }
                        if (!string.IsNullOrEmpty(imgPath[0]) && isTourCompany)
                        {
                            this.btnCancelStamp.Visible = true;
                            this.btnToStamp.Visible     = false;
                        }
                        if (imgPath.Length > 1)
                        {
                            imgSellCompany.ImageUrl = Domain.FileSystem + imgPath[1];
                            if (!string.IsNullOrEmpty(imgPath[1]))
                            {
                                imgSellCompany.Visible = true;
                            }
                            if (!string.IsNullOrEmpty(imgPath[1]) && !isTourCompany)
                            {
                                this.btnCancelStamp.Visible = true;
                                this.btnToStamp.Visible     = false;
                            }
                        }
                    }
                }
                else
                {
                    this.btnCancelStamp.Visible = false;
                    this.btnToStamp.Visible     = false;
                }
            }
            else
            {
                this.btnCancelStamp.Visible = false;
                this.btnToStamp.Visible     = false;
            }
            //if (!this.CheckGrant(EyouSoft.Common.TravelPermission.系统设置_盖章))
            //{
            this.btnCancelStamp.Visible = false;
            this.btnToStamp.Visible     = false;
            //}
            if (!isShow)
            {
                imgSellCompany.Visible = false;
                imgBuyCompany.Visible  = false;
            }
            #endregion
            IOrderbll   = null;
            OrderModel  = null;
            SellCompany = null;
            BuyCompany  = null;
        }
Esempio n. 16
0
        /// <summary>
        /// 代客预订
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LeaveBook()
        {
            if (!IsCompanyCheck)
            {
                Response.Clear();
                Response.Write("[{isSuccess:false,ErrorMessage:'对不起,你当前登录的账户还未审核,没有权限执行该操作!'}]");
                Response.End();
            }
            string ReturnString = string.Empty;

            EyouSoft.IBLL.TourStructure.ITour     Ibll      = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo tourModel = new EyouSoft.Model.TourStructure.TourInfo();
            tourModel    = Ibll.GetTourInfo(TourID);
            PriceStandId = Utils.GetFormValue("hidPriceStandId");
            EyouSoft.IBLL.TourStructure.ITourOrder Orderbll   = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            EyouSoft.Model.TourStructure.TourOrder orderModel = new EyouSoft.Model.TourStructure.TourOrder();
            if (Utils.GetQueryStringValue("action") == "LeaveBook")
            {
                orderModel.OrderState   = EyouSoft.Model.TourStructure.OrderState.已留位;
                orderModel.SaveSeatDate = Utils.GetDateTime(Utils.GetFormValue("txtEndTime$dateTextBox"));
                if (Utils.GetDateTime(Utils.GetFormValue("txtEndTime$dateTextBox")) < DateTime.Now)
                {
                    Response.Clear();
                    Response.Write("[{isSuccess:false,ErrorMessage:'留位时间不能小于当前时间!'}]");
                    Response.End();
                }
            }
            else
            {
                orderModel.SaveSeatDate = DateTime.Now;
                orderModel.OrderState   = EyouSoft.Model.TourStructure.OrderState.未处理;
            }
            orderModel.AreaId            = tourModel.AreaId;
            orderModel.SeatList          = SeatList.Trim(',');
            orderModel.LeaveTraffic      = Utils.GetFormValue("Traffic");
            orderModel.AdultNumber       = Utils.GetInt(Utils.GetFormValue(PriceStandId + "AdultNumber"));
            orderModel.ChildNumber       = Utils.GetInt(Utils.GetFormValue(PriceStandId + "ChildNumber"));
            orderModel.ChildPrice        = decimal.Parse(Utils.GetFormValue(PriceStandId + "ChildrenPrice1"));
            orderModel.MarketPrice       = Utils.GetDecimal(Utils.GetFormValue(PriceStandId + "MarketPrice"));
            orderModel.BuyCompanyID      = Utils.GetFormValue("BuyCompanyID");
            orderModel.BuyCompanyName    = Utils.GetFormValue("BuyCompanyName");
            orderModel.CompanyID         = SiteUserInfo.CompanyID;
            orderModel.ContactFax        = Utils.GetFormValue("BuyCompanyFax");
            orderModel.ContactMQ         = Utils.GetFormValue("BuyCompanyMQ");
            orderModel.ContactName       = Utils.GetFormValue("BuyCompanyContactName");
            orderModel.ContactQQ         = Utils.GetFormValue("BuyCompanyQQ");
            orderModel.ContactTel        = Utils.GetFormValue("BuyCompanyTel");
            orderModel.LastOperatorID    = SiteUserInfo.ID;
            orderModel.MarketNumber      = Utils.GetInt(Utils.GetFormValue(PriceStandId + "MarketNumber"));
            orderModel.OperatorID        = SiteUserInfo.ID;
            orderModel.OperatorName      = SiteUserInfo.ContactInfo.ContactName;
            orderModel.OrderType         = 1;
            orderModel.OtherPrice        = Utils.GetDecimal(Utils.GetFormValue(PriceStandId + "OtherPrice"));
            orderModel.PersonalPrice     = Utils.GetDecimal(Utils.GetFormValue(PriceStandId + "PersonalPrice"));
            orderModel.SumPrice          = orderModel.AdultNumber * orderModel.PersonalPrice + orderModel.ChildNumber * orderModel.ChildPrice + orderModel.MarketNumber * orderModel.MarketPrice + orderModel.OtherPrice;
            orderModel.PeopleNumber      = orderModel.ChildNumber + orderModel.AdultNumber;
            orderModel.PriceStandId      = PriceStandId;
            orderModel.RouteName         = Utils.GetFormValue("RouteName");
            orderModel.LeaveDate         = Utils.GetDateTime(Utils.GetFormValue("LeaveDate"));
            orderModel.SpecialContent    = Utils.GetFormValue("SpecialContent");
            orderModel.TourCompanyId     = SiteUserInfo.CompanyID;
            orderModel.TourCompanyName   = SiteUserInfo.CompanyName;
            orderModel.TourDays          = tourModel.TourDays;
            orderModel.TourId            = Utils.GetFormValue("TourId");
            orderModel.TourNo            = tourModel.TourNo;
            orderModel.TourType          = EyouSoft.Model.TourStructure.TourType.组团散拼;
            orderModel.IssueTime         = DateTime.Now;
            orderModel.OrderSource       = EyouSoft.Model.TourStructure.TourOrderOperateType.代客预定;
            orderModel.TourOrderCustomer = TourOrderCustomer();
            if (orderModel.TourOrderCustomer == null || orderModel.TourOrderCustomer.Count == 0)
            {
                ReturnString = "[{isSuccess:false,ErrorMessage:'游客总人数必须大于0,否则将不能保存,请填写正确的游客人数及信息!'}]";
                Response.Clear();
                Response.Write(ReturnString);
                Response.End();
            }
            if (orderModel.PeopleNumber > Utils.GetInt(Utils.GetFormValue("RemnantNumber")))
            {
                ReturnString = "[{isSuccess:false,ErrorMessage:'游客总人数大于剩余人数,不能保存请重新填写游客资料!'}]";
                Response.Clear();
                Response.Write(ReturnString);
                Response.End();
            }
            int ReturnValue = Orderbll.AddTourOrder(orderModel);

            Ibll       = null;
            tourModel  = null;
            Orderbll   = null;
            orderModel = null;
            switch (ReturnValue)
            {
            case -1:
                ReturnString = "[{isSuccess:false,ErrorMessage:'写入订单信息失败!'}]";
                break;

            case 0:
                ReturnString = "[{isSuccess:false,ErrorMessage:'订单实体为空!'}]";
                break;

            default:
                ReturnString = "[{isSuccess:true,ErrorMessage:'订单代客预订成功!'}]";
                break;
            }
            Response.Clear();
            Response.Write(ReturnString);
            Response.End();
        }
Esempio n. 17
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitPage()
        {
            BindRouteCompany();
            int intRecordCount = 0;

            EyouSoft.Model.TourStructure.OrderState?State = null;
            #region 初始化查询条件
            if (!string.IsNullOrEmpty(Request.QueryString["ContionType"]))
            {
                ContionType = Request.QueryString["ContionType"].ToLower();
                switch (ContionType)
                {
                case "transaction":    //已成交订单
                    State = EyouSoft.Model.TourStructure.OrderState.已成交;
                    break;

                case "untreated":    //未处理订单
                    State = EyouSoft.Model.TourStructure.OrderState.未处理;
                    break;

                case "reservation":    //已留位订单
                    State = EyouSoft.Model.TourStructure.OrderState.已留位;
                    break;

                default:
                    State = null;
                    break;
                }
            }
            //筛选时间:下单日期
            if (Request.QueryString["QueryTime"] != null && !string.IsNullOrEmpty(Request.QueryString["QueryTime"]))
            {
                int days = Utils.GetInt(Request.QueryString["QueryTime"], 0);
                if (days < 1)
                {
                    OrderBeginDate = null;
                    OrderEndDate   = null;
                }
                else
                {
                    OrderBeginDate = DateTime.Now.AddDays(-days);
                    OrderEndDate   = DateTime.Now;
                }
                dplselect_Time.SelectedValue = Utils.GetInt(Request.QueryString["QueryTime"], 30).ToString();
            }
            else
            {
                OrderBeginDate = DateTime.Now.AddDays(-30);
                OrderEndDate   = DateTime.Now;
            }
            intPageIndex = Utils.GetInt(Request.QueryString["Page"], 1);
            BeginDate    = Utils.GetDateTimeNullable(Request.QueryString["BeginDate"]);
            if (!string.IsNullOrEmpty(Request.QueryString["BeginDate"]))
            {
                ShowBeginDate = Utils.GetDateTime(Request.QueryString["BeginDate"]).ToShortDateString();
            }
            EndDate = Utils.GetDateTimeNullable(Request.QueryString["EndDate"]);
            if (!string.IsNullOrEmpty(Request.QueryString["EndDate"]))
            {
                ShowEndDate = Utils.GetDateTime(Request.QueryString["EndDate"]).ToShortDateString();
            }
            if (Request.QueryString["OrderBeginDate"] != null)
            {
                OrderBeginDate = Utils.GetDateTimeNullable(Request.QueryString["OrderBeginDate"]);
            }
            if (!string.IsNullOrEmpty(Request.QueryString["OrderBeginDate"]))
            {
                ShowOrderBeginDate = Utils.GetDateTime(Request.QueryString["OrderBeginDate"]).ToShortDateString();
            }
            if (Request.QueryString["OrderEndDate"] != null)
            {
                OrderEndDate = Utils.GetDateTimeNullable(Request.QueryString["OrderEndDate"]);
            }
            if (!string.IsNullOrEmpty(Request.QueryString["OrderEndDate"]))
            {
                ShowOrderEndDate = Utils.GetDateTime(Request.QueryString["OrderEndDate"]).ToShortDateString();
            }
            RouteName = Utils.GetQueryStringValue("RouteName");
            RouteName = Server.UrlDecode(RouteName).Trim();
            //专线供应商
            SellCompanyId = Utils.GetQueryStringValue("RouteCompany");
            dplRouteCompany.SelectedValue = SellCompanyId;
            #endregion
            EyouSoft.IBLL.TourStructure.ITourOrder         Ibll           = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            IList <EyouSoft.Model.TourStructure.TourOrder> TourOrderlists = new List <EyouSoft.Model.TourStructure.TourOrder>();
            //最近交易订单
            TourOrderlists = Ibll.GetOrderList(intPageSize, intPageIndex, ref intRecordCount, 1, SellCompanyId, BuyCompanyId, RouteName, 0, BeginDate, EndDate, State, OrderBeginDate, OrderEndDate);
            rpt_OrdersOutSource.DataSource = TourOrderlists;
            rpt_OrdersOutSource.DataBind();
            //是否有订单信息
            if (rpt_OrdersOutSource.Items.Count < 1)
            {
                this.NoData.Visible = true;
            }
            this.ExportPageInfo1.intPageSize    = intPageSize;
            this.ExportPageInfo1.CurrencyPage   = intPageIndex;
            this.ExportPageInfo1.intRecordCount = intRecordCount;
            this.ExportPageInfo1.PageLinkURL    = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?";
            Ibll           = null;
            TourOrderlists = null;
        }
Esempio n. 18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!CheckGrant(TravelPermission.营销工具_同业名录))
            {
                Utils.ResponseNoPermit();
                return;
            }
            string method = Utils.GetQueryStringValue("method");

            EyouSoft.Model.CompanyStructure.CompanyDetailInfo companyModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID);
            if (companyModel != null)
            {
                SiteUserComLev = companyModel.CompanyLev;
            }
            myCustomerBll = EyouSoft.BLL.CompanyStructure.MyCustomer.CreateInstance();
            tourOrderBLL  = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            cityBll       = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance();
            provinceBll   = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance();
            if (method == "clearMyCustomers")
            {
                if (!haveUpdate)
                {
                    Page.ClientScript.RegisterStartupScript(this.GetType(), Guid.NewGuid().ToString(), "<script type='text/javascript'>alert('对不起,你没有该权限!');</script>");
                }
                else
                {
                    ClearMyCustomers();//解除合作关系
                }
            }
            //获取当前页
            pageIndex = Utils.GetInt(Request.QueryString["Page"], 1);
            //获取查询条件
            int    province    = Utils.GetInt(Utils.InputText(Server.UrlDecode(Request.QueryString["province"] ?? ""))); //省份ID
            int    city        = Utils.GetInt(Utils.InputText(Server.UrlDecode(Request.QueryString["city"] ?? "")));     //城市ID
            string companyName = Utils.InputText(Server.UrlDecode(Request.QueryString["companyname"] ?? ""));            //公司名
            string admin       = Utils.InputText(Server.UrlDecode(Request.QueryString["admin"] ?? ""));                  //负责人
            string brand       = Utils.InputText(Server.UrlDecode(Request.QueryString["brand"] ?? ""));                  //品牌
            string myCompanyId = SiteUserInfo.CompanyID;

            EyouSoft.Model.CompanyStructure.QueryParamsCompany query = new EyouSoft.Model.CompanyStructure.QueryParamsCompany();
            query.CityId       = city;
            query.PorvinceId   = province;
            query.CompanyBrand = brand;
            query.CompanyName  = companyName;
            query.ContactName  = admin;
            //绑定我的客户
            IList <EyouSoft.Model.CompanyStructure.MyCustomer> myCustomerList = myCustomerBll.GetList(myCompanyId, query, pageSize, pageIndex, ref recordCount);

            if (myCustomerList != null && myCustomerList.Count > 0)
            {
                alc_rpt_customers.DataSource = myCustomerList;
                alc_rpt_customers.DataBind();
                BindPage(province, city, companyName, admin, brand);
            }
            else
            {
                alc_rpt_customers.EmptyText  = "<tr><td style='text-align:center'>暂无客户信息</td></tr>";
                this.ExportPageInfo1.Visible = false;
            }

            //清除对象
            myCustomerList = null;
            myCustomerBll  = null;
            cityBll        = null;
            provinceBll    = null;
            tourOrderBLL   = null;
            //恢复查询条件
            mc_pc.SetProvinceId     = province;
            mc_pc.SetCityId         = city;
            mc_txtAdmin.Value       = admin;
            mc_txtBrand.Value       = brand;
            mc_txtCompanyName.Value = companyName;
        }
Esempio n. 19
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitPage()
        {
            int intRecordCount = 0;

            BindRouteCompany();
            #region 初始化查询条件
            EyouSoft.Model.TourStructure.OrderState?State = null;
            if (Request.QueryString["ContionType"] != null)
            {
                ContionType = Utils.GetQueryStringValue("ContionType");
                switch (ContionType.ToLower())
                {
                case "transaction":    //已成交订单
                    State = EyouSoft.Model.TourStructure.OrderState.已成交;
                    break;

                case "untreated":    //未处理订单
                    State = EyouSoft.Model.TourStructure.OrderState.未处理;
                    break;

                case "reservation":    //已留位订单
                    State = EyouSoft.Model.TourStructure.OrderState.已留位;
                    break;

                case "notaccepted":    //不受理
                    State = EyouSoft.Model.TourStructure.OrderState.受理;
                    break;

                case "reservationdue":    //留位过期
                    State = EyouSoft.Model.TourStructure.OrderState.留位过期;
                    break;

                default:
                    State = null;
                    break;
                }
            }

            intPageIndex = Utils.GetInt(Request.QueryString["Page"], 1);
            BeginDate    = Utils.GetDateTimeNullable(Request.QueryString["BeginDate"]);
            if (!string.IsNullOrEmpty(Request.QueryString["BeginDate"]))
            {
                ShowBeginDate = Utils.GetDateTime(Request.QueryString["BeginDate"]).ToShortDateString();
            }
            EndDate = Utils.GetDateTimeNullable(Request.QueryString["EndDate"]);
            if (!string.IsNullOrEmpty(Request.QueryString["EndDate"]))
            {
                ShowEndDate = Utils.GetDateTime(Request.QueryString["EndDate"]).ToShortDateString();
            }

            OrderBeginDate = Utils.GetDateTimeNullable(Request.QueryString["OrderBeginDate"]);
            if (!string.IsNullOrEmpty(Request.QueryString["OrderBeginDate"]))
            {
                ShowOrderBeginDate = Utils.GetDateTime(Request.QueryString["OrderBeginDate"]).ToShortDateString();
            }
            OrderEndDate = Utils.GetDateTimeNullable(Request.QueryString["OrderEndDate"]);
            if (!string.IsNullOrEmpty(Request.QueryString["OrderEndDate"]))
            {
                ShowOrderEndDate = Utils.GetDateTime(Request.QueryString["OrderEndDate"]).ToShortDateString();
            }
            RouteName = Utils.InputText(Request.QueryString["RouteName"]);
            RouteName = Server.UrlDecode(RouteName).Trim();
            //专线供应商
            if (Request.QueryString["RouteCompany"] != null && !string.IsNullOrEmpty(Request.QueryString["RouteCompany"]))
            {
                SellCompanyId = Utils.InputText(Request.QueryString["RouteCompany"]);
                dplRouteCompany.SelectedValue = SellCompanyId;
            }
            AreaId = Utils.GetInt(Request.QueryString["AreaId"], 0);
            #endregion
            EyouSoft.IBLL.TourStructure.ITourOrder         Ibll           = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            IList <EyouSoft.Model.TourStructure.TourOrder> TourOrderlists = new List <EyouSoft.Model.TourStructure.TourOrder>();

            TourOrderlists          = Ibll.GetOrderList(intPageSize, intPageIndex, ref intRecordCount, 1, SellCompanyId, BuyCompanyId, RouteName, AreaId, BeginDate, EndDate, State, OrderBeginDate, OrderEndDate);
            rptAllOrders.DataSource = TourOrderlists;
            rptAllOrders.DataBind();
            if (rptAllOrders.Items.Count < 1)
            {
                NoData.Visible = true;
            }
            Ibll           = null;
            TourOrderlists = null;
            this.ExportPageInfo1.intPageSize    = intPageSize;
            this.ExportPageInfo1.CurrencyPage   = intPageIndex;
            this.ExportPageInfo1.intRecordCount = intRecordCount;
            this.ExportPageInfo1.PageLinkURL    = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?";
        }
Esempio n. 20
0
        protected void SaveOrder()
        {
            //团队所属公司ID
            string TourCompanyId = "";

            //获得订单信息
            tourModel = tourBll.GetTourInfo(tourId);
            string priceId = Utils.GetFormValue("ro_rdiPriceStandId");//获取选择的报价等级编号

            EyouSoft.Model.TourStructure.TourOrder orderModel = new EyouSoft.Model.TourStructure.TourOrder();
            orderModel.AdultNumber    = Utils.GetInt(Utils.GetFormValue("ro_txtManCount"), 0);   //获取成人数
            orderModel.BuyCompanyID   = SiteUserInfo.CompanyID;                                  //预定单位
            orderModel.BuyCompanyName = SiteUserInfo.CompanyName;                                //预定单位名
            orderModel.ChildNumber    = Utils.GetInt(Utils.GetFormValue("ro_txtChildCount"), 0); //儿童数
            EyouSoft.Model.TourStructure.TourPriceDetail price = tourModel.TourPriceDetail.Where(i => i.PriceStandId == priceId).First();
            //根据获取的报价等级编号获取相应报价等级
            orderModel.ChildPrice      = price.PriceDetail.Where(i => i.CustomerLevelType == EyouSoft.Model.CompanyStructure.CustomerLevelType.行).First().ChildrenPrice;//儿童价
            TourCompanyId              = tourModel.CompanyID;
            orderModel.CompanyID       = TourCompanyId;
            orderModel.ContactFax      = SiteUserInfo.ContactInfo.Fax;
            orderModel.ContactMQ       = SiteUserInfo.ContactInfo.MQ;
            orderModel.ContactName     = SiteUserInfo.ContactInfo.ContactName;
            orderModel.ContactQQ       = SiteUserInfo.ContactInfo.QQ;
            orderModel.ContactTel      = SiteUserInfo.ContactInfo.Tel;
            orderModel.LastOperatorID  = SiteUserInfo.ID;                                                                                                               //最后操作人
            orderModel.MarketNumber    = int.Parse(Utils.GetFormValue("ro_txtOneRoomCount"));                                                                           //单房差数
            orderModel.MarketPrice     = price.PriceDetail.Where(i => i.CustomerLevelType == EyouSoft.Model.CompanyStructure.CustomerLevelType.单房差).First().AdultPrice; //单房差价
            orderModel.OperatorContent = Utils.GetFormValue("ro_txtOperatorContent");                                                                                   //操作留言
            orderModel.OperatorID      = SiteUserInfo.ID;                                                                                                               //操作人ID
            orderModel.OperatorName    = SiteUserInfo.ContactInfo.ContactName;                                                                                          //操作人名
            orderModel.OrderType       = 0;                                                                                                                             //预定类型
            orderModel.OtherPrice      = decimal.Parse(Utils.GetFormValue("ro_txtOtherPrice"));                                                                         //其他费用
            orderModel.PeopleNumber    = orderModel.ChildNumber + orderModel.AdultNumber;                                                                               //总人数
            if (orderModel.PeopleNumber == 0)
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('请填写游客!');</script>");
            }
            orderModel.AreaType        = tourModel.AreaType;
            orderModel.AreaId          = tourModel.AreaId;
            orderModel.PersonalPrice   = price.PriceDetail.Where(i => i.CustomerLevelType == EyouSoft.Model.CompanyStructure.CustomerLevelType.行).First().AdultPrice;                                                   //成人价
            orderModel.PriceStandId    = priceId;                                                                                                                                                                       //报价等级
            orderModel.RouteName       = tourModel.RouteName;
            orderModel.LeaveDate       = tourModel.LeaveDate;                                                                                                                                                           //出发时间
            orderModel.SpecialContent  = Utils.GetFormValue("ro_txtSpecialContent");                                                                                                                                    //特别要求
            orderModel.SumPrice        = orderModel.AdultNumber * orderModel.PersonalPrice + orderModel.ChildNumber * orderModel.ChildPrice + orderModel.MarketNumber * orderModel.MarketPrice + orderModel.OtherPrice; //总金额
            orderModel.TourCompanyId   = tourModel.CompanyID;                                                                                                                                                           //专线编号
            orderModel.TourCompanyName = tourModel.CompanyName;                                                                                                                                                         //专线公司名
            orderModel.TourDays        = tourModel.TourDays;                                                                                                                                                            //天数
            orderModel.SaveSeatDate    = DateTime.Now;                                                                                                                                                                  //留位时间
            orderModel.TourId          = tourModel.ID;                                                                                                                                                                  //团队编号
            orderModel.TourNo          = tourModel.TourNo;                                                                                                                                                              //团号
            orderModel.TourType        = EyouSoft.Model.TourStructure.TourType.组团团队;
            orderModel.IssueTime       = DateTime.Now;                                                                                                                                                                  //添加时间
            orderModel.OrderSource     = EyouSoft.Model.TourStructure.TourOrderOperateType.组团社下单;                                                                                                                       //订单来源

            //获得游客信息
            List <EyouSoft.Model.TourStructure.TourOrderCustomer> customerList = new List <EyouSoft.Model.TourStructure.TourOrderCustomer>();
            List <string> custNoList = Request.Form.AllKeys.Where(i => i.Contains("CustomerName")).Select(i => i.Substring(12, i.Length - 12)).ToList();

            foreach (string customerNo in custNoList)
            {
                EyouSoft.Model.TourStructure.TourOrderCustomer customerModel = new EyouSoft.Model.TourStructure.TourOrderCustomer();
                customerModel.CompanyID   = SiteUserInfo.CompanyID;                                                                                //所属公司
                customerModel.CompanyName = SiteUserInfo.CompanyName;                                                                              //所属公司名
                customerModel.ContactTel  = Utils.GetFormValue("CustomerTelphone" + customerNo);
                customerModel.CradNumber  = Utils.GetFormValue("CertificateNo" + customerNo);                                                      //证件编号
                customerModel.CradType    = (EyouSoft.Model.TourStructure.CradType) int.Parse(Utils.GetFormValue("CertificateName" + customerNo)); //证件类型
                customerModel.Remark      = Utils.GetFormValue("CustomerRemark" + customerNo);                                                     //备注信息
                customerModel.Sex         = Utils.GetFormValue("CustomerSex" + customerNo) == "1"?true:false;                                      //性别
                customerModel.SiteNo      = Utils.GetFormValue("CustomerSiteNo" + customerNo);                                                     //座位号
                orderModel.SeatList      += customerModel.SiteNo + ",";                                                                            //座位号集
                customerModel.VisitorName = Utils.GetFormValue("CustomerName" + customerNo);                                                       //姓名
                customerModel.VisitorType = Utils.GetFormValue("CustomerType" + customerNo) == "1"?true:false;                                     //类型(成人,儿童)
                customerModel.IssueTime   = DateTime.Now;
                customerModel.RouteName   = routeName;
                customerModel.TourId      = tourId;           //团队ID
                customerModel.TourNo      = tourModel.TourNo; //团号
                customerList.Add(customerModel);
            }
            orderModel.SeatList          = orderModel.SeatList.TrimEnd(','); //获得座位号
            orderModel.TourOrderCustomer = customerList;                     //保存游客信息
            EyouSoft.IBLL.TourStructure.ITourOrder tourOrderBll = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            //开始下订单
            if (tourOrderBll.AddTourOrder(orderModel) > 0)
            {
                EyouSoft.Model.CompanyStructure.CompanyDetailInfo _companyInfo =
                    EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(TourCompanyId);

                bool isSend = Utils.SendSMSForReminderOrder(
                    TourCompanyId,
                    SiteUserInfo.CompanyName,
                    SiteUserInfo.ContactInfo.ContactName,
                    _companyInfo != null ? _companyInfo.CityId : 0);


                if (isSend)
                {
                    EyouSoft.Model.CompanyStructure.CompanyDetailInfo model =
                        EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(TourCompanyId);
                    //发送短信记录
                    EyouSoft.Model.ToolStructure.MsgTipRecord tipModel = new EyouSoft.Model.ToolStructure.MsgTipRecord();
                    tipModel.Email    = string.Empty;
                    tipModel.FromMQID = SiteUserInfo.ContactInfo.MQ;
                    tipModel.ToMQID   = model.ContactInfo.MQ;     //接收方MQ
                    tipModel.Mobile   = model.ContactInfo.Mobile; //接收方手机
                    tipModel.MsgType  = EyouSoft.Model.ToolStructure.MsgType.NewOrder;
                    tipModel.SendWay  = EyouSoft.Model.ToolStructure.MsgSendWay.SMS;

                    EyouSoft.BLL.ToolStructure.MsgTipRecord msgTipBll = new EyouSoft.BLL.ToolStructure.MsgTipRecord();
                    msgTipBll.Add(tipModel);
                }

                Utils.SendEmailForReminderOrder(TourCompanyId, SiteUserInfo.CompanyName, SiteUserInfo.UserName);
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('预定成功!');if(window.parent.Boxy){window.parent.Boxy.getIframeDialog('" + Request.QueryString["iframeId"] + "').hide();if(window.parent.RouteStock){window.parent.RouteStock.refresh();};}else{window.close();}</script>");
            }
            else
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('预定失败!');</script>");
            }
        }
Esempio n. 21
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitPage()
        {
            BindRouteCompany();
            int intRecordCount = 0;

            #region 初始化查询条件
            intPageIndex = Utils.GetInt(Request.QueryString["Page"], 1);
            BeginDate    = Utils.GetDateTimeNullable(Request.QueryString["BeginDate"]);
            if (!string.IsNullOrEmpty(Request.QueryString["BeginDate"]))
            {
                ShowBeginDate = Utils.GetDateTime(Request.QueryString["BeginDate"]).ToShortDateString();
            }
            EndDate = Utils.GetDateTimeNullable(Request.QueryString["EndDate"]);
            if (!string.IsNullOrEmpty(Request.QueryString["EndDate"]))
            {
                ShowEndDate = Utils.GetDateTime(Request.QueryString["EndDate"]).ToShortDateString();
            }
            OrderBeginDate = Utils.GetDateTimeNullable(Request.QueryString["OrderBeginDate"]);
            if (!string.IsNullOrEmpty(Request.QueryString["OrderBeginDate"]))
            {
                ShowOrderBeginDate = Utils.GetDateTime(Request.QueryString["OrderBeginDate"]).ToShortDateString();
            }
            OrderEndDate = Utils.GetDateTimeNullable(Request.QueryString["OrderEndDate"]);
            if (!string.IsNullOrEmpty(Request.QueryString["OrderEndDate"]))
            {
                ShowOrderEndDate = Utils.GetDateTime(Request.QueryString["OrderEndDate"]).ToShortDateString();
            }
            RouteName = Utils.GetQueryStringValue("RouteName");
            RouteName = Server.UrlDecode(RouteName).Trim();
            AreaId    = Utils.GetInt(Request.QueryString["AreaId"], -1);
            if (AreaId > 0)
            {
                dplRouteInfo.SelectedValue = AreaId.ToString();
            }

            //专线供应商
            SellCompanyId = Utils.GetQueryStringValue("RouteCompany");
            dplRouteCompany.SelectedValue = SellCompanyId;
            #endregion
            EyouSoft.IBLL.TourStructure.ITourOrder Orderbll = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            //某个组团社的订单数统计
            IList <EyouSoft.Model.TourStructure.AreaAndOrderNum> lists = new List <EyouSoft.Model.TourStructure.AreaAndOrderNum>();
            lists = Orderbll.GetAreaAndOrderNum(BuyCompanyId, SellCompanyId, RouteName, 0, BeginDate, EndDate, OrderBeginDate, OrderEndDate);
            BindRouteInfo(lists);
            List <EyouSoft.Model.TourStructure.AreaAndOrderNum> BindList = new List <EyouSoft.Model.TourStructure.AreaAndOrderNum>();
            if (AreaId > 0)
            {
                BindList = ((List <EyouSoft.Model.TourStructure.AreaAndOrderNum>)lists).FindAll(item => {
                    return(item.AreaId == AreaId);
                });
            }
            else
            {
                BindList = (List <EyouSoft.Model.TourStructure.AreaAndOrderNum>)lists;
            }
            rpt_OrdersAllOutSource.DataSource = BindList;
            rpt_OrdersAllOutSource.DataBind();
            intRecordCount = BindList.Count;
            //是否有订单统计信息
            if (rpt_OrdersAllOutSource.Items.Count < 1)
            {
                this.NoData.Visible = true;
            }
            this.ExportPageInfo1.intPageSize    = intPageSize;
            this.ExportPageInfo1.CurrencyPage   = intPageIndex;
            this.ExportPageInfo1.intRecordCount = intRecordCount;
            this.ExportPageInfo1.PageLinkURL    = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?";
            lists    = null;
            Orderbll = null;
        }