예제 #1
0
        //訂單明細中下方的「訂購資料」
        public static List <OMDLModuleModel> GetOrderModule(JToken obj)
        {
            List <OMDLModuleModel> order_module = new List <OMDLModuleModel>();
            OMDLModuleModel        model        = new OMDLModuleModel();

            foreach (var item in obj)
            {
                if (item["module_type"].ToString() == "OMDL_CONTACT_DATA")
                {
                    OMDL_CONTACT_DATA conn = new OMDL_CONTACT_DATA();
                    contactAppInfo    app  = new contactAppInfo();

                    if (item["module_data"]["contactName"] != null)
                    {
                        string lastname  = (string)item["module_data"]["contactName"]["lastName"];
                        string firstname = (string)item["module_data"]["contactName"]["firstName"];

                        conn.contactName = string.Format("{0}{1}{2}", lastname, " ", firstname);
                    }
                    if (item["module_data"]["contactTel"] != null && (Boolean)item["module_data"]["contactTel"]["haveTel"] == true)
                    {
                        string telcode = (string)item["module_data"]["contactTel"]["telCountryCode"];
                        string tel     = (string)item["module_data"]["contactTel"]["telNumber"];

                        conn.contactTel = string.Format("{0}{1}{2}", "+", telcode, tel);
                    }
                    if (item["module_data"]["contactApp"] != null && (Boolean)item["module_data"]["contactApp"]["haveApp"] == true)
                    {
                        app.appName    = (string)item["module_data"]["contactApp"]["appName"];
                        app.appAccount = (string)item["module_data"]["contactApp"]["appAccount"];

                        conn.contactApp = app;
                    }

                    model.ORDER_CONTACT = conn;
                }
                if (item["module_type"].ToString() == "OMDL_SEND_DATA")
                {
                    OMDL_SEND_DATA     send = new OMDL_SEND_DATA();
                    receiveAddressInfo addr = new receiveAddressInfo();
                    sendToHotelInfo    htl  = new sendToHotelInfo();
                    shipInfoInfo       ship = new shipInfoInfo();

                    if (item["module_data"]["receiverName"] != null)
                    {
                        string firstName = (string)item["module_data"]["receiverName"]["firstName"];
                        string lastName  = (string)item["module_data"]["receiverName"]["lastName"];

                        send.receiverName = string.Format("{0}{1}{2}", lastName, " ", firstName);
                    }
                    if (item["module_data"]["receiverTel"] != null)
                    {
                        string telcode = (string)item["module_data"]["receiverTel"]["telCountryCode"];
                        string tel     = (string)item["module_data"]["receiverTel"]["telNumber"];

                        send.receiverTel = string.Format("{0}{1}{2}", "+", telcode, tel);
                    }
                    if (item["module_data"]["sendToCountry"] != null)
                    {
                        if (item["module_data"]["sendToCountry"]["countryName"] != null)
                        {
                            addr.countryName = (string)item["module_data"]["sendToCountry"]["countryName"];
                        }
                        if (item["module_data"]["sendToCountry"]["cityName"] != null)
                        {
                            addr.countryName = (string)item["module_data"]["sendToCountry"]["cityName"];
                        }
                        if (item["module_data"]["sendToCountry"]["zipCode"] != null)
                        {
                            addr.countryName = (string)item["module_data"]["sendToCountry"]["zipCode"];
                        }
                        if (item["module_data"]["sendToCountry"]["address"] != null)
                        {
                            addr.countryName = (string)item["module_data"]["sendToCountry"]["address"];
                        }

                        send.sendToCountry = addr;
                    }
                    if (item["module_data"]["sendToHotel"] != null)
                    {
                        if (item["module_data"]["sendToHotel"]["hotelName"] != null)
                        {
                            htl.hotelName = (string)item["module_data"]["sendToHotel"]["hotelName"];
                        }
                        if (item["module_data"]["sendToHotel"]["hotelAddress"] != null)
                        {
                            htl.hotelAddress = (string)item["module_data"]["sendToHotel"]["hotelAddress"];
                        }
                        if (item["module_data"]["sendToHotel"]["hotelTel"] != null)
                        {
                            htl.hotelTel = (string)item["module_data"]["sendToHotel"]["hotelTel"];
                        }
                        if (item["module_data"]["sendToHotel"]["buyerPassportEnglishName"] != null)
                        {
                            string lastname  = (string)item["module_data"]["sendToHotel"]["buyerPassportEnglishName"]["lastName"];
                            string firstname = (string)item["module_data"]["sendToHotel"]["buyerPassportEnglishName"]["firstName"];

                            htl.buyerPassportEnglishName = string.Format("{0}{1}{2}", lastname, " ", firstname);
                        }
                        if (item["module_data"]["sendToHotel"]["buyerLocalName"] != null)
                        {
                            string lastname  = (string)item["module_data"]["sendToHotel"]["buyerLocalName"]["lastName"];
                            string firstname = (string)item["module_data"]["sendToHotel"]["buyerLocalName"]["firstName"];

                            htl.buyerLocalName = string.Format("{0}{1}{2}", lastname, " ", firstname);
                        }
                        if (item["module_data"]["receiverTel"]["bookingOrderNo"] != null)
                        {
                            htl.bookingOrderNo = (string)item["module_data"]["receiverTel"]["bookingOrderNo"];
                        }
                        if (item["module_data"]["receiverTel"]["bookingWebsite"] != null)
                        {
                            htl.bookingWebsite = (string)item["module_data"]["receiverTel"]["bookingWebsite"];
                        }
                        if (item["module_data"]["receiverTel"]["checkInDate"] != null)
                        {
                            htl.checkInDate = (string)item["module_data"]["receiverTel"]["checkInDate"];
                        }
                        if (item["module_data"]["receiverTel"]["checkOutDate"] != null)
                        {
                            htl.checkOutDate = (string)item["module_data"]["receiverTel"]["checkOutDate"];
                        }

                        send.sendToHotel = htl;
                    }
                    if (item["module_data"]["shipInfo"] != null)
                    {
                        if (item["module_data"]["shipInfo"]["shipDate"] != null)
                        {
                            ship.shipDate = (string)item["module_data"]["shipInfo"]["shipDate"];
                        }
                        if (item["module_data"]["shipInfo"]["trackingNumber"] != null)
                        {
                            ship.trackingNumber = (string)item["module_data"]["shipInfo"]["trackingNumber"];
                        }

                        send.shipInfo = ship;
                    }

                    model.ORDER_SEND = send;
                }
                if (item["module_type"].ToString() == "OMDL_SHUTTLE")
                {
                    OMDL_SHUTTLE             shuttle = new OMDL_SHUTTLE();
                    designatedLocationInfo   local   = new designatedLocationInfo();
                    designatedByCustomerInfo cus     = new designatedByCustomerInfo();
                    charterRouteInfo         bus     = new charterRouteInfo();

                    if (item["module_data"]["shuttleDate"] != null)
                    {
                        shuttle.shuttleDate = (string)item["module_data"]["shuttleDate"];
                    }
                    if (item["module_data"]["designatedLocation"] != null)
                    {
                        if (item["module_data"]["designatedLocation"]["locationName"] != null)
                        {
                            local.locationName = (string)item["module_data"]["designatedLocation"]["locationName"];
                        }
                        if (item["module_data"]["designatedLocation"]["locationAddress"] != null)
                        {
                            local.locationAddress = (string)item["module_data"]["designatedLocation"]["locationAddress"];
                        }
                        if (item["module_data"]["designatedLocation"]["imageUrl"] != null)
                        {
                            local.imageUrl = (string)item["module_data"]["designatedLocation"]["imageUrl"];
                        }
                        if (item["module_data"]["designatedLocation"]["timeRangeStart"] != null)
                        {
                            local.timeRangeStart = (string)item["module_data"]["designatedLocation"]["timeRangeStart"];
                        }
                        if (item["module_data"]["designatedLocation"]["timeRangeEnd"] != null)
                        {
                            local.timeRangeEnd = (string)item["module_data"]["designatedLocation"]["timeRangeEnd"];
                        }

                        shuttle.designatedLocation = local;
                    }
                    if (item["module_data"]["designatedByCustomer"] != null)
                    {
                        pickUpInfo pick = new pickUpInfo();
                        if (item["module_data"]["designatedByCustomer"]["pickUp"] != null)
                        {
                            if (item["module_data"]["designatedByCustomer"]["pickUp"]["location"] != null)
                            {
                                pick.location = (string)item["module_data"]["designatedByCustomer"]["pickUp"]["location"];
                            }
                            if (item["module_data"]["designatedByCustomer"]["pickUp"]["time"] != null)
                            {
                                pick.time = (string)item["module_data"]["designatedByCustomer"]["pickUp"]["time"];
                            }
                            cus.pickUp = pick;
                        }
                        if (item["module_data"]["designatedByCustomer"]["dropOff"] != null)
                        {
                            cus.dropOff = (string)item["module_data"]["designatedByCustomer"]["dropOff"]["location"];
                        }

                        shuttle.designatedByCustomer = cus;
                    }
                    if (item["module_data"]["charterRoute"] != null)
                    {
                        if (item["module_data"]["charterRoute"]["isCustom"] != null)
                        {
                            bus.isCustom = (Boolean)item["module_data"]["charterRoute"]["isCustom"];
                        }
                        if (item["module_data"]["charterRoute"]["customRoutes"] != null)
                        {
                            bus.customRoutes = new [] { (string)item["module_data"]["charterRoute"]["customRoutes"] }
                        }
                        ;
                        if (item["module_data"]["charterRoute"]["routeLocal"] != null)
                        {
                            bus.routeLocal = (string)item["module_data"]["charterRoute"]["routeLocal"];
                        }

                        shuttle.charterRoute = bus;
                    }

                    model.ORDER_SHUTTLE = shuttle;
                }
                if (item["module_type"].ToString() == "OMDL_RENT_CAR")
                {
                    OMDL_RENT_CAR      car  = new OMDL_RENT_CAR();
                    pickUpInfo_forCar  pick = new pickUpInfo_forCar();
                    dropOffInfo_forCar drop = new dropOffInfo_forCar();

                    if (item["module_data"]["pickUp"] != null)
                    {
                        if (item["module_data"]["pickUp"]["officeID"] != null)
                        {
                            pick.officeID = (string)item["module_data"]["pickUp"]["officeID"];
                        }
                        if (item["module_data"]["pickUp"]["officeName"] != null)
                        {
                            pick.officeName = (string)item["module_data"]["pickUp"]["officeName"];
                        }
                        if (item["module_data"]["pickUp"]["addressEng"] != null)
                        {
                            pick.addressEng = (string)item["module_data"]["pickUp"]["addressEng"];
                        }
                        if (item["module_data"]["pickUp"]["addressLocal"] != null)
                        {
                            pick.addressLocal = (string)item["module_data"]["pickUp"]["addressLocal"];
                        }
                        if (item["module_data"]["pickUp"]["datetime"] != null)
                        {
                            pick.datetime = (string)item["module_data"]["pickUp"]["datetime"];
                        }

                        car.pickUp = pick;
                    }
                    if (item["module_data"]["dropOff"] != null)
                    {
                        if (item["module_data"]["dropOff"]["officeID"] != null)
                        {
                            drop.officeID = (string)item["module_data"]["pickUp"]["officeID"];
                        }
                        if (item["module_data"]["dropOff"]["officeName"] != null)
                        {
                            drop.officeName = (string)item["module_data"]["pickUp"]["officeName"];
                        }
                        if (item["module_data"]["dropOff"]["addressEng"] != null)
                        {
                            drop.addressEng = (string)item["module_data"]["pickUp"]["addressEng"];
                        }
                        if (item["module_data"]["dropOff"]["addressLocal"] != null)
                        {
                            drop.addressLocal = (string)item["module_data"]["pickUp"]["addressLocal"];
                        }
                        if (item["module_data"]["dropOff"]["datetime"] != null)
                        {
                            drop.datetime = (string)item["module_data"]["pickUp"]["datetime"];
                        }

                        car.dropOff = drop;
                    }

                    model.ORDER_RENTCAR = car;
                }
                if (item["module_type"].ToString() == "OMDL_PSGR_DATA")
                {
                    OMDL_PSGR_DATA    psgr     = new OMDL_PSGR_DATA();
                    qtyChildSeatInfo  chd_seat = new qtyChildSeatInfo();
                    qtyInfantSeatInfo inf_seat = new qtyInfantSeatInfo();

                    if (item["module_data"]["qtyAdult"] != null)
                    {
                        psgr.qtyAdult = (int?)item["moduleData"]["qtyAdult"];
                    }
                    if (item["module_data"]["qtyChild"] != null)
                    {
                        psgr.qtyChild = (int?)item["moduleData"]["qtyChild"];
                    }
                    if (item["module_data"]["qtyInfant"] != null)
                    {
                        psgr.qtyInfant = (int?)item["moduleData"]["qtyInfant"];
                    }
                    if (item["module_data"]["qtyCarryLuggage"] != null)
                    {
                        psgr.qtyCarryLuggage = (int?)item["moduleData"]["qtyCarryLuggage"];
                    }
                    if (item["module_data"]["qtyCheckedLuggage"] != null)
                    {
                        psgr.qtyCheckedLuggage = (int?)item["moduleData"]["qtyCheckedLuggage"];
                    }
                    if (item["module_data"]["qtyChildSeat"] != null)
                    {
                        if (item["module_data"]["qtyChildSeat"]["selfProvided"] != null)
                        {
                            chd_seat.selfProvided = (int?)item["moduleData"]["qtyChildSeat"]["selfProvided"];
                        }
                        if (item["module_data"]["qtyChildSeat"]["supplierProvided"] != null)
                        {
                            chd_seat.supplierProvided = (int?)item["moduleData"]["qtyChildSeat"]["supplierProvided"];
                        }
                        psgr.qtyChildSeat = chd_seat;
                    }
                    if (item["module_data"]["qtyInfantSeat"] != null)
                    {
                        if (item["module_data"]["qtyInfantSeat"]["selfProvided"] != null)
                        {
                            inf_seat.selfProvided = (int?)item["moduleData"]["qtyInfantSeat"]["selfProvided"];
                        }
                        if (item["module_data"]["qtyInfantSeat"]["supplierProvided"] != null)
                        {
                            inf_seat.supplierProvided = (int?)item["moduleData"]["qtyInfantSeat"]["supplierProvided"];
                        }
                        psgr.qtyInfantSeat = inf_seat;
                    }

                    model.ORDER_PSG = psgr;
                }
                if (item["module_type"].ToString() == "OMDL_FLIGHT_INFO")
                {
                    OMDL_FLIGHT_INFO fly = new OMDL_FLIGHT_INFO();
                    arrivalInfo      arr = new arrivalInfo();
                    departureInfo    dep = new departureInfo();

                    if (item["module_data"]["arrival"] != null)
                    {
                        if (item["module_data"]["arrival"]["flightType"] != null)
                        {
                            arr.flightType = (string)item["module_data"]["arrival"]["flightType"];
                        }
                        if (item["module_data"]["arrival"]["airport"] != null)
                        {
                            arr.airport = (string)item["module_data"]["arrival"]["airport"];
                        }
                        if (item["module_data"]["arrival"]["terminalNo"] != null)
                        {
                            arr.terminalNo = (string)item["module_data"]["arrival"]["terminalNo"];
                        }
                        if (item["module_data"]["arrival"]["airline"] != null)
                        {
                            arr.airline = (string)item["module_data"]["arrival"]["airline"];
                        }
                        if (item["module_data"]["arrival"]["flightNo"] != null)
                        {
                            arr.flightNo = (string)item["module_data"]["arrival"]["flightNo"];
                        }
                        if (item["module_data"]["arrival"]["arrivalDatetime"] != null)
                        {
                            string arr_date = "";
                            string arr_hour = "";
                            string arr_min  = "";

                            if (item["module_data"]["arrival"]["arrivalDatetime"]["date"] != null)
                            {
                                arr_date = (string)item["module_data"]["arrival"]["arrivalDatetime"]["date"];
                            }
                            if (item["module_data"]["arrival"]["arrivalDatetime"]["hour"] != null)
                            {
                                arr_hour = (string)item["module_data"]["arrival"]["arrivalDatetime"]["hour"];
                            }
                            if (item["module_data"]["arrival"]["arrivalDatetime"]["minute"] != null)
                            {
                                arr_min = (string)item["module_data"]["arrival"]["arrivalDatetime"]["minute"];
                            }

                            arr.arrivalDatetime = string.Format("{0}{1}{2}{3}{4}", arr_date, " ", arr_hour, ":", arr_min);
                        }
                        fly.arrival = arr;
                    }
                    if (item["module_data"]["departure"] != null)
                    {
                        if (item["module_data"]["departure"]["flightType"] != null)
                        {
                            dep.flightType = (string)item["module_data"]["arrival"]["flightType"];
                        }
                        if (item["module_data"]["departure"]["airport"] != null)
                        {
                            dep.airport = (string)item["module_data"]["arrival"]["airport"];
                        }
                        if (item["module_data"]["departure"]["terminalNo"] != null)
                        {
                            dep.terminalNo = (string)item["module_data"]["arrival"]["terminalNo"];
                        }
                        if (item["module_data"]["departure"]["airline"] != null)
                        {
                            dep.airline = (string)item["module_data"]["arrival"]["airline"];
                        }
                        if (item["module_data"]["departure"]["flightNo"] != null)
                        {
                            dep.flightNo = (string)item["module_data"]["arrival"]["flightNo"];
                        }
                        if (item["module_data"]["departure"]["departureDatetime"] != null)
                        {
                            string dep_date = "";
                            string dep_hour = "";
                            string dep_min  = "";

                            if (item["module_data"]["departure"]["departureDatetime"]["date"] != null)
                            {
                                dep_date = (string)item["module_data"]["departure"]["departureDatetime"]["date"];
                            }
                            if (item["module_data"]["departure"]["departureDatetime"]["hour"] != null)
                            {
                                dep_hour = (string)item["module_data"]["departure"]["departureDatetime"]["hour"];
                            }
                            if (item["module_data"]["departure"]["departureDatetime"]["minute"] != null)
                            {
                                dep_min = (string)item["module_data"]["departure"]["departureDatetime"]["minute"];
                            }

                            dep.departureDatetime = string.Format("{0}{1}{2}{3}{4}", dep_date, " ", dep_hour, ":", dep_min);
                        }
                        fly.departure = dep;
                    }

                    model.ORDER_FLY = fly;
                }
                if (item["module_type"].ToString() == "OMDL_OTHER_DATA")
                {
                    OMDL_OTHER_DATA other = new OMDL_OTHER_DATA();

                    if (item["module_data"]["mobileModelNumber"] != null)
                    {
                        other.mobileModelNumber = (string)item["module_data"]["mobileModelNumber"];
                    }
                    if (item["module_data"]["mobileIMEI"] != null)
                    {
                        other.mobileIMEI = (string)item["module_data"]["mobileIMEI"];
                    }
                    if (item["module_data"]["activationDate"] != null)
                    {
                        other.activationDate = (string)item["module_data"]["activationDate"];
                    }

                    if (item["module_data"]["exchangeLocationName"] != null)
                    {
                        other.exchangeLocationName = (string)item["module_data"]["exchangeLocationName"];
                    }
                    if (item["module_data"]["exchangeLocationAddress"] != null)
                    {
                        other.exchangeLocationAddress = (string)item["module_data"]["exchangeLocationAddress"];
                    }
                    if (item["module_data"]["exchangeLocationNote"] != null)
                    {
                        other.exchangeLocationNote = (string)item["module_data"]["exchangeLocationNote"];
                    }
                    if (item["module_data"]["exchangeLocationBusinessHours"] != null)
                    {
                        other.exchangeLocationBusinessHours = (string)item["module_data"]["exchangeLocationBusinessHours"];
                    }

                    model.ORDER_OTHERS = other;
                }

                order_module.Add(model);
            }

            return(order_module);
        }

        //用不到
        //public QueryParamsModel GetQueryParamModel(string filter, string sorting, int size, int current_page)
        //{
        //    var rec_count = GetAccountsCount(filter);
        //    var total_pages = (int)(rec_count / size) + ((rec_count % size != 0) ? 1 : 0);

        //    return new QueryParamsModel()
        //    {
        //        Filter = filter,
        //        Sorting = sorting,
        //        Paging = new Pagination()
        //        {
        //            current_page = current_page,
        //            total_pages = total_pages,
        //            page_size = size
        //        }
        //    };
        //}

        //// 取得共有多少筆訂單[分頁用]
        //public int GetAccountsCount(string filter)
        //{
        //    try
        //    {
        //        var _filter = GetFieldFiltering(filter);
        //        //var order_list= OrderProxy.GetOrderList(_filter);

        //        return 0;//order_list.Count;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}

        //#region Fields Mapping

        //private string GetFieldFiltering(string filter)
        //{
        //    var jObjFilter = string.IsNullOrEmpty(filter) ? new JObject() : JObject.Parse(filter);
        //    var _filter = "";

        //    // Full Name
        //    if (!string.IsNullOrEmpty((string)jObjFilter["name"]))
        //        _filter += $" AND LOWER(name_first || name_last) LIKE '%{jObjFilter["name"]}%' ";
        //    // Company Name
        //    if (!string.IsNullOrEmpty((string)jObjFilter["comp_name"]))
        //        _filter += $" AND LOWER(comp_name) LIKE '%{jObjFilter["comp_name"]}%' ";
        //    // Email
        //    if (!string.IsNullOrEmpty((string)jObjFilter["email"]))
        //        _filter += $" AND LOWER(email) LIKE '%{jObjFilter["email"]}%' ";
        //    // enable
        //    if (!string.IsNullOrEmpty((string)jObjFilter["status"]))
        //        _filter += $" AND enable = '{jObjFilter["status"]}' ";

        //    return _filter;
        //}

        //private string GetFieldSorting(string sorting)
        //{
        //    var _sorting = "";

        //    switch (sorting)
        //    {
        //        case "name": _sorting = "name"; break;
        //        case "email": _sorting = "email"; break;
        //        case "comp_name": _sorting = "comp_name"; break;
        //        case "enable": _sorting = "enable"; break;
        //        case "xid": _sorting = "xid"; break;

        //        default: break;
        //    }

        //    return _sorting;
        //}

        //#endregion Fields Mapping
    }
예제 #2
0
        //假聯絡人
        //public static distributorInfo fakeContact()
        //{

        //    distributorInfo fake = new distributorInfo()
        //    {
        //        companyXid = "1",
        //        channelOid = "111",
        //        userid = "2",
        //        firstName = "sharon",
        //        lastName = "chang",
        //        areatel = "886",
        //        tel = "3939889",
        //        email = "*****@*****.**",
        //        countryCd = "TW",
        //        lang = "zh-tw",
        //        currency = "TWD",
        //        state="TW",
        //        memberUuid = "051794b8-db2a-4fe7-939f-31ab1ee2c719",
        //        tokenKey = "897af29c45ed180451c2e6bfa81333b6",
        //        deviceId = "3c2ab71448224d1d7148350f7972e96e"
        //    };

        //    return fake;
        //}

        //假國攷
        //public static List<Country> fakeCountry()
        //{
        //    Country c1 = new Country() { countryCd = "TW", countryName = "台灣", countryEngName = "TAIWAN" };
        //    Country c2 = new Country() { countryCd = "HK", countryName = "香港", countryEngName = "HONG KONG" };
        //    Country c3 = new Country() { countryCd = "MO", countryName = "澳門", countryEngName = "MO" };
        //    Country c4 = new Country() { countryCd = "CN", countryName = "中國", countryEngName = "CN" };
        //    Country c5 = new Country() { countryCd = "US", countryName = "美國", countryEngName = "US" };

        //    List<Country> lstCountry = new List<Country>();
        //    lstCountry.Add(c1);
        //    lstCountry.Add(c2);
        //    lstCountry.Add(c3);
        //    lstCountry.Add(c4);
        //    lstCountry.Add(c5);

        //    return lstCountry;
        //}

        //單純的目的是產出前台可以使用的object string
        public static DataModel getDefaultDataModel(int qty, string guidNo)
        {
            DataModel d = new DataModel();

            d.guidNo = guidNo;

            modulesData modules = new modulesData();

            otherDataM other = new otherDataM();

            other.moduleType = "OMDL_OTHER_DATA";
            moduleData_otherData mo = new moduleData_otherData();

            other.moduleData  = mo;
            modules.otherData = other;

            contactDataM contact = new contactDataM();

            contact.moduleType = "OMDL_CONTACT_DATA";
            moduleData_contactData mcontract = new moduleData_contactData();
            contactNameInfo        cni       = new contactNameInfo();
            contactTelInfo         cti       = new contactTelInfo();
            contactAppInfo         cai       = new contactAppInfo();

            mcontract.contactName = cni;
            mcontract.contactTel  = cti;
            mcontract.contactApp  = cai;
            contact.moduleData    = mcontract;


            modules.contactData = contact;

            sendDataM send = new sendDataM();

            send.moduleType = "OMDL_SEND_DATA";
            moduleData_sendData msend         = new moduleData_sendData();
            receiverNameInfo    receiverName  = new receiverNameInfo();
            receiverTelInfo     receiverTel   = new receiverTelInfo();
            sendToCountryInfo   sendToCountry = new sendToCountryInfo();

            receiveAddressInfo receiveAdd = new receiveAddressInfo();

            sendToCountry.receiveAddress = receiveAdd;

            sendToHotelInfo sendToHotel = new sendToHotelInfo();
            buyerPassportEnglishNameInfo buyerPassportEnglishName = new buyerPassportEnglishNameInfo();
            buyerLocalNameInfo           buyerLocalName           = new buyerLocalNameInfo();

            sendToHotel.buyerPassportEnglishName = buyerPassportEnglishName;
            sendToHotel.buyerLocalName           = buyerLocalName;
            shipInfoInfo shipInfo = new shipInfoInfo();

            msend.receiverName  = receiverName;
            msend.receiverTel   = receiverTel;
            msend.sendToCountry = sendToCountry;
            msend.sendToHotel   = sendToHotel;
            msend.shipInfo      = shipInfo;
            send.moduleData     = msend;
            modules.sendData    = send;

            passengerDataM passenger = new passengerDataM();

            passenger.moduleType = "OMDL_PSGR_DATA";
            moduleData_passenger mp            = new moduleData_passenger();
            qtyChildSeatInfo     qtyChildSeat  = new qtyChildSeatInfo();
            qtyInfantSeatInfo    qtyInfantSeat = new qtyInfantSeatInfo();

            mp.qtyChildSeat       = qtyChildSeat;
            mp.qtyInfantSeat      = qtyInfantSeat;
            passenger.moduleData  = mp;
            modules.passengerData = passenger;

            carRentingDataM carRentingData = new carRentingDataM();

            carRentingData.moduleType = "OMDL_RENT_CAR";
            moduleData_CarRent cm     = new moduleData_CarRent();
            pickUpInfo_forCar  pickUp = new pickUpInfo_forCar();

            dateTimeInfo t = new dateTimeInfo();

            pickUp.datetime = t;

            dropOffInfo_forCar dropOff = new dropOffInfo_forCar();

            dropOff.datetime          = t;
            cm.pickUp                 = pickUp;
            cm.dropOff                = dropOff;
            carRentingData.moduleData = cm;
            modules.carRentingData    = carRentingData;

            shuttleDataM shuttle = new shuttleDataM();

            shuttle.moduleType = "OMDL_SHUTTLE";
            moduleData_Shuttle     ms = new moduleData_Shuttle();
            designatedLocationInfo designatedLocation = new designatedLocationInfo();
            timeInfo   time = new timeInfo();
            pickUpInfo pp   = new pickUpInfo();

            pp.time = time;
            dropOffInfo dd = new dropOffInfo();
            designatedByCustomerInfo designatedByCustomer = new designatedByCustomerInfo();

            designatedByCustomer.pickUp  = pp;
            designatedByCustomer.dropOff = dd;
            charterRouteInfo charterRoute = new charterRouteInfo();

            ms.designatedLocation   = designatedLocation;
            ms.designatedByCustomer = designatedByCustomer;
            ms.charterRoute         = charterRoute;
            shuttle.moduleData      = ms;
            modules.shuttleData     = shuttle;

            flightInfoDataM flight = new flightInfoDataM();

            flight.moduleType = "OMDL_FLIGHT_INFO";
            moduleData_FlightInfo mf      = new moduleData_FlightInfo();
            arrivalInfo           arrival = new arrivalInfo();

            arrivalDatetimeInfo atime = new arrivalDatetimeInfo();

            arrival.arrivalDatetime = atime;
            departureInfo         departure = new departureInfo();
            departureDatetimeInfo dtime     = new departureDatetimeInfo();

            departure.departureDatetime = dtime;

            mf.arrival             = arrival;
            mf.departure           = departure;
            flight.moduleData      = mf;
            modules.flightInfoData = flight;

            d.modules = modules;


            List <CusDataInfo> LstCus = new List <CusDataInfo>();

            for (int i = 0; i < qty; i++)
            {
                CusDataInfo cus = new CusDataInfo();

                nationalityInfo nation = new nationalityInfo();
                cus.nationality = nation;
                passportInfo ppt = new passportInfo();
                cus.passport = ppt;

                englishNameInfo en = new englishNameInfo();
                cus.englishName = en;
                localNameInfo localName = new localNameInfo();
                cus.localName = localName;
                weightInfo weight = new weightInfo();
                cus.weight = weight;
                heightInfo height = new heightInfo();
                cus.height = height;
                shoeSizeInfo shoes = new shoeSizeInfo();
                cus.shoeSize = shoes;

                foodAllergyInfo food = new foodAllergyInfo();
                mealInfo        meal = new mealInfo();
                meal.foodAllergy     = food;
                meal.excludeFoodType = new string[] { };

                cus.meal = meal;
                LstCus.Add(cus);
            }
            d.travelerData = LstCus;

            cardInfo card = new cardInfo();

            d.card = card;

            return(d);
        }