Example #1
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (Request.QueryString["action"] != null)
     {
         SystemDictionaryType systemDictionaryType = (SystemDictionaryType)Enum.Parse(typeof(SystemDictionaryType), Request.QueryString["type"].ToString());
         SystemDictionaryItem systemDictionaryItem = null;
         if (Request.QueryString["action"].ToString() == "add")
         {
             try
             {
                 systemDictionaryItem = new SystemDictionaryItem(this.txtName.Text.Trim(), this.txtValue.Text.Trim(), this.ttRemark.InnerText.Trim());
                 SystemDictionaryService.AddItem(systemDictionaryType, systemDictionaryItem, CurrentUser.UserName);
                 RegisterScript("alert('添加成功!'); window.location.href='Dictionary.aspx';");
             } catch (Exception ex) {
                 ShowExceptionMessage(ex, "添加");
             }
         }
         else if (Request.QueryString["action"].ToString() == "update")
         {
             try
             {
                 systemDictionaryItem = new SystemDictionaryItem(new Guid(Request.QueryString["Id"]), this.txtName.Text.Trim(), this.txtValue.Text.Trim(), this.ttRemark.InnerText.Trim());
                 SystemDictionaryService.UpdateItem(systemDictionaryType, systemDictionaryItem, CurrentUser.UserName);
                 RegisterScript("alert('修改成功!'); window.location.href='Dictionary.aspx';");
             } catch (Exception ex) {
                 ShowExceptionMessage(ex, "修改");
             }
         }
     }
 }
Example #2
0
        private static string getOemContractValue(string name)
        {
            IEnumerable <SystemDictionaryItem> oemContract = SystemDictionaryService.Query(SystemDictionaryType.OEMContract);
            SystemDictionaryItem result = oemContract.Where(r => r.Name == name).FirstOrDefault();

            return(result != null && !string.IsNullOrEmpty(result.Value) ? result.Value : string.Empty);
        }
Example #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         SystemDictionaryType systemDictionaryType = (SystemDictionaryType)Enum.Parse(typeof(SystemDictionaryType), Request.QueryString["type"].ToString());
         this.lblDictionaryName.Text = systemDictionaryType.GetDescription();
         if (Request.QueryString["action"] != null && Request.QueryString["action"].ToString() == "update")
         {
             IEnumerable <SystemDictionaryItem> systemDictionaryItems = SystemDictionaryService.Query(systemDictionaryType);
             var itemId         = new Guid(Request.QueryString["Id"]);
             var dictionaryItem = systemDictionaryItems.FirstOrDefault(item => item.Id == itemId);
             if (dictionaryItem == null)
             {
                 return;
             }
             if (dictionaryItem.Name != null)
             {
                 this.txtName.Text = dictionaryItem.Name;
             }
             if (dictionaryItem.Value != null)
             {
                 this.txtValue.Text = dictionaryItem.Value;
             }
             if (dictionaryItem.Remark != null)
             {
                 this.ttRemark.InnerText = dictionaryItem.Remark;
             }
         }
     }
 }
Example #4
0
        private static string GetServicePhone()
        {
            IEnumerable <SystemDictionaryItem> oemContract = SystemDictionaryService.Query(SystemDictionaryType.OEMContract);
            SystemDictionaryItem result = oemContract.FirstOrDefault(r => r.Name == "ServicePhone");

            return(result != null && !string.IsNullOrEmpty(result.Value) ? result.Value : string.Empty);
        }
Example #5
0
        private void getCoordinationResult()
        {
            var coordinationResult = SystemDictionaryService.Query(Service.SystemManagement.Domain.SystemDictionaryType.CoordinationResult);

            this.ddlCoordinationResult.DataSource     = coordinationResult;
            this.ddlCoordinationResult.DataTextField  = "Name";
            this.ddlCoordinationResult.DataValueField = "Name";
            this.ddlCoordinationResult.DataBind();
            this.ddlCoordinationResult.Items.Insert(0, new ListItem("-请选择-", ""));
        }
Example #6
0
        private void Refresh()
        {
            SystemDictionaryType dictionaryType = SystemDictionaryType.FirstOrBusinessBunkDescription;

            if (Request.QueryString["categoryId"] != null)
            {
                string categoryId = Request.QueryString["categoryId"].ToString();
                dictionaryType = (SystemDictionaryType)Enum.Parse(typeof(SystemDictionaryType), categoryId);
            }
            this.lblDictionaryName.Text   = dictionaryType.GetDescription();
            this.gvSpecialType.DataSource = SystemDictionaryService.Query(dictionaryType);
            this.gvSpecialType.DataBind();
            this.iType.Value = ((int)dictionaryType).ToString();
        }
Example #7
0
 protected void btnRefresh_Click(object sender, EventArgs e)
 {
     try
     {
         string refreshAddress = SystemDictionaryService.Query(SystemDictionaryType.SystemRefreshCacheAddress).FirstOrDefault().Value;
         string key            = Utility.MD5EncryptorService.MD5FilterZero(System.Configuration.ConfigurationManager.AppSettings["SignKey"], "utf-8");
         ChinaPay.Utility.HttpRequestUtility.GetHttpResult(refreshAddress + "?Action=Flush&Target=DICTIONARY&Key=" + key, 3000);
         ShowMessage("刷新成功");
     }
     catch (Exception ex)
     {
         ShowExceptionMessage(ex, "刷新");
     }
 }
Example #8
0
        private void bindData(string source)
        {
            if (ChangeProviderSource == source)
            {
                decimal orderId;
                if (decimal.TryParse(Request.QueryString["orderId"], out orderId))
                {
                    var order = Service.OrderQueryService.QueryOrder(orderId);
                    if (order == null)
                    {
                        Response.Write("订单不存在");
                        Response.End();
                    }
                    else
                    {
                        string lockErrorMsg;
                        if (Lock(orderId, LockRole.Platform, "更换出票方", out lockErrorMsg))
                        {
                            Session["OriginalOrder"] = order;
                        }
                        else
                        {
                            Response.Write("锁定订单失败。原因:" + lockErrorMsg);
                            Response.End();
                        }
                    }
                }
                else
                {
                    Response.Write("参数错误");
                    Response.End();
                }
            }
            var passengers = GetPassengers(source);
            var flights    = processFlights(source);
            var policy     = GetPolicyView();

            bindFlights(flights, source, policy);
            bindPassenger(passengers, flights, GetPATPrice(source));
            setParametersInfo(source, flights);
            LoadIsTeam();
            var items = SystemDictionaryService.Query(SystemDictionaryType.StandbyAndApplyFor);

            hidSQtip.Value = items.ElementAt(1).Value;
            hidHBtip.Value = items.ElementAt(0).Value;
        }
Example #9
0
 protected void gvSpecialType_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "update")
     {
         string id = e.CommandArgument.ToString();
         if (iType.Value.ToString() == "0")
         {
             Response.Redirect("Dictionary_new.aspx?action=update&Id=" + id + "&type=FirstOrBusinessBunkDescription");
         }
         else
         {
             Response.Redirect("Dictionary_new.aspx?Id=" + id + "&action=update&type=" + iType.Value.ToString());
         }
     }
     else if (e.CommandName == "dictionaryDel")
     {
         if (e.CommandArgument != null)
         {
             string type = string.Empty;
             if (iType.Value.ToString() == "0")
             {
                 type = "FirstOrBusinessBunkDescription";
             }
             else
             {
                 type = iType.Value.ToString();
             }
             try
             {
                 SystemDictionaryType systemDictionaryType = (SystemDictionaryType)Enum.Parse(typeof(SystemDictionaryType), type);
                 SystemDictionaryService.DeleteItem(systemDictionaryType, new Guid(e.CommandArgument.ToString()), "");
                 RegisterScript("alert('删除成功!'); window.location.href='Dictionary.aspx';");
             } catch (Exception ex) {
                 ShowExceptionMessage(ex, "删除");
             }
         }
     }
 }
Example #10
0
 /// <summary>
 /// 申请改期
 /// </summary>
 /// <param name="orderId">订单号</param>
 /// <param name="pnrCode">编码(小编码|大编码)</param>
 /// <param name="passengers">乘机人(乘机人id,以','隔开)</param>
 /// <param name="voyages">航段(航段id|新航班号|新航班日期,以','隔开)</param>
 /// <param name="remark">改期备注</param>
 public string ApplyPostpone(decimal orderId, string pnrCode, string passengers, string voyages, string remark, string carrair)
 {
     try
     {
         var applyformView = new PostponeApplyformView()
         {
             PNR        = getPNRPair(pnrCode),
             Passengers = getPassengers(passengers),
             Reason     = remark
         };
         var flightChangeLimit = SystemDictionaryService.Query(SystemDictionaryType.FlightChangeLimit);
         var limit             = LimitItem.Parse(flightChangeLimit);
         foreach (var item in getPostponeVoyages(voyages))
         {
             bool isTodayFlight = DateTime.Today == item.NewFlightDate.Date;
             foreach (LimitItem l in limit)
             {
                 if (carrair.ToUpper() != l.Carrair.ToUpper())
                 {
                     continue;
                 }
                 if (item.NewFlightDate >= l.LimitFrom && item.NewFlightDate <= l.LimitTo && (!isTodayFlight || !l.ToTodayEnable))
                 {
                     var aline = FoundationService.Airlines.FirstOrDefault(p => p.Code.Value == l.Carrair);
                     throw new CustomException("由于[" + aline.ShortName + "]原因,该客票已被航空公司限制改期,无法改期,请让乘机人自行致电航空公司或到航空公司直营柜台办理改期");
                 }
             }
             applyformView.AddItem(item);
         }
         var applyform = OrderProcessService.Apply(orderId, applyformView, CurrentUser, BasePage.OwnerOEMId) as PostponeApplyform;
         releaseLock(orderId);
         return(OK);
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            RegisterOEMSkins("form.css");
            RegisterOEMSkins("page.css");
            if (!IsPostBack)
            {
                SettingPolicy setting = CompanyService.GetPolicySetting(this.CurrentCompany.CompanyId);

                var company = CompanyService.GetCompanySettingsInfo(CurrentCompany.CompanyId);
                if (company != null && company.Parameter.CanHaveSubordinate)
                {
                    neibuTh.Visible      = true;
                    neibufanyong.Visible = true;
                }
                else
                {
                    neibuTh.Visible      = false;
                    neibufanyong.Visible = false;
                }
                cutomeTh.Visible      = company != null && company.WorkingSetting != null && company.WorkingSetting.IsImpower;
                ddlCustomCode.Visible = company != null && company.WorkingSetting != null && company.WorkingSetting.IsImpower;

                if (setting == null)
                {
                    RegisterScript("alert('还未有任何政策设置信息,不能访问本页面!');window.location.href='/Index.aspx';", true);
                    return;
                }
                if (setting.Airlines == "")
                {
                    RegisterScript("alert('还没有设置航空公司,请先设置航空公司!');window.location.href='/Index.aspx';", true);
                    return;
                }

                bool allowBrotherPurchases = false;
                if (company != null)
                {
                    allowBrotherPurchases = company.Parameter.AllowBrotherPurchase;
                }

                dropOffice.DataSource     = CompanyService.QueryOfficeNumbers(this.CurrentCompany.CompanyId);
                dropOffice.DataTextField  = "Number";
                dropOffice.DataValueField = "Impower";
                dropOffice.DataBind();

                ddlCustomCode.DataSource     = CompanyService.GetCustomNumberByEmployee(CurrentUser.Id);
                ddlCustomCode.DataTextField  = "Number";
                ddlCustomCode.DataValueField = "Number";
                ddlCustomCode.DataBind();

                tongTh.Visible = allowBrotherPurchases;
                tong.Visible   = allowBrotherPurchases;
                var queryList = FoundationService.Airports;
                this.txtDepartureAirports.InitData(true, queryList.Where(item => setting.Departure.Split('/').Contains(item.Code.Value)));
                //this.txtArrivalAirports.InitData(true, queryList.Where(item => setting.Departure.Split('/').Contains(item.Code.Value)));
                //this.txtZhongzhuanAirports.InitData(true, queryList.Where(item => setting.Departure.Split('/').Contains(item.Code.Value)));
                this.txtShifaAirports.InitData(queryList.Where(item => setting.Departure.Split('/').Contains(item.Code.Value)));


                if (Request.QueryString["Id"] != null && Request.QueryString["Type"] != null)
                {
                    BargainPolicy bargain = PolicyManageService.GetBargainPolicy(Guid.Parse(Request.QueryString["Id"]));
                    if (bargain.VoyageType == VoyageType.OneWay)
                    {
                        selEndorseRegulation.DataSource     = SystemDictionaryService.Query(SystemDictionaryType.BargainOneWayEndorseRegulation);
                        selEndorseRegulation.DataTextField  = "Name";
                        selEndorseRegulation.DataValueField = "Name";
                        selEndorseRegulation.DataBind();

                        selInvalidRegulation.DataSource     = SystemDictionaryService.Query(SystemDictionaryType.BargainOneWayInvalidRegulation);
                        selInvalidRegulation.DataTextField  = "Name";
                        selInvalidRegulation.DataValueField = "Name";
                        selInvalidRegulation.DataBind();

                        selRefundRegulation.DataSource     = SystemDictionaryService.Query(SystemDictionaryType.BargainOneWayRefundRegulation);
                        selRefundRegulation.DataTextField  = "Name";
                        selRefundRegulation.DataValueField = "Name";
                        selRefundRegulation.DataBind();

                        selChangeRegulation.DataSource     = SystemDictionaryService.Query(SystemDictionaryType.BargainOneWayChangeRegulation);
                        selChangeRegulation.DataTextField  = "Name";
                        selChangeRegulation.DataValueField = "Name";
                        selChangeRegulation.DataBind();
                    }
                    else if (bargain.VoyageType == VoyageType.RoundTrip)
                    {
                        selEndorseRegulation.DataSource     = SystemDictionaryService.Query(SystemDictionaryType.BargainRoundTripEndorseRegulation);
                        selEndorseRegulation.DataTextField  = "Name";
                        selEndorseRegulation.DataValueField = "Name";
                        selEndorseRegulation.DataBind();

                        selInvalidRegulation.DataSource     = SystemDictionaryService.Query(SystemDictionaryType.BargainRoundTripInvalidRegulation);
                        selInvalidRegulation.DataTextField  = "Name";
                        selInvalidRegulation.DataValueField = "Name";
                        selInvalidRegulation.DataBind();

                        selRefundRegulation.DataSource     = SystemDictionaryService.Query(SystemDictionaryType.BargainRoundTripRefundRegulation);
                        selRefundRegulation.DataTextField  = "Name";
                        selRefundRegulation.DataValueField = "Name";
                        selRefundRegulation.DataBind();

                        selChangeRegulation.DataSource     = SystemDictionaryService.Query(SystemDictionaryType.BargainRoundTripChangeRegulation);
                        selChangeRegulation.DataTextField  = "Name";
                        selChangeRegulation.DataValueField = "Name";
                        selChangeRegulation.DataBind();
                    }
                    else if (bargain.VoyageType == VoyageType.TransitWay)
                    {
                        selEndorseRegulation.DataSource     = SystemDictionaryService.Query(SystemDictionaryType.BargainTransitWayEndorseRegulation);
                        selEndorseRegulation.DataTextField  = "Name";
                        selEndorseRegulation.DataValueField = "Name";
                        selEndorseRegulation.DataBind();

                        selInvalidRegulation.DataSource     = SystemDictionaryService.Query(SystemDictionaryType.BargainTransitWayInvalidRegulation);
                        selInvalidRegulation.DataTextField  = "Name";
                        selInvalidRegulation.DataValueField = "Name";
                        selInvalidRegulation.DataBind();

                        selRefundRegulation.DataSource     = SystemDictionaryService.Query(SystemDictionaryType.BargainTransitWayRefundRegulation);
                        selRefundRegulation.DataTextField  = "Name";
                        selRefundRegulation.DataValueField = "Name";
                        selRefundRegulation.DataBind();

                        selChangeRegulation.DataSource     = SystemDictionaryService.Query(SystemDictionaryType.BargainTransitWayChangeRegulation);
                        selChangeRegulation.DataTextField  = "Name";
                        selChangeRegulation.DataValueField = "Name";
                        selChangeRegulation.DataBind();
                    }



                    if (Request.QueryString["Type"].Trim() == "Update")
                    {
                        tip.InnerText      = "修改特价政策";
                        chkAuto.Visible    = false;
                        btnCopy.Visible    = false;
                        btnModify.Visible  = true;
                        lblAirline.Visible = true;
                        ddlAirline.Visible = false;
                    }
                    if (Request.QueryString["Type"].Trim() == "Copy")
                    {
                        tip.InnerText      = "复制特价政策";
                        lblAirline.Visible = false;
                        ddlAirline.Visible = true;
                        chkAuto.Visible    = true;
                        btnCopy.Visible    = true;
                        btnModify.Visible  = false;
                        string[] strIds = setting.Airlines.Split('/');
                        ddlAirline.DataSource = from item in FoundationService.Airlines
                                                where item.Valid && strIds.Contains(item.Code.Value)
                                                select new
                        {
                            Code = item.Code,
                            Name = item.Code + "-" + item.ShortName
                        };
                        ddlAirline.DataTextField  = "Name";
                        ddlAirline.DataValueField = "Code";
                        ddlAirline.DataBind();
                    }
                    //ddlBunks.DataSource = QueryBunks(Bargain.Airline, Bargain.DepartureDateStart, Bargain.DepartureDateEnd);
                    //ddlBunks.DataBind();
                    InitDataValue(bargain);
                }
            }
        }
Example #12
0
        /// <summary>
        /// 列表绑定
        /// </summary>
        private void DataBindArea()
        {
            //舱位类型
            System.Reflection.FieldInfo[] classType = typeof(BunkType).GetFields();
            foreach (var item in classType)
            {
                if (!item.IsSpecialName)                                    //反射出第一个Field为特殊Field
                {
                    BunkType obj   = (BunkType)item.GetRawConstantValue();  //对应的文章
                    string   text  = obj.GetDescription();
                    string   value = item.GetRawConstantValue().ToString(); //对应的值
                    radiolist.Items.Add(new ListItem(text, value));
                }
            }
            this.radiolist.Items[0].Selected = true;
            //航空公司
            foreach (var item in FoundationService.Airlines)
            {
                this.ddlAirline.Items.Add(new ListItem(item.Code.Value + "-" + item.ShortName, item.Code.Value));
            }
            this.ddlAirline.Items.Insert(0, new ListItem("-请选择-", "0"));
            //到达机场 出发机场

            foreach (var item in FoundationService.Airports)
            {
                string name = item.Code.Value + "-" + item.ShortName;
                this.ddlDepartCity.Items.Add(new ListItem(name, item.Code.Value));
                this.ddlArriveCity.Items.Add(new ListItem(name, item.Code.Value));
            }
            this.ddlDepartCity.Items.Insert(0, new ListItem("-所有-", "0"));
            this.ddlArriveCity.Items.Insert(0, new ListItem("-所有-", "0"));

            //头等/公务舱描述
            this.ddltdType.Items.Clear();
            this.ddltdType.DataSource     = SystemDictionaryService.Query(SystemDictionaryType.FirstOrBusinessBunkDescription);
            this.ddltdType.DataTextField  = "Name";
            this.ddltdType.DataValueField = "Id";
            this.ddltdType.DataBind();
            this.ddltdType.Items.Insert(0, new ListItem("-请选择-", "0"));

            //特价舱描述
            this.ddlTJType.Items.Clear();
            this.ddlTJType.DataSource     = SystemDictionaryService.Query(SystemDictionaryType.PromotionBunkDescription);
            this.ddlTJType.DataTextField  = "Name";
            this.ddlTJType.DataValueField = "Id";
            this.ddlTJType.DataBind();
            this.ddlTJType.Items.Insert(0, new ListItem("-请选择-", "0"));

            //免票描述
            dropMpType.Items.Clear();
            dropMpType.DataSource     = SystemDictionaryService.Query(SystemDictionaryType.FreeDescription);
            dropMpType.DataTextField  = "Name";
            dropMpType.DataValueField = "Id";
            dropMpType.DataBind();
            dropMpType.Items.Insert(0, new ListItem("-请选择-", "0"));
            Service.Foundation.Domain.Bunk bunk = string.IsNullOrEmpty(Request.QueryString["Id"]) ? null : FoundationService.QueryBunkNew(new Guid(Request.QueryString["Id"]));
            //适用行程
            var voyageTypes = (Enum.GetValues(typeof(VoyageTypeValue)) as VoyageTypeValue[]).Select(item => new KeyValuePair <int, string>((int)item, item.GetDescription()));

            foreach (var item in voyageTypes)
            {
                var listIetm = new ListItem();
                if (bunk != null && (bunk.VoyageType & (VoyageTypeValue)item.Key) == (VoyageTypeValue)item.Key)
                {
                    listIetm.Selected = true;
                }
                listIetm.Value = item.Key.ToString();
                listIetm.Text  = item.Value;
                chklVoyageType.Items.Add(listIetm);
            }
            //旅行类型
            var travelTypes = (Enum.GetValues(typeof(TravelTypeValue)) as TravelTypeValue[]).Select(item => new KeyValuePair <int, string>((int)item, item.GetDescription()));

            foreach (var item in travelTypes)
            {
                var listItem = new ListItem();
                if (bunk != null && (bunk.TravelType & (TravelTypeValue)item.Key) == (TravelTypeValue)item.Key)
                {
                    listItem.Selected = true;
                }
                listItem.Value = item.Key.ToString();
                listItem.Text  = item.Value;
                chklTravelType.Items.Add(listItem);
            }
            //旅客类型
            var passengerTypes = (Enum.GetValues(typeof(PassengerTypeValue)) as PassengerTypeValue[]).Select(item => new KeyValuePair <int, string>((int)item, item.GetDescription()));

            foreach (var item in passengerTypes)
            {
                var listItem = new ListItem();
                if (bunk != null && (bunk.PassengerType & (PassengerTypeValue)item.Key) == (PassengerTypeValue)item.Key)
                {
                    listItem.Selected = true;
                }
                listItem.Text  = item.Value;
                listItem.Value = item.Key.ToString();
                chklPassengerType.Items.Add(listItem);
            }
        }
Example #13
0
 /// <summary>
 /// 查询推退改签规定
 /// </summary>
 /// <param name="type"></param>
 /// <returns></returns>
 public object QueryRegulations(SystemDictionaryType type)
 {
     return(SystemDictionaryService.Query(type));
 }
Example #14
0
        private void GetIdentificationOrder()
        {
            IEnumerable <ChinaPay.B3B.Service.SystemManagement.Domain.SystemDictionaryItem> identificationOrder = SystemDictionaryService.Query(Service.SystemManagement.Domain.SystemDictionaryType.IdentificationOrder);

            dropIdentificationOrder.DataSource     = identificationOrder;
            dropIdentificationOrder.DataValueField = dropIdentificationOrder.DataTextField = "Name";
            dropIdentificationOrder.DataBind();
            dropIdentificationOrder.Items.Insert(0, new ListItem("-请选择-", ""));
        }
Example #15
0
        private decimal ApplyPostponeOrder(ChinaPay.B3B.Service.Order.Domain.Order order, string passengers, string reason, string voyages)
        {
            string         pid      = "";
            List <PNRPair> _pnrCode = new List <PNRPair>();

            foreach (var item in passengers.Split('^'))
            {
                foreach (var o in order.PNRInfos)
                {
                    var j = o.Passengers.FirstOrDefault(i => i.Name == item);
                    if (j != null)
                    {
                        if (pid != "")
                        {
                            pid += "," + j.Id.ToString();
                        }
                        else
                        {
                            pid += j.Id.ToString();
                        }
                        _pnrCode.Add(o.Code);
                        if (!_pnrCode.Contains(o.Code))
                        {
                            InterfaceInvokeException.ThrowCustomMsgException("当前订单中存在不同的编码");
                        }
                        break;
                    }
                }
            }
            if (pid == "")
            {
                InterfaceInvokeException.ThrowCustomMsgException("当前订单中没有找到对应的乘机人信息");
            }
            if (!_pnrCode.Any())
            {
                InterfaceInvokeException.ThrowCustomMsgException("当前订单中没有找到对应的编码信息");
            }
            var ids           = ApplyOrder.getPassengers(pid);
            var applyformView = new PostponeApplyformView()
            {
                PNR        = _pnrCode.FirstOrDefault(),
                Passengers = ids,
                Reason     = reason
            };
            var flightChangeLimit = SystemDictionaryService.Query(SystemDictionaryType.FlightChangeLimit);
            var limit             = LimitItem.Parse(flightChangeLimit);



            foreach (var item in getPostponeVoyages(voyages, order))
            {
                bool isTodayFlight = DateTime.Today == item.NewFlightDate.Date;
                foreach (LimitItem l in limit)
                {
                    if (order.PNRInfos.First().Flights.First().Carrier.Code != l.Carrair.ToUpper())
                    {
                        continue;
                    }
                    if (item.NewFlightDate >= l.LimitFrom && item.NewFlightDate <= l.LimitTo && (!isTodayFlight || !l.ToTodayEnable))
                    {
                        var aline = FoundationService.Airlines.FirstOrDefault(p => p.Code.Value == l.Carrair);
                        InterfaceInvokeException.ThrowCustomMsgException("由于[" + aline.ShortName + "]原因,该客票已被航空公司限制改期,无法改期,请让乘机人自行致电航空公司或到航空公司直营柜台办理改期");
                    }
                }
                applyformView.AddItem(item);
            }
            string lockErrorMsg = "";

            Lock(order.Id, Service.Locker.LockRole.Purchaser, "申请退改签", out lockErrorMsg);
            if (!string.IsNullOrEmpty(lockErrorMsg))
            {
                InterfaceInvokeException.ThrowCustomMsgException(lockErrorMsg);
            }
            var apply = Service.OrderProcessService.Apply(order.Id, applyformView, Employee, Guid.Empty);

            releaseLock(order.Id);
            return(apply.Id);
        }
Example #16
0
 /// <summary>
 /// 获取字典表子项
 /// </summary>
 /// <param name="sdType"> </param>
 /// <returns></returns>
 public object GetDictionaryItems(SystemDictionaryType sdType)
 {
     return(SystemDictionaryService.Query(sdType));
 }