示例#1
0
        public static List <BackOfficeContactViewModel> GetBackOfficeContactViewModel()
        {
            var model = new List <BackOfficeContactViewModel>();

            var manager = PlugInManager.GetMasterDataManager();

            var data = manager.GetBackOfficeContacts();

            foreach (var contact in data)
            {
                BackOfficeContactViewModel m = new BackOfficeContactViewModel();
                m.Id          = contact.Id;
                m.Address     = contact.Address;
                m.City        = contact.City;
                m.CompanyName = contact.CompanyName;
                m.Country     = contact.Country;
                m.Email       = contact.Email;
                m.FirstName   = contact.FirstName;
                m.LastName    = contact.LastName;

                model.Add(m);
            }

            return(model);
        }
示例#2
0
        public static void AddMasterData(TouristUnitViewModel model)
        {
            var manager     = PlugInManager.GetMasterDataManager();
            var touristunit = new IdomOffice.Interface.BackOffice.MasterData.TouristUnit();

            touristunit.id        = Guid.NewGuid().ToString();
            touristunit.Bathrooms = model.Bathrooms;
            touristunit.Bedroom   = model.Bedroom;
            touristunit.SiteCode  = model.SiteCode;
            touristunit.SiteName  = model.SiteName;
            //touristunit.Beds = model.Beds;
            touristunit.ImageGalleryPath      = model.ImageGalleryPath;
            touristunit.ImageThumbnailsPath   = model.ImageThumbnailsPath;
            touristunit.CloseDate             = model.CloseDate;
            touristunit.CountryName           = model.CountryName;
            touristunit.MaxAdults             = model.MaxAdults;
            touristunit.MaxPersons            = model.MaxPersons;
            touristunit.MobilhomeArea         = model.MobilhomeArea;
            touristunit.OpenDate              = model.OpenDate;
            touristunit.PlaceName             = model.PlaceName;
            touristunit.PurchasePriceListId   = model.PurchasePriceListId;
            touristunit.RegionName            = model.RegionName;
            touristunit.TerraceArea           = model.TerraceArea;
            touristunit.TourOperatorCode      = model.TourOperatorCode;
            touristunit.TravelServiceProvider = model.TravelServiceProvider;
            touristunit.UnitCode              = model.UnitCode;
            touristunit.UnitOfferInfoList     = model.UnitOfferInfoList;
            touristunit.UnitTitel             = model.UnitTitel;

            manager.AddMasterData(touristunit);
        }
示例#3
0
        public static List <TouristSiteViewModel> GetTouristSiteViewModel()
        {
            var data    = new List <TouristSite>();
            var model   = new List <TouristSiteViewModel>();
            var manager = PlugInManager.GetMasterDataManager();

            data = manager.GetTouristSites();

            foreach (var TouristSite in data)
            {
                var m = new TouristSiteViewModel();
                m.id                  = TouristSite.id;
                m.CountryId           = TouristSite.CountryId;
                m.PlaceId             = TouristSite.PlaceId;
                m.RegionId            = TouristSite.RegionId;
                m.SiteCode            = TouristSite.SiteCode;
                m.SiteName            = TouristSite.SiteName;
                m.Stars               = TouristSite.Stars;
                m.ImageGalleryPath    = TouristSite.ImageGalleryPath;
                m.ImageThumbnailsPath = TouristSite.ImageThumbnailsPath;
                m.Description         = TouristSite.Description;
                m.Longitude           = TouristSite.Longitude;
                m.Latitude            = TouristSite.Latitude;
                model.Add(m);
            }


            return(model);
        }
示例#4
0
        public static string GetOfferName(string offercode)
        {
            string name;
            var    manager = PlugInManager.GetMasterDataManager();
            var    offer   = manager.GetUnitOfferByCode(offercode);

            name = offer.OfferTitel;

            return(name);
        }
示例#5
0
        public static void UpdateMasterData(CountryViewModel model)
        {
            var manager = PlugInManager.GetMasterDataManager();
            var country = manager.GetCountry(model.Id);

            country.CountryId           = model.CountryId;
            country.ImageGalleryPath    = model.ImageGalleryPath;
            country.ImageThumbnailsPath = model.ImageThumbnailsPath;
            country.CountryName         = model.CountryName;

            manager.UpdateMasterData(country);
        }
示例#6
0
        public static void AddMasterData(CountryViewModel model)
        {
            var manager = PlugInManager.GetMasterDataManager();
            var country = new IdomOffice.Interface.BackOffice.MasterData.Country();

            country.Id                  = Guid.NewGuid().ToString();
            country.CountryId           = model.CountryId;
            country.ImageGalleryPath    = model.ImageGalleryPath;
            country.ImageThumbnailsPath = model.ImageThumbnailsPath;
            country.CountryName         = model.CountryName;

            manager.AddMasterData(country);
        }
示例#7
0
        public static void UpdateMasterData(PlaceViewModel model)
        {
            var manager = PlugInManager.GetMasterDataManager();
            var place   = manager.GetPlace(model.Id);

            place.PlaceId             = model.PlaceId;
            place.RegionId            = model.RegionId;
            place.PlaceName           = model.PlaceName;
            place.ImageGalleryPath    = model.ImageGalleryPath;
            place.ImageThumbnailsPath = model.ImageThumbnailsPath;

            manager.UpdateMasterData(place);
        }
示例#8
0
        public static void UpdateMasterData(RegionViewModel model)
        {
            var manager = PlugInManager.GetMasterDataManager();
            var region  = manager.GetRegion(model.Id);

            region.CountryId           = model.CountryId;
            region.RegionId            = model.RegionId;
            region.RegionName          = model.RegionName;
            region.ImageGalleryPath    = model.ImageGalleryPath;
            region.ImageThumbnailsPath = model.ImageThumbnailsPath;

            manager.UpdateMasterData(region);
        }
示例#9
0
        public static void AddMasterData(PlaceViewModel model)
        {
            var manager = PlugInManager.GetMasterDataManager();
            var place   = new Place();

            place.Id                  = Guid.NewGuid().ToString();
            place.PlaceId             = model.PlaceId;
            place.RegionId            = model.RegionId;
            place.PlaceName           = model.PlaceName;
            place.ImageGalleryPath    = model.ImageGalleryPath;
            place.ImageThumbnailsPath = model.ImageThumbnailsPath;

            manager.AddMasterData(place);
        }
示例#10
0
        public static void AddMasterData(RegionViewModel model)
        {
            var manager = PlugInManager.GetMasterDataManager();
            var region  = new Region();

            region.Id                  = Guid.NewGuid().ToString();;
            region.CountryId           = model.CountryId;
            region.RegionId            = model.RegionId;
            region.RegionName          = model.RegionName;
            region.ImageGalleryPath    = model.ImageGalleryPath;
            region.ImageThumbnailsPath = model.ImageThumbnailsPath;

            manager.AddMasterData(region);
        }
示例#11
0
        public static void UpdateMasterData(BackOfficeContactViewModel model)
        {
            var manager = PlugInManager.GetMasterDataManager();
            var contact = manager.GetBackOfficeContact(model.Id);

            contact.Address     = model.Address;
            contact.City        = model.City;
            contact.CompanyName = model.CompanyName;
            contact.Country     = model.Country;
            contact.Email       = model.Email;
            contact.FirstName   = model.FirstName;
            contact.LastName    = model.LastName;

            manager.UpdateMasterData(contact);
        }
示例#12
0
        public static void AddMasterData(BackOfficeContactViewModel model)
        {
            var manager = PlugInManager.GetMasterDataManager();
            var contact = new BackOfficeContact();


            contact.Id          = Guid.NewGuid().ToString();
            contact.Address     = model.Address;
            contact.City        = model.City;
            contact.CompanyName = model.CompanyName;
            contact.Country     = model.Country;
            contact.Email       = model.Email;
            contact.FirstName   = model.FirstName;
            contact.LastName    = model.LastName;

            manager.AddMasterData(contact);
        }
示例#13
0
        public static void UpdateMasterData(UnitOfferViewModel model)
        {
            var manager   = PlugInManager.GetMasterDataManager();
            var unitoffer = manager.GetUnitOffer(model.id);

            unitoffer.IsAutoStopBooking         = model.IsAutoStopBooking;
            unitoffer.OfferCode                 = model.OfferCode;
            unitoffer.SiteCode                  = model.SiteCode;
            unitoffer.OfferCount                = model.OfferCount;
            unitoffer.OfferDescription          = model.OfferDescription;
            unitoffer.OfferDescriptionTranslate = model.OfferDescriptionTranslate;
            unitoffer.OfferTitel                = model.OfferTitel;
            unitoffer.OfferTitelTranslate       = model.OfferTitelTranslate;
            unitoffer.ProviderNotice            = model.ProviderNotice;
            unitoffer.TourOperatorCode          = model.TourOperatorCode;
            unitoffer.UnitCode                  = model.UnitCode;

            manager.UpdateMasterData(unitoffer);
        }
示例#14
0
        public static void UpdateMasterData(TouristSiteViewModel model)
        {
            var manager     = PlugInManager.GetMasterDataManager();
            var touristsite = manager.GetTouristSite(model.id);

            touristsite.CountryId           = model.CountryId;
            touristsite.PlaceId             = model.PlaceId;
            touristsite.RegionId            = model.RegionId;
            touristsite.SiteCode            = model.SiteCode;
            touristsite.SiteName            = model.SiteName;
            touristsite.Stars               = model.Stars;
            touristsite.Description         = model.Description;
            touristsite.ImageGalleryPath    = model.ImageGalleryPath;
            touristsite.ImageThumbnailsPath = model.ImageThumbnailsPath;
            touristsite.Latitude            = model.Latitude;
            touristsite.Longitude           = model.Longitude;

            manager.UpdateMasterData(touristsite);
        }
示例#15
0
        public static void AddMasterData(UnitOfferViewModel model)
        {
            var manager   = PlugInManager.GetMasterDataManager();
            var unitoffer = new  IdomOffice.Interface.BackOffice.MasterData.UnitOffer();

            unitoffer.id = Guid.NewGuid().ToString();
            unitoffer.IsAutoStopBooking         = model.IsAutoStopBooking;
            unitoffer.OfferCode                 = model.OfferCode;
            unitoffer.SiteCode                  = model.SiteCode;
            unitoffer.OfferCount                = model.OfferCount;
            unitoffer.OfferDescription          = model.OfferDescription;
            unitoffer.OfferDescriptionTranslate = model.OfferDescriptionTranslate;
            unitoffer.OfferTitel                = model.OfferTitel;
            unitoffer.OfferTitelTranslate       = model.OfferTitelTranslate;
            unitoffer.ProviderNotice            = model.ProviderNotice;
            unitoffer.TourOperatorCode          = model.TourOperatorCode;
            unitoffer.UnitCode                  = model.UnitCode;

            manager.AddMasterData(unitoffer);
        }
示例#16
0
        public static void AddMasterData(TouristSiteViewModel model)
        {
            var         manager     = PlugInManager.GetMasterDataManager();
            TouristSite touristsite = new TouristSite();

            touristsite.id                  = Guid.NewGuid().ToString();
            touristsite.CountryId           = model.CountryId;
            touristsite.PlaceId             = model.PlaceId;
            touristsite.RegionId            = model.RegionId;
            touristsite.SiteCode            = model.SiteCode;
            touristsite.SiteName            = model.SiteName;
            touristsite.Stars               = model.Stars;
            touristsite.Description         = model.Description;
            touristsite.ImageGalleryPath    = model.ImageGalleryPath;
            touristsite.ImageThumbnailsPath = model.ImageThumbnailsPath;
            touristsite.Latitude            = model.Latitude;
            touristsite.Longitude           = model.Longitude;

            manager.AddMasterData(touristsite);
        }
示例#17
0
        public static List <RegionViewModel> GetRegionViewModel()
        {
            // var data = new List<Region>();
            var model = new List <RegionViewModel>();

            var manager = PlugInManager.GetMasterDataManager();

            var data = manager.GetRegions();

            foreach (var region in data)
            {
                RegionViewModel m = new RegionViewModel();
                m.Id                  = region.Id;
                m.CountryId           = region.CountryId;
                m.RegionId            = region.RegionId;
                m.RegionName          = region.RegionName;
                m.ImageGalleryPath    = region.ImageGalleryPath;
                m.ImageThumbnailsPath = region.ImageThumbnailsPath;

                model.Add(m);
            }

            return(model);
        }