private void initData()
        {
            var productValues = Enum.GetValues(typeof(ProductType)) as ProductType[];

            foreach (ProductType item in productValues)
            {
                ddlProduct.Items.Add(new ListItem(item.GetDescription(), ((int)item).ToString()));
            }


            ddlCarrier.DataTextField  = "ShortName";
            ddlCarrier.DataValueField = "Code";
            ddlCarrier.DataSource     = from item in FoundationService.Airlines.Join(PolicySetService.QueryAirlines(CurrentCompany.CompanyId), p => p.Code.Value, p => p, (p, q) => p)
                                        select new
            {
                ShortName = item.Code + "-" + item.ShortName,
                Code      = item.Code
            };
            ddlCarrier.DataBind();

            ddlOfficeNumber.DataSource = CompanyService.QueryOfficeNumbers(CurrentCompany.CompanyId).Select(o => o.Number);
            ddlOfficeNumber.DataBind();

            var orderRole = this.CurrentCompany.CompanyType == Common.Enums.CompanyType.Supplier ? OrderRole.Supplier : OrderRole.Provider;

            this.ddlStatus.Items.Add(new ListItem("全部", string.Empty));
            this.ddlStatus.Items.Add(new ListItem(Service.Order.StatusService.GetOrderStatus(OrderStatus.Applied, orderRole), ((int)OrderStatus.Applied).ToString()));
            this.ddlStatus.Items.Add(new ListItem(Service.Order.StatusService.GetOrderStatus(OrderStatus.PaidForSupply, orderRole), ((int)OrderStatus.PaidForSupply).ToString()));
            this.ddlStatus.Items.Add(new ListItem(Service.Order.StatusService.GetOrderStatus(OrderStatus.PaidForETDZ, orderRole), ((int)OrderStatus.PaidForETDZ).ToString()));
        }
 private void QueryAirLines(CompanyType type, string flag)
 {
     //运营方政策管理挂起解挂
     if (type == CompanyType.Platform)
     {
         var list = PolicySetService.QueryAirlines(Guid.Parse(Request.QueryString["id"]));
         //得到公司下所有的航空公司
         chklist.DataSource = list;
         chklist.DataBind();
         hung.Visible     = false;
         msgTip.InnerHtml = "●灰色部份由出票方/产品方挂起";
         if (flag == "solution" && flag != null)
         {
             title.InnerHtml = "平台解挂政策:";
         }
         if (flag == "hang" && flag != null)
         {
             tip.Visible     = false;
             msg_box.Visible = false;
             title.InnerHtml = "平台挂起政策:";
         }
     }
     //用户政策管理挂起解挂
     else
     {
         var list = PolicySetService.QueryAirlines(this.CurrentCompany.CompanyId);
         //得到公司下所有的航空公司
         chklist.DataSource = list;
         chklist.DataBind();
         hung.Visible       = true;
         chkHung.DataSource = list;
         chkHung.DataBind();
         msgTip.InnerHtml = "●灰色部份由平台挂起";
     }
 }
Beispiel #3
0
 /// <summary>
 /// 获取可提供资源的航空公司
 /// </summary>
 private void BindAirline()
 {
     foreach (string item in PolicySetService.QueryAirlines(this.CurrentCompany.CompanyId))
     {
         ListItem lists = new ListItem(item.ToString());
         lists.Selected = true;
         this.chklAirline.Items.Add(lists);
     }
 }
        private void BindAirline(Guid id)
        {
            var policy = PolicySetService.QueryAirlines(id);

            foreach (string item in policy)
            {
                ListItem listItem = new ListItem(item, item);
                listItem.Selected = true;
                this.chklAirlines.Items.Add(listItem);
            }
            this.bindChildernAirline(policy, id);
        }
Beispiel #5
0
        private void BindAriline(Guid company)
        {
            var airlines = PolicySetService.QueryAirlines(company);

            foreach (Airline item in FoundationService.Airlines)
            {
                if (item.Valid)
                {
                    ListItem listItem = new ListItem(item.Code.Value);
                    listItem.Selected = airlines.Contains(item.Code.Value);
                    this.chklAirline.Items.Add(listItem);
                }
            }
        }
        private void BindAriline(Guid company)
        {
            var airlines    = PolicySetService.QueryAirlines(company);
            var allAirlines = FoundationService.Airlines;

            foreach (Airline item in allAirlines)
            {
                if (item.Valid && airlines.Contains(item.Code.Value))
                {
                    ListItem listItem = new ListItem(item.Code.Value + "-" + item.ShortName, item.Code.Value);
                    this.ddlAirlines.Items.Add(listItem);
                }
            }
            this.ddlAirlines.Items.Insert(0, new ListItem("全部", ""));
        }
Beispiel #7
0
        private void TransferToObj(DataTable dt)
        {
            errorPolicy = dt.Clone();
            errorPolicy.Columns.Add("错误信息");
            normalPolicys = new List <NormalPolicy>();
            error         = 0;
            success       = 0;
            var officeNumbers   = CompanyService.QueryOfficeNumbers(this.CurrentCompany.CompanyId).ToList();
            var workSetting     = CompanyService.GetWorkingSetting(this.CurrentCompany.CompanyId);
            var customerCodes   = CompanyService.GetCustomNumberByEmployee(this.CurrentUser.Id);
            var airlines        = PolicySetService.QueryAirlines(this.CurrentCompany.CompanyId);
            var companyParmeter = CompanyService.GetCompanyParameter(this.CurrentCompany.CompanyId);

            foreach (DataRow item in dt.Rows)
            {
                string errorInfo = BasePolicy.valiate(item, officeNumbers, workSetting, customerCodes, airlines, companyParmeter, GetAirport(this.CurrentCompany.CompanyId));
                if (string.IsNullOrWhiteSpace(errorInfo))
                {
                    success++;
                    NormalPolicy normalPolicy = BasePolicy.saveInfo(item, officeNumbers, workSetting, customerCodes, airlines, companyParmeter, GetAirport(this.CurrentCompany.CompanyId));
                    normalPolicys.Add(normalPolicy);
                }
                else
                {
                    error++;
                    DataRow dr = errorPolicy.NewRow();
                    for (var i = 0; i < dt.Columns.Count; i++)
                    {
                        dr[i] = item[i];
                    }

                    dr["错误信息"] = errorInfo;
                    errorPolicy.Rows.Add(dr);
                }
            }
        }
Beispiel #8
0
        private void initData()
        {
            var productValues = Enum.GetValues(typeof(ProductType)) as ProductType[];

            foreach (ProductType item in productValues)
            {
                ddlProduct.Items.Add(new ListItem(item.GetDescription(), ((int)item).ToString()));
            }


            ddlFlightCompany.DataTextField  = "ShortName";
            ddlFlightCompany.DataValueField = "Code";
            ddlFlightCompany.DataSource     = from item in FoundationService.Airlines.Join(PolicySetService.QueryAirlines(CurrentCompany.CompanyId), p => p.Code.Value, p => p, (p, q) => p)
                                              select new
            {
                ShortName = item.Code + "-" + item.ShortName,
                Code      = item.Code
            };
            ddlFlightCompany.DataBind();

            ddlOfficeNumber.DataSource = CompanyService.QueryOfficeNumbers(CurrentCompany.CompanyId).Select(o => o.Number);
            ddlOfficeNumber.DataBind();

            LoadCondition("WaitOrderList");
        }