Пример #1
0
        private List <SelectListItem> GetManifestTypesDmMAWB(string DmMAWB)
        {
            DomesticFreightBL aeBL             = new DomesticFreightBL();
            AuthenticationBL  bl               = new AuthenticationBL();
            ELTUser           authBLGetELTUser = null;

            authBLGetELTUser = bl.GetELTUser(User.Identity.Name);

            int ELT_ACCOUNT_NUMBER          = Convert.ToInt32(authBLGetELTUser.elt_account_number);
            List <ManifestAgentInfo> agents = aeBL.GetAgentsInDmMAWB(ELT_ACCOUNT_NUMBER, DmMAWB);
            List <SelectListItem>    items  = new List <SelectListItem>();

            items.Add(new SelectListItem {
                Text = "Consolidated Manifest", Value = "All"
            });
            foreach (var agent in agents)
            {
                string text  = agent.agent_name;
                string value = String.Format("mawb={0}&Agent={1}&MasterAgentNo=0", DmMAWB, agent.agent_no);
                items.Add(new SelectListItem {
                    Text = text, Value = HttpUtility.HtmlEncode(value)
                });
            }

            return(items);
        }
Пример #2
0
 public ActionResult _NotificationEmailItems(EmailNotificationFormModel model)
 {
     if (string.IsNullOrEmpty(model.BillNumber))
     {
         return PartialView(model);
     }
     ViewBag.Message = string.Empty;
     if (model.ShouldSend)
     {
         if (model.EmailType == EmailType.AirExport_Agent_PreAlert)
         {
             SendAgentPreAlertEmails(model);
         }
         if (model.EmailType == EmailType.AirExport_Shipping_Notice)
         {
             SendShippingNoticeEmails(model);
         }
     }
     if (Session["mailerSelectedBillType"] != null)
     {
         int billType = Convert.ToInt32(Session["mailerSelectedBillType"]);
        
         if (model.EmailType == ELT.CDT.EmailType.AirExport_Agent_PreAlert)
         {
             AirExportBL BL = new AirExportBL();
             model.Items = BL.GetAirExportAgentPreAlertEmailItems(int.Parse(GetCurrentELTUser().elt_account_number), model.BillNumber, (BillType)billType);
         }
         if (model.EmailType == ELT.CDT.EmailType.AirExport_Shipping_Notice)
         {
             AirExportBL BL = new AirExportBL();
             model.Items = BL.GetAirExportShippingNoticeEmailItems(int.Parse(GetCurrentELTUser().elt_account_number), model.BillNumber, (BillType)billType);
         }
         if (model.EmailType == ELT.CDT.EmailType.OceanExport_Agent_PreAlert)
         {
             OceanExportBL BL = new OceanExportBL();
             model.Items = BL.GetOceanExportAgentPreAlertEmailItems(int.Parse(GetCurrentELTUser().elt_account_number), model.BillNumber, (BillType)billType);
         }
         if (model.EmailType == ELT.CDT.EmailType.OceanExport_Shipping_Notice)
         {
             OceanExportBL BL = new OceanExportBL();
             model.Items = BL.GetOceanExportShippingNoticeEmailItems(int.Parse(GetCurrentELTUser().elt_account_number), model.BillNumber, (BillType)billType);
         }
         if (model.EmailType == ELT.CDT.EmailType.AirImport_E_Arrival_Notice)
         {
             AirImportBL BL = new AirImportBL();
             model.Items.AddRange(BL.GetAirImportEArrivalNoticeEmailItems(int.Parse(GetCurrentELTUser().elt_account_number), model.BillNumber, (BillType)billType).ToArray());
         }
         if (model.EmailType == ELT.CDT.EmailType.AirImport_Proof_Of_Delivery)
         {
             AirImportBL BL = new AirImportBL();
             model.Items.AddRange(BL.GetAirImportProofOfDeliveryEmailItems(int.Parse(GetCurrentELTUser().elt_account_number), model.BillNumber, (BillType)billType).ToArray());
         }
         if (model.EmailType == ELT.CDT.EmailType.OceanImport_E_Arrival_Notice)
         {
             OceanImportBL BL = new OceanImportBL();
             model.Items.AddRange(BL.GetOceanImportEArrivalNoticeEmailItems(int.Parse(GetCurrentELTUser().elt_account_number), model.BillNumber, (BillType)billType).ToArray());
         }
         if (model.EmailType == ELT.CDT.EmailType.OceanImport_Proof_Of_Delivery)
         {
             OceanImportBL BL = new OceanImportBL();
             model.Items.AddRange(BL.GetOceanImportProofOfDeliveryEmailItems(int.Parse(GetCurrentELTUser().elt_account_number), model.BillNumber, (BillType)billType).ToArray());
         }
         if (model.EmailType == ELT.CDT.EmailType.DomesticFreight_Agent_PreAlert)
         {
             DomesticFreightBL BL = new DomesticFreightBL();
             model.Items = BL.GetDomesticFreightAgentPreAlertEmailItems(int.Parse(GetCurrentELTUser().elt_account_number), model.BillNumber, (BillType)billType);
         }
         if (model.EmailType == ELT.CDT.EmailType.DomesticFreight_Shipping_Notice)
         {
             DomesticFreightBL BL = new DomesticFreightBL();
             model.Items = BL.GetDomesticFreightShippingNoticeEmailItems(int.Parse(GetCurrentELTUser().elt_account_number), model.BillNumber, (BillType)billType);
         }
     }
     return PartialView(model);
 }