예제 #1
0
 public RentalInfoesController(RentalInfoServices rentalInfoServices, ExtraServices extraServices, CityServices cityManager, PropertiesServices propertyManager, ClientServices clientsManager, UserServices userServices)
 {
     _rentalInfoManager = rentalInfoServices;
     _extrasManager     = extraServices;
     _cityManager       = cityManager;
     _propertyManager   = propertyManager;
     _clientsManager    = clientsManager;
     _userServices      = userServices;
 }
예제 #2
0
        public static ServiceModel GenerateExtraService(ExtraServices item)
        {
            ServiceModel model = new ServiceModel()
            {
                Id                 = Guid.NewGuid().ToString(),
                Descriptie         = "",
                ExtraService       = item,
                ExtraServiceChosen = true
            };

            return(model);
        }
        public async Task CreateExtraService(ExtraServices extraServices)
        {
            using IDbConnection _connection = new SqlConnection(_connectionString);
            _connection.Open();

            var procedure = "uspExtraService_Add";

            var reader = await _connection.ExecuteAsync(
                procedure,
                new
            {
                extraServices.ServiceName,
                extraServices.IconPath,
                extraServices.ParentServiceId,
                extraServices.Price,
                extraServices.CreatedBy
            },
                commandType : CommandType.StoredProcedure,
                commandTimeout : 10);
        }