public Continent VAbbrevation(Continent continent, IContinentService _continentService) { if (String.IsNullOrEmpty(continent.Abbrevation) || continent.Abbrevation.Trim() == "") { continent.Errors.Add("Abbrevation", "Tidak boleh kosong"); } return(continent); }
public CountryLocation UpdateObject(CountryLocation countrylocation, IContinentService _continentService) { if (!isValid(_validator.VUpdateObject(countrylocation, this, _continentService))) { countrylocation = _repository.UpdateObject(countrylocation); } return(countrylocation); }
public CountryLocation CreateObject(CountryLocation countrylocation, IContinentService _continentService) { countrylocation.Errors = new Dictionary <String, String>(); if (!isValid(_validator.VCreateObject(countrylocation, this, _continentService))) { countrylocation.MasterCode = _repository.GetLastMasterCode(countrylocation.OfficeId) + 1; countrylocation = _repository.CreateObject(countrylocation); } return(countrylocation); }
public CountryLocation VContinent(CountryLocation countrylocation, IContinentService _continentService) { Continent continent = _continentService.GetObjectById(countrylocation.ContinentId); if (continent == null) { countrylocation.Errors.Add("ContinentId", "Tidak boleh kosong"); } return(countrylocation); }
public Continent VName(Continent continent, IContinentService _continentService) { if (String.IsNullOrEmpty(continent.Name) || continent.Name.Trim() == "") { continent.Errors.Add("Name", "Tidak boleh kosong"); } else if (_continentService.IsNameDuplicated(continent)) { continent.Errors.Add("Name", "Tidak boleh diduplikasi"); } return(continent); }
public Continent VObject(Continent continent, IContinentService _continentService) { Continent oldcontinent = _continentService.GetObjectById(continent.Id); if (oldcontinent == null) { continent.Errors.Add("Generic", "Invalid Data For Update"); } else if (!VOffice(continent.OfficeId, oldcontinent.OfficeId)) { continent.Errors.Add("Generic", "Invalid Data For Update"); } return(continent); }
public Continent VCreateObject(Continent continent, IContinentService _continentService) { VName(continent, _continentService); if (!isValid(continent)) { return(continent); } VAbbrevation(continent, _continentService); if (!isValid(continent)) { return(continent); } return(continent); }
public TicketController( IContinentService continentService, ICountryRegionService countryRegionService, IStateProvinceService stateProvinceService, IAreaService areaService, ITourService tourService ) { _continentService = continentService; _countryRegionService = countryRegionService; _stateProvinceService = stateProvinceService; _areaService = areaService; _tourService = tourService; }
public ContinentsController(IContinentService service, ILoggingFactory loggingFactory) : base(loggingFactory) { _service = service; }
public ContinentController(IErrorService errorService , IContinentService continentService) : base(errorService) { _continentService = continentService; }
public ContinentsController(IContinentService continentService) { _continentService = continentService; }
public HomeController(ILogger <HomeController> logger, IContinentService continentService, ICountryService countryService) { _logger = logger; _continentService = continentService; _countryService = countryService; }
public CountryController(ICountryService countryService, IContinentService continentService) { _countryService = countryService; _continentService = continentService; }
public CountryLocation VUpdateObject(CountryLocation countrylocation, ICountryLocationService _countrylocationService, IContinentService _continentService) { VName(countrylocation, _countrylocationService); if (!isValid(countrylocation)) { return(countrylocation); } VAbbrevation(countrylocation, _countrylocationService); if (!isValid(countrylocation)) { return(countrylocation); } VContinent(countrylocation, _continentService); if (!isValid(countrylocation)) { return(countrylocation); } return(countrylocation); }