Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                /*if (Utils.GetQueryStringValue("tourId") != "")
                 * {
                 *  string tourId = Utils.GetQueryStringValue("tourId");
                 *  EyouSoft.BLL.TourStructure.TourOrder orderbll = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo);
                 *  IList<EyouSoft.Model.TourStructure.TourOrderCustomer> listCus = orderbll.GetTravellers(tourId);
                 *  EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket();
                 *
                 *  IList<string> CustomerList = bll.CustomerList(tourId);
                 *  var list = from v in listCus
                 *             from k in CustomerList
                 *             where v.ID == k
                 *             select v;
                 *  rpt_list.DataSource = list.ToList();
                 *  rpt_list.DataBind();
                 *  rpt_list.EmptyText = "<tr><td colspan='4' align='center'>没有任何记录</td></tr>";
                 *
                 * }
                 * }*/

                //request query ticketIssueId:机票出票编号
                string ticketIssueId = Utils.GetQueryStringValue("ticketIssueId");
                rpt_list.EmptyText = "<tr><td colspan='4' align='center'>没有任何记录</td></tr>";

                if (!string.IsNullOrEmpty(ticketIssueId))
                {
                    EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket();
                    var info = bll.GetTicketOutListModel(ticketIssueId);

                    if (info != null && info.CustomerInfoList != null && info.CustomerInfoList.Count > 0)
                    {
                        rpt_list.DataSource = info.CustomerInfoList;
                        rpt_list.DataBind();
                    }
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// 该游客是否可以申请
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public string isHave(string id, List <int> ApplyFlights, List <int> RefundFlights)
        {
            EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket();
            string strvalue = "";

            #region 原来的判断
            if (CustomerList == null)
            {
                CustomerList = bll.CustomerList(Utils.GetQueryStringValue("tourId"));
            }
            if (CustomerList != null)
            {
                if (CustomerList.Contains(id))
                {
                    string iD = Utils.GetString(Request.QueryString["id"], "");
                    if (id != "" && modelinfo == null)
                    {
                        modelinfo = bll.GetTicketOutListModel(iD);
                    }
                    if (modelinfo != null)
                    {
                        if (modelinfo.CustomerInfoList.Where(x => x.ID == id).Count() > 0)
                        {
                            strvalue = "checked='true'";
                        }
                        else
                        {
                            ////////判断是否可选
                            //strvalue = "disabled=\"disabled\"";

                            #region 配置判断
                            if (TicketTraveller == EyouSoft.Model.EnumType.CompanyStructure.TicketTravellerCheckedType.None)
                            {
                                strvalue = "";
                            }
                            else
                            {
                                int istuipiao = 0, enumtuipiao = 0;//1有退票,2全部退票,0没有退票
                                if (ApplyFlights != null)
                                {
                                    if (RefundFlights != null)
                                    {
                                        foreach (var v in ApplyFlights)
                                        {
                                            var l = RefundFlights.Where(x => x == v);
                                            if (l.Count() > 0)
                                            {
                                                istuipiao++;
                                            }
                                        }
                                    }
                                    if (istuipiao > 0)
                                    {
                                        enumtuipiao = 1;
                                    }
                                    if (istuipiao == ApplyFlights.Count)
                                    {
                                        enumtuipiao = 2;
                                    }
                                    if (TicketTraveller == EyouSoft.Model.EnumType.CompanyStructure.TicketTravellerCheckedType.LeastOne)
                                    {
                                        if (enumtuipiao == 0)
                                        {
                                            strvalue += " disabled=\"disabled\"";
                                        }
                                    }
                                    if (TicketTraveller == EyouSoft.Model.EnumType.CompanyStructure.TicketTravellerCheckedType.All)
                                    {
                                        if (enumtuipiao != 2)
                                        {
                                            strvalue += " disabled=\"disabled\"";
                                        }
                                    }
                                }
                            }

                            #endregion
                        }
                    }
                    else
                    {
                        //strvalue = "disabled=\"disabled\"";
                        #region 配置判断
                        if (TicketTraveller == EyouSoft.Model.EnumType.CompanyStructure.TicketTravellerCheckedType.None)
                        {
                            strvalue = "";
                        }
                        else
                        {
                            int istuipiao = 0, enumtuipiao = 0;//1有退票,2全部退票,0没有退票
                            if (ApplyFlights != null)
                            {
                                if (RefundFlights != null)
                                {
                                    foreach (var v in ApplyFlights)
                                    {
                                        var l = RefundFlights.Where(x => x == v);
                                        if (l.Count() > 0)
                                        {
                                            istuipiao++;
                                        }
                                    }
                                }
                                if (istuipiao > 0)
                                {
                                    enumtuipiao = 1;
                                }
                                if (istuipiao == ApplyFlights.Count)
                                {
                                    enumtuipiao = 2;
                                }
                                if (TicketTraveller == EyouSoft.Model.EnumType.CompanyStructure.TicketTravellerCheckedType.LeastOne)
                                {
                                    if (enumtuipiao == 0)
                                    {
                                        strvalue += " disabled=\"disabled\"";
                                    }
                                }
                                if (TicketTraveller == EyouSoft.Model.EnumType.CompanyStructure.TicketTravellerCheckedType.All)
                                {
                                    if (enumtuipiao != 2)
                                    {
                                        strvalue += " disabled=\"disabled\"";
                                    }
                                }
                            }
                        }

                        #endregion
                    }
                }
                else
                {
                    strvalue = "";
                }
            }
            else
            {
                strvalue = "";
            }
            #endregion
            if (id == Utils.GetQueryStringValue("cid"))
            {
                strvalue += " checked=\"true\"";
            }
            return(strvalue);
        }
Beispiel #3
0
        private void onInit()
        {
            BindPayType();
            //证件类型绑定
            CusCardTypeBind();
            //航空公司绑定
            AirCompanyTypeBind();
            string id = Utils.GetQueryStringValue("id");

            if (id != "")
            {
                EyouSoft.BLL.PlanStruture.PlaneTicket          bll   = new EyouSoft.BLL.PlanStruture.PlaneTicket();
                EyouSoft.Model.PlanStructure.TicketOutListInfo model = bll.GetTicketOutListModel(id);
                if (model != null)
                {
                    #region 航班
                    if (model.TicketFlightList != null && model.TicketFlightList.Count > 0)
                    {
                        RepAirList.DataSource = model.TicketFlightList;
                        RepAirList.DataBind();
                    }
                    #endregion

                    #region  单

                    this.hideTourId.Value = model.TourId;

                    EyouSoft.BLL.TourStructure.TourOrder orderbll = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo);
                    System.Collections.Generic.IList <EyouSoft.Model.TourStructure.TourOrderCustomer> cusromerList = orderbll.GetTravellers(model.TourId);
                    if (cusromerList != null && cusromerList.Count > 0)
                    {
                        this.RepCusList.DataSource = cusromerList;
                        this.RepCusList.DataBind();
                    }
                    #endregion

                    #region 票款
                    if (model.TicketKindInfoList != null && model.TicketKindInfoList.Count > 0)
                    {
                        foreach (EyouSoft.Model.PlanStructure.TicketKindInfo TicketKindInfo in model.TicketKindInfoList)
                        {
                            #region 成人
                            if (TicketKindInfo.TicketType == EyouSoft.Model.EnumType.PlanStructure.KindType.成人)
                            {
                                //票面价
                                this.txtAdultPrice.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.Price.ToString()).ToString("0.00"));
                                //税/机建
                                this.txtAdultShui.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.OilFee.ToString()).ToString("0.00"));
                                //人数
                                this.txtAdultCount.Value = TicketKindInfo.PeopleCount.ToString();
                                //代理费
                                this.txtAdultProxyPrice.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.AgencyPrice.ToString()).ToString("0.00"));
                                //百分比
                                this.txt_Percent.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString((TicketKindInfo.Discount).ToString("0.00"));
                                //其它费用
                                this.txt_OtherMoney.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.OtherPrice.ToString()).ToString("0.00"));
                                //票款
                                this.txtAdultSum.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.TotalMoney.ToString()).ToString("0.00"));
                            }
                            #endregion

                            #region 儿童
                            if (TicketKindInfo.TicketType == EyouSoft.Model.EnumType.PlanStructure.KindType.儿童)
                            {
                                //票面价
                                this.txtChildPrice.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.Price.ToString()).ToString("0.00"));
                                //税/机建
                                this.txtChildShui.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.OilFee.ToString()).ToString("0.00"));
                                //人数
                                this.txtChildCount.Value = TicketKindInfo.PeopleCount.ToString();
                                //代理费
                                this.txtChildProxyPrice.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.AgencyPrice.ToString()).ToString("0.00"));
                                //百分比
                                this.txt_PercentChild.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString((TicketKindInfo.Discount).ToString("0.00"));
                                //其它费用
                                this.txt_OtherMoneyChild.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.OtherPrice.ToString()).ToString("0.00"));
                                //票款
                                this.txtChildSum.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.TotalMoney.ToString()).ToString("0.00"));
                            }
                            #endregion
                        }
                    }
                    #endregion

                    #region 基本信息
                    //总费用
                    this.txtSumMoney.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(model.Total.ToString()).ToString("0.00"));
                    //支付方式
                    this.ddlPayType.SelectedValue = model.PayType.ToString();
                    //订票须知
                    this.txtOrderPiaoMust.Value = model.Notice;
                    //PNR
                    this.txtPNR.Value = model.PNR;
                    //售票处
                    this.txtSalePlace.Value = model.TicketOffice;
                    //供应商编号
                    this.hd_PiaoWuSuppId.Value = model.TicketOfficeId.ToString();
                    //票号
                    this.txtPiaoHao.Value = model.TicketNum;
                    //备注
                    this.txtMemo.Value = model.Remark;
                    //支付方式
                    if (model.PayType.ToString() != "0" && model.PayType.ToString() != "")
                    {
                        this.ddlPayType.Items.FindByText(model.PayType.ToString()).Selected = true;
                    }
                    //订单ID
                    this.hdOrderID.Value = model.OrderId;
                    //团号ID
                    this.hdTourID.Value = model.TourId;
                    //线路名称
                    this.hd_LineName.Value = model.RouteName;
                    #endregion
                }
                bll   = null;
                model = null;
            }
        }
Beispiel #4
0
        /// <summary>
        /// 提交事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lbtn_submit_Click(object sender, EventArgs e)
        {
            //    DateTime date = DateTime.Parse(txt_date.Value);
            //    string leg = txt_Leg.Value;
            //    string gotime = txt_gotime.Value;
            //    string backLeg = txt_backLeg.Value;
            //    string backTime = txt_backTime.Value;
            //    string company = ddl_Com.SelectedValue;
            //    string PNG = txt_PNG.Value;
            //    decimal PiaoKuang = decimal.Parse(txt_PiaoKuang.Value);
            //    decimal dailifei = decimal.Parse( txt_DaiLiFei.Value);
            //    int pepoleNum = int.Parse( txt_Pepole.Value );
            //    decimal sumPrice = decimal.Parse(txt_SumPrice.Value);
            //    string Order = txt_Order.Value;
            //    for (int i = 0; i < Utils.GetFormValues("txt_code").Length; i++)
            //    {
            //        //do something...
            //    }
            EyouSoft.Model.TourStructure.TourBaseInfo mb = new EyouSoft.BLL.TourStructure.Tour().GetTourInfo(Utils.GetQueryStringValue("tourid"));
            if (mb != null)
            {
                if (!Utils.PlanIsUpdateOrDelete(mb.Status.ToString()))
                {
                    Response.Write("<script>alert('该团已提交财务,不能对它操作!');location.href=location.href;</script>");
                    return;
                }
            }
            UserInfo userInfo = null;
            bool     _IsLogin = EyouSoft.Security.Membership.UserProvider.IsUserLogin(out userInfo);

            EyouSoft.BLL.PlanStruture.PlaneTicket          bll   = new EyouSoft.BLL.PlanStruture.PlaneTicket();
            EyouSoft.Model.PlanStructure.TicketOutListInfo model = new EyouSoft.Model.PlanStructure.TicketOutListInfo();
            if (this.hideId.Value != "")
            {
                model = bll.GetTicketOutListModel(this.hideId.Value);
            }
            if (model != null)
            {
                model.CompanyID = cur_companyId;
                model.Notice    = Utils.GetFormValue("txt_Order");
                model.OperateID = userInfo.ID;
                model.Operator  = userInfo.ContactInfo.ContactName;
                model.PayType   = (EyouSoft.Model.EnumType.TourStructure.RefundType)Utils.GetInt(Utils.GetFormValue("sel_paytype"));
                model.PNR       = Utils.GetFormValue("txt_Pnr");
                model.Remark    = Utils.GetFormValue("textRemark");
                model.State     = EyouSoft.Model.EnumType.PlanStructure.TicketState.机票申请;
                model.TourId    = this.hideTourId.Value;

                IList <EyouSoft.Model.PlanStructure.TicketFlight> ltf = new
                                                                        List <EyouSoft.Model.PlanStructure.TicketFlight>();
                IList <EyouSoft.Model.PlanStructure.TicketKindInfo> ltki = new
                                                                           List <EyouSoft.Model.PlanStructure.TicketKindInfo>();
                for (int i = 0; i < Utils.GetFormValues("txt_date").Length; i++)
                {
                    EyouSoft.Model.PlanStructure.TicketFlight tf = new EyouSoft.Model.PlanStructure.TicketFlight();
                    tf.TicketTime    = Utils.GetFormValues("txt_time")[i];
                    tf.AireLine      = (EyouSoft.Model.EnumType.PlanStructure.FlightCompany)(Utils.GetInt(Utils.GetFormValues("sel_com")[i]));
                    tf.DepartureTime = Utils.GetDateTime(Utils.GetFormValues("txt_date")[i]);
                    tf.Discount      = Utils.GetDecimal(Utils.GetFormValues("txt_Discount")[i]);
                    tf.FligthSegment = Utils.GetFormValues("sel_Flight")[i];
                    ltf.Add(tf);
                }

                ////成人票款
                EyouSoft.Model.PlanStructure.TicketKindInfo tki = new EyouSoft.Model.PlanStructure.TicketKindInfo();
                tki.OilFee      = Utils.GetDecimal(Utils.GetFormValue("txt_shui"));
                tki.PeopleCount = Utils.GetInt(Utils.GetFormValue("txt_pepoleNum"));
                tki.Price       = Utils.GetDecimal(Utils.GetFormValue("txt_piaomianjia"));
                tki.TotalMoney  = Utils.GetDecimal(Utils.GetFormValue("txt_piaokuan"));
                tki.TicketType  = EyouSoft.Model.EnumType.PlanStructure.KindType.成人;
                if (config_Agency.HasValue && EyouSoft.Model.EnumType.CompanyStructure.AgencyFeeType.公式三 == config_Agency.Value)
                {
                    tki.OtherPrice  = Utils.GetDecimal(Utils.GetFormValue("txt_DaiLiFei"));
                    tki.Discount    = Utils.GetDecimal(Utils.GetFormValue("txt_Percent"), 100) / 100;
                    tki.AgencyPrice = 0;
                }
                else
                {
                    tki.OtherPrice  = 0;
                    tki.Discount    = 1;
                    tki.AgencyPrice = Utils.GetDecimal(Utils.GetFormValue("txt_DaiLiFei"));
                }
                ltki.Add(tki);
                ///////儿童票款
                EyouSoft.Model.PlanStructure.TicketKindInfo tkirt = new EyouSoft.Model.PlanStructure.TicketKindInfo();
                tkirt.AgencyPrice = Utils.GetDecimal(Utils.GetFormValue("txt_DaiLiFei2"));
                tkirt.OilFee      = Utils.GetDecimal(Utils.GetFormValue("txt_shui2"));
                tkirt.PeopleCount = Utils.GetInt(Utils.GetFormValue("txt_pepoleNum2"));
                tkirt.Price       = Utils.GetDecimal(Utils.GetFormValue("txt_piaomianjia2"));
                tkirt.TotalMoney  = Utils.GetDecimal(Utils.GetFormValue("txt_piaokuan2"));
                tkirt.TicketType  = EyouSoft.Model.EnumType.PlanStructure.KindType.儿童;
                tkirt.OtherPrice  = Utils.GetDecimal(Utils.GetFormValue("txt_DaiLiFei2"));
                tkirt.Discount    = Utils.GetDecimal(Utils.GetFormValue("txt_Percent2"), 100) / 100;
                ltki.Add(tkirt);
                ////
                model.Total = Utils.GetDecimal(Utils.GetFormValue("txt_SumPrice"));
                model.TicketKindInfoList = ltki;
                model.TicketFlightList   = ltf;
                EyouSoft.BLL.RouteStructure.Route routbll = new EyouSoft.BLL.RouteStructure.Route(userInfo);
                EyouSoft.BLL.TourStructure.Tour   tourbll = new EyouSoft.BLL.TourStructure.Tour(userInfo);

                model.RouteName = tourbll.GetTourInfo(Utils.GetQueryStringValue("tourId")).RouteName;

                IList <EyouSoft.Model.PlanStructure.TicketOutCustomerInfo> listorder = new List <EyouSoft.Model.PlanStructure.TicketOutCustomerInfo>();
                if (Utils.GetFormValues("chk_md").Length == 0)
                {
                    Utils.Show("请选择游客!");
                    return;
                }
                IList <EyouSoft.Model.TourStructure.TourOrderCustomer> listcus = new
                                                                                 List <EyouSoft.Model.TourStructure.TourOrderCustomer>();
                //for (int i = 0; i < Utils.GetFormValues("chk_md").Length; i++)
                //{
                //    EyouSoft.Model.PlanStructure.TicketOutCustomerInfo m = new EyouSoft.Model.PlanStructure.TicketOutCustomerInfo();
                //    EyouSoft.Model.TourStructure.TourOrderCustomer c = new EyouSoft.Model.TourStructure.TourOrderCustomer();

                //    c.ID = Utils.GetFormValues("chk_md")[i];
                //    c.VisitorName = Utils.GetFormValues("txt_name")[i];
                //    c.CradType = (EyouSoft.Model.EnumType.TourStructure.CradType)Utils.GetInt(Utils.GetFormValues("sel_cred")[i]);
                //    c.CradNumber = Utils.GetFormValues("txt_code")[i];
                //    m.UserId = Utils.GetFormValues("chk_md")[i];
                //    listorder.Add(m);
                //    listcus.Add(c);
                //}
                for (int i = 0; i < Utils.GetFormValues("chk_md").Length; i++)
                {
                    EyouSoft.Model.PlanStructure.TicketOutCustomerInfo m = new EyouSoft.Model.PlanStructure.TicketOutCustomerInfo();
                    EyouSoft.Model.TourStructure.TourOrderCustomer     c = new EyouSoft.Model.TourStructure.TourOrderCustomer();
                    c.ID = Utils.GetFormValues("chk_md")[i];
                    for (int j = 0; j < Utils.GetFormValues("txt_name").Length; j++)
                    {
                        if (c.ID == Utils.GetFormValues("hd_uid")[j])
                        {
                            c.VisitorName = Utils.GetFormValues("txt_name")[j];
                            c.CradType    = (EyouSoft.Model.EnumType.TourStructure.CradType)Utils.GetInt(Utils.GetFormValues("sel_cred")[j]);
                            c.CradNumber  = Utils.GetFormValues("txt_code")[j];
                            break;
                        }
                    }
                    m.UserId = Utils.GetFormValues("chk_md")[i];
                    listorder.Add(m);
                    listcus.Add(c);
                }
                model.CustomerInfoList          = listcus;
                model.TicketOutCustomerInfoList = listorder;

                //if (Utils.GetInt(Utils.GetQueryStringValue("type")) == 1)
                //{
                //    ///散拼计划机票计调
                //    model.TicketType = EyouSoft.Model.EnumType.PlanStructure.TicketType.订单申请机票;
                //}
                //else
                //{
                ///团队计划机票计调
                model.TicketType = EyouSoft.Model.EnumType.PlanStructure.TicketType.团队申请机票;
                //}
                //model.TicketOutId = "0";
                model.RegisterOperatorId = userInfo.ID;
                //售票处
                model.TicketOffice   = this.txtSalePlace.Value;
                model.TicketOfficeId = Utils.GetInt(this.hd_PiaoWuSuppId.Value);
                if (this.hideId.Value != "")
                {
                    //修改
                    model.TicketOutId = this.hideId.Value;

                    if (bll.UpdateTicketOutListModel(model))
                    {
                        Utils.ShowAndRedirect("修改成功!", Request.Url.ToString());
                    }
                    else
                    {
                        Utils.ShowAndRedirect("修改失败!", Request.Url.ToString());
                    }
                }
                else
                {
                    //添加
                    if (bll.addTicketOutListModel(model))
                    {
                        Utils.ShowAndRedirect("添加成功!", Request.Url.ToString());
                    }
                    else
                    {
                        Utils.ShowAndRedirect("添加失败!", Request.Url.ToString());
                    }
                }
            }
        }
Beispiel #5
0
        /// <summary>
        /// 绑定信息
        /// </summary>
        void BindInfo()
        {
            //EyouSoft.Model.PlanStructure.TicketOutListInfo model = bll.GetTicketOutListModel(Request.QueryString["id"]);
            //;
            EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket();

            UserInfo userInfo = null;
            bool     _IsLogin = EyouSoft.Security.Membership.UserProvider.IsUserLogin(out userInfo);

            EyouSoft.BLL.TourStructure.TourOrder orderbll = new EyouSoft.BLL.TourStructure.TourOrder(userInfo);
            //string orderId = orderbll.GetOrderIdByTourId(Request.QueryString["tourId"]);
            if (Utils.GetQueryStringValue("tourId") != "")
            {
                string tourId = Utils.GetQueryStringValue("tourId");
                this.hideTourId.Value = tourId;

                CustomerList = bll.CustomerList(Utils.GetQueryStringValue("tourId"));

                cusList = orderbll.GetTravellers(tourId);//.Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList();
                for (int i = cusList.Count - 1; i >= 0; i--)
                {
                    if (!CustomerList.Contains(cusList[i].ID))
                    {
                        if (cusList[i].CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.已退团)
                        {
                            cusList.RemoveAt(i);
                        }
                    }
                }
                rpt_list.DataSource = cusList;
                count = 10;
                rpt_list.DataBind();
            }

            if (Utils.GetString(Request.QueryString["id"], "") != "")
            {
                this.hideId.Value = Utils.GetString(Request.QueryString["id"], "");

                modelinfo = bll.GetTicketOutListModel(Request.QueryString["id"]);
                if (modelinfo != null)
                {
                    rpt_hangbang.DataSource = modelinfo.TicketFlightList;
                    rpt_hangbang.DataBind();
                    if (modelinfo.TicketKindInfoList != null)
                    {
                        piaomianjia = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList.FirstOrDefault().Price);
                        shui        = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList.FirstOrDefault().OilFee);
                        pepoleNum   = modelinfo.TicketKindInfoList.FirstOrDefault().PeopleCount.ToString();
                        DaiLiFei    = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList.FirstOrDefault().AgencyPrice);
                        piaokuan    = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList.FirstOrDefault().TotalMoney);

                        OtherMoney = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList.FirstOrDefault().OtherPrice);
                        Percent    = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList.FirstOrDefault().Discount * 100);
                        if (modelinfo.TicketKindInfoList.Count > 1)
                        {
                            piaomianjia2 = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList[1].Price);
                            shui2        = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList[1].OilFee);
                            pepoleNum2   = modelinfo.TicketKindInfoList[1].PeopleCount.ToString();
                            DaiLiFei2    = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList[1].AgencyPrice);
                            piaokuan2    = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList[1].TotalMoney);
                            OtherMoney2  = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList[1].OtherPrice);
                            Percent2     = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList[1].Discount * 100);
                        }
                    }
                    Png     = modelinfo.PNR;
                    Total   = Utils.FilterEndOfTheZeroDecimal(modelinfo.Total);
                    paytype = modelinfo.PayType.ToString();
                    Notice  = modelinfo.Notice;
                    Remark  = modelinfo.Remark;

                    //售票处
                    this.txtSalePlace.Value    = modelinfo.TicketOffice;
                    this.hd_PiaoWuSuppId.Value = modelinfo.TicketOfficeId.ToString();
                }
            }
        }
Beispiel #6
0
        private void onInit()
        {
            BindPayType();
            //证件类型绑定
            CusCardTypeBind();
            //航空公司绑定
            AirCompanyTypeBind();
            string id = Utils.GetQueryStringValue("id");

            if (id != "")
            {
                EyouSoft.BLL.PlanStruture.PlaneTicket          bll   = new EyouSoft.BLL.PlanStruture.PlaneTicket();
                EyouSoft.Model.PlanStructure.TicketOutListInfo model = bll.GetTicketOutListModel(id);
                if (model != null)
                {
                    #region 航班
                    if (model.TicketFlightList != null && model.TicketFlightList.Count > 0)
                    {
                        RepAirList.DataSource = model.TicketFlightList;
                        RepAirList.DataBind();
                    }
                    #endregion

                    #region  单
                    if (model.CustomerInfoList != null && model.CustomerInfoList.Count > 0)
                    {
                        this.RepCusList.DataSource = model.CustomerInfoList;
                        this.RepCusList.DataBind();
                    }
                    #endregion

                    #region 票款
                    if (model.TicketKindInfoList != null && model.TicketKindInfoList.Count > 0)
                    {
                        foreach (EyouSoft.Model.PlanStructure.TicketKindInfo TicketKindInfo in model.TicketKindInfoList)
                        {
                            #region 成人
                            if (TicketKindInfo.TicketType == EyouSoft.Model.EnumType.PlanStructure.KindType.成人)
                            {
                                //票面价
                                this.txtAdultPrice.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.Price);
                                //税/机建
                                this.txtAdultShui.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.OilFee);
                                //人数
                                this.txtAdultCount.Value = TicketKindInfo.PeopleCount.ToString();
                                //代理费
                                this.txtAdultProxyPrice.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.AgencyPrice);
                                //票款
                                this.txtAdultSum.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.TotalMoney);
                                //百分比
                                txt_Percent.Value  = FilterEndOfTheZeroDecimal(TicketKindInfo.Discount);
                                txt_DaiLiFei.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.OtherPrice);
                            }
                            #endregion

                            #region 儿童
                            if (TicketKindInfo.TicketType == EyouSoft.Model.EnumType.PlanStructure.KindType.儿童)
                            {
                                //票面价
                                this.txtChildPrice.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.Price);
                                //税/机建
                                this.txtChildShui.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.OilFee);
                                //人数
                                this.txtChildCount.Value = TicketKindInfo.PeopleCount.ToString();
                                //代理费
                                this.txtChildProxyPrice.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.AgencyPrice);
                                //票款
                                this.txtChildSum.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.TotalMoney);
                                txt_Percent2.Value     = FilterEndOfTheZeroDecimal(TicketKindInfo.Discount);
                                txt_DaiLiFei2.Value    = FilterEndOfTheZeroDecimal(TicketKindInfo.OtherPrice);
                            }
                            #endregion
                        }
                    }
                    #endregion

                    #region 基本信息
                    //总费用
                    this.txtSumMoney.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(model.TotalAmount.ToString()).ToString("0.00"));
                    //支付方式
                    this.ddlPayType.SelectedValue = model.PayType.ToString();
                    //订票须知
                    this.txtOrderPiaoMust.Value = model.Notice;
                    //PNR
                    this.txtPNR.Value = model.PNR;
                    //售票处
                    this.txtSalePlace.Value = model.TicketOffice;
                    //票号
                    this.txtPiaoHao.Value = model.TicketNum;
                    //备注
                    this.txtMemo.Value = model.Remark;
                    if (model.PayType.ToString() != "0" && model.PayType.ToString() != "")
                    {
                        this.ddlPayType.Items.FindByText(model.PayType.ToString()).Selected = true;
                    }
                    //订单ID
                    this.hdOrderID.Value = model.OrderId;
                    //团号ID
                    this.hdTourID.Value = model.TourId;
                    #endregion
                }
                bll   = null;
                model = null;
            }
        }