public string createOrder(LogistikaOrderHeader orderHeader)
        {
            // orderHeader.
            string exceptionMessages = string.Empty;

            try
            {
                if (string.IsNullOrEmpty(orderHeader.PickupAddress[0].AddressLine1) || string.IsNullOrEmpty(orderHeader.DropoffAddress[0].AddressLine1))
                {
                    exceptionMessages = "AddressLine1 is missing";
                    //throw new Exception("AddressLine1 is missing");
                }
                if (string.IsNullOrEmpty(orderHeader.PickupAddress[0].City) || string.IsNullOrEmpty(orderHeader.DropoffAddress[0].City))
                {
                    exceptionMessages = string.IsNullOrEmpty(exceptionMessages) ? "City is missing" : exceptionMessages + ", " + "City is missing";
                    //throw new Exception("City is missing");
                }
                if (string.IsNullOrEmpty(orderHeader.PickupAddress[0].StateCode) || string.IsNullOrEmpty(orderHeader.DropoffAddress[0].StateCode))
                {
                    exceptionMessages = string.IsNullOrEmpty(exceptionMessages) ? "StateCode is missing" : exceptionMessages + ", " + "StateCode is missing";
                    //throw new Exception("StateCode is missing");
                }
                if (string.IsNullOrEmpty(orderHeader.DropoffAddress[0].PhoneNumber))
                {
                    exceptionMessages = string.IsNullOrEmpty(exceptionMessages) ? "DropOff PhoneNumber is missing" : exceptionMessages + ", " + "DropOff PhoneNumber is missing";
                    //throw new Exception("CountryCode is missing");
                }

                if (string.IsNullOrEmpty(orderHeader.PickupAddress[0].CountryCode) || string.IsNullOrEmpty(orderHeader.DropoffAddress[0].CountryCode))
                {
                    exceptionMessages = string.IsNullOrEmpty(exceptionMessages) ? "CountryCode is missing" : exceptionMessages + ", " + "CountryCode is missing";
                    //throw new Exception("CountryCode is missing");
                }

                if (string.IsNullOrEmpty(orderHeader.PickUpDate.ToString()) || string.IsNullOrEmpty(orderHeader.DropoffAddress[0].DropOffDate.ToString()))
                {
                    exceptionMessages = string.IsNullOrEmpty(exceptionMessages) ? "Pickup or DropOff Date is missing" : exceptionMessages + ", " + "Pickup or DropOff Date is missing";
                    //throw new Exception("CountryCode is missing");
                }

                if (string.IsNullOrEmpty(orderHeader.FreightType))
                {
                    exceptionMessages = string.IsNullOrEmpty(exceptionMessages) ? "FreightType is missing" : exceptionMessages + ", " + "FreightType is missing";
                    //throw new Exception("FreightType is missing");
                }

                if (string.IsNullOrEmpty(orderHeader.OrderType))
                {
                    exceptionMessages = string.IsNullOrEmpty(exceptionMessages) ? "OrderType is missing" : exceptionMessages + ", " + "OrderType is missing";
                    //throw new Exception("OrderType is missing");
                }

                if (string.IsNullOrEmpty(orderHeader.OrderByName))
                {
                    exceptionMessages = string.IsNullOrEmpty(exceptionMessages) ? "OrderByName is missing" : exceptionMessages + ", " + "OrderByName is missing";
                    //throw new Exception("OrderType is missing");
                }

                if (string.IsNullOrEmpty(orderHeader.OrderByPhoneNumber))
                {
                    exceptionMessages = string.IsNullOrEmpty(exceptionMessages) ? "OrderByPhoneNumber is missing" : exceptionMessages + ", " + "OrderByPhoneNumber is missing";
                }

                if (string.IsNullOrEmpty(orderHeader.OrderByEmail))
                {
                    exceptionMessages = string.IsNullOrEmpty(exceptionMessages) ? "OrderByEmail is missing" : exceptionMessages + ", " + "OrderByEmail is missing";
                    //throw new Exception("OrderType is missing");
                }

                foreach (var v in orderHeader.LineItem)
                {
                    if (string.IsNullOrEmpty(v.Quantity.ToString()))
                    {
                        exceptionMessages = string.IsNullOrEmpty(exceptionMessages) ? "Quantity is missing" : exceptionMessages + ", " + "Quantity is missing";
                    }
                    if (string.IsNullOrEmpty(v.Weight.ToString()))
                    {
                        exceptionMessages = string.IsNullOrEmpty(exceptionMessages) ? "Weight is missing" : exceptionMessages + ", " + "Weight is missing";
                    }
                    if (string.IsNullOrEmpty(v.Item.ToString()))
                    {
                        exceptionMessages = string.IsNullOrEmpty(exceptionMessages) ? "Item is missing" : exceptionMessages + ", " + "Item is missing";
                    }
                }

                if (!string.IsNullOrEmpty(exceptionMessages))
                {
                    throw new Exception(exceptionMessages);
                }

                return(_orderDataAccess.createOrder(orderHeader));
            }
            catch (Exception ex)
            {
                string eFileName;
                string errorFileName;

                eFileName     = "OrderError_" + fileName + "_" + DateTime.Now.ToString("MMddyyyyHH");
                errorFileName = "OrderFile\\error\\" + eFileName + ".error.txt";
                string filePath = SiteConfigurationManager.GetAppSettingKey("TemplatePath") + errorFileName;

                LoggerDataAccess eloggerDataAccess = new LoggerDataAccess();

                if (!string.IsNullOrEmpty(fileName))
                {
                    if (string.IsNullOrEmpty(orderHeader.VendorOrderID))
                    {
                        orderHeader.VendorOrderID = "Empty";
                    }
                    fileName = fileName + SiteConfigurationManager.GetAppSettingKey("FileImportExtension");
                    var v = FileManager.FileErrorLog(filePath, ex.Message, orderHeader.VendorOrderID);
                    eloggerDataAccess.LogFileImport(fileName, "IMP_FL_FLD", null, null, errorFileName, ImportFileHistoryID);
                }
                return(fileName + ":- File import Failed.");
            }
        }