Ejemplo n.º 1
0
 public IHttpActionResult AirPortList(int countryId)
 {
     try
     {
         var listAirlines = new BreakBulkRepository().GetAirlines(countryId);
         return(Ok(listAirlines));
     }
     catch (Exception ex)
     {
         return(BadRequest());
     }
 }
        public HttpResponseMessage BookingInitials(int userId)
        {
            //Step 1: Get Country list
            List <FrayteCountryCode> lstCountry = new List <FrayteCountryCode>();

            lstCountry = new CountryRepository().lstCountry();

            //Step 2: Get Shipment Hanler Methods
            var lstShipmentHandlerMethods = new MasterDataRepository().GetShipmentHandlerMethod();

            //Step 3: Get Currency
            var lstCurrencyTypes = new MasterDataRepository().GetCurrencyType();

            //Step4: Get Customer Detail
            var customerDetail = new TradelaneBookingRepository().GetCustomerDetail(userId);
            //Step4.1: Get Customer Detail
            var customerAddress = new TradelaneBookingRepository().UserDefaultAddresses(userId);

            // Step 5 : Get Country PhoneCode
            List <FrayteCountryPhoneCode> lstCountryPhones = new List <FrayteCountryPhoneCode>();

            lstCountryPhones = new CountryRepository().GetCountryPhoneCodeList();

            // step:6 get all operation zones
            var OperaionZones = new OperationZoneRepository().GetOperationZone();

            // step:7 get all Airlines
            var listAirlines = new MasterDataRepository().GetAirlines();

            var timeZones = new TimeZoneRepository().GetShipmentTimeZones();

            var lstincoterm = new BreakBulkRepository().GetIncoterms();

            return(this.Request.CreateResponse(
                       HttpStatusCode.OK,
                       new
            {
                Countries = lstCountry,
                CurrencyTypes = lstCurrencyTypes,
                ShipmentMethods = lstShipmentHandlerMethods,
                CustomerDetail = customerDetail,
                CustomerAddress = customerAddress,
                CountryPhoneCodes = lstCountryPhones,
                AirLines = listAirlines,
                TimeZones = timeZones,
                OperaionZones = OperaionZones,
                Incoterm = lstincoterm
            }));
        }
Ejemplo n.º 3
0
        public HttpResponseMessage GetInitials(int userId)
        {
            //Get Country list
            List <FrayteCountryCode> lstCountry = new List <FrayteCountryCode>();

            lstCountry = new CountryRepository().lstCountry();

            //Get Shipment Hanler Methods
            var lstShipmentHandlerMethods = new BreakBulkRepository().GetShipmentHandlerMethod();

            //Get Country PhoneCode
            List <FrayteCountryPhoneCode> lstCountryPhones = new List <FrayteCountryPhoneCode>();

            lstCountryPhones = new CountryRepository().GetCountryPhoneCodeList();

            //Get all Incoterm
            var lstIncoterm = new BreakBulkRepository().GetIncoterms();

            //Get all PaymentParty
            List <TradelaneCustomer> lstCustomer = new List <TradelaneCustomer>();

            lstCustomer = new BreakBulkRepository().GetCustomers(userId);

            //Get all Factory
            var lstFactory = new BreakBulkRepository().GetFactories();

            //Get all Custom field
            var lstCustomField = new BreakBulkRepository().GetCustomField(userId);

            return(this.Request.CreateResponse(
                       HttpStatusCode.OK,
                       new
            {
                Countries = lstCountry,
                ShipmentMethods = lstShipmentHandlerMethods,
                CountryPhoneCodes = lstCountryPhones,
                Incoterm = lstIncoterm,
                Factories = lstFactory,
                PaymentParty = lstCustomer,
                CustomFields = lstCustomField
            }));
        }
Ejemplo n.º 4
0
        public List <HubService> BreakBulkHubServices(BreakBulkServiceModel serviceObj)
        {
            List <HubService> services = new BreakBulkRepository().GetBreakBulkServices(serviceObj);

            return(services);
        }
Ejemplo n.º 5
0
        public BreakBulkShipmentDetail SavePurchaseOrderData(BreakBulkShipmentDetail shipment)
        {
            BreakBulkShipmentDetail model = new BreakBulkRepository().SavePurchaseOrderData(shipment);

            return(model);
        }
Ejemplo n.º 6
0
        public IHttpActionResult GenerateConsignmentNumber(int userId)
        {
            var consignmentNumber = new BreakBulkRepository().GenerateConsignmentNumber(userId);

            return(Ok(consignmentNumber));
        }