Esempio n. 1
0
        public Task <int> UpdateCoffee(int CoffeeID, string CoffeeName)
        {
            DynamicParameters p = new DynamicParameters();

            p.Add("CoffeeID", CoffeeID);
            p.Add("CoffeeName", CoffeeName);

            return(_dataAccess.SaveData(
                       "scud97_kssu.spUpdateCoffee",
                       p,
                       "Default"));
        }
Esempio n. 2
0
        public Task <int> UpdateBeer(int BeerID, string BeerName, string Brewery)
        {
            DynamicParameters p = new DynamicParameters();

            p.Add("BeerID", BeerID);
            p.Add("BeerName", BeerName);
            p.Add("Brewery", Brewery);

            return(_dataAccess.SaveData(
                       "scud97_kssu.spUpdateBeer",
                       p,
                       "Default"));
        }
Esempio n. 3
0
        public async Task <int> CreatePerson(PersonModel person)
        {
            var p = new DynamicParameters();

            p.Add("FirstName", person.FirstName);
            p.Add("LastName", person.LastName);
            p.Add("DateOfBirth", person.DateOfBirth);
            p.Add("IsActive", person.IsActive);
            p.Add("Id", DbType.Int32, direction: ParameterDirection.Output);

            await _db.SaveData("dbo.spPeople_Create", p, _connectionStringName);

            return(p.Get <int>("Id"));
        }
Esempio n. 4
0
        public Task <int> UpdateHoliday(int HolidayID, string Country, string City, bool Been, string DateBeen)
        {
            DynamicParameters p = new DynamicParameters();

            p.Add("HolidayID", HolidayID);
            p.Add("Country", Country);
            p.Add("City", City);
            p.Add("Been", Been);
            p.Add("DateBeen", DateBeen);

            return(_dataAccess.SaveData(
                       "scud97_kssu.spUpdateHoliday",
                       p,
                       "Default"));
        }
Esempio n. 5
0
        public Task <int> UpdateVinyl(int VinylID, string Name, string ArtistName, bool Purchased, int AddedByID)
        {
            DynamicParameters p = new DynamicParameters();

            p.Add("VinylID", VinylID);
            p.Add("Name", Name);
            p.Add("ArtistName", ArtistName);
            p.Add("Purchased", Purchased);
            p.Add("AddedByID", AddedByID);

            return(_dataAccess.SaveData(
                       "scud97_kssu.spUpdateVinyl",
                       p,
                       "Default"));
        }
Esempio n. 6
0
        public Task <int> SetDefaultUserGroupID(int UserGroupID, string UserID)
        {
            DynamicParameters p = new DynamicParameters();

            p.Add("UserGroupID", UserGroupID);
            p.Add("UserID", UserID);

            return(_dataAccess.SaveData(
                       "scud97_kssu.spUpdateDefaultUserGroupID",
                       p,
                       "Default"));
        }
Esempio n. 7
0
        public Task <int> UpdateActivity(int ActivityID, string ActivityName, string Location, int ExpenseID, string Description, bool Prebook)
        {
            DynamicParameters p = new DynamicParameters();

            p.Add("ActivityID", ActivityID);
            p.Add("ActivityName", ActivityName);
            p.Add("Location", Location);
            p.Add("ExpenseID", ExpenseID);
            p.Add("Description", Description);
            p.Add("Prebook", Prebook);

            return(_dataAccess.SaveData(
                       "scud97_kssu.spUpdateActivity",
                       p,
                       "Default"));
        }
Esempio n. 8
0
        public Task <int> AddUser(string Name, string Id)
        {
            DynamicParameters p = new DynamicParameters();

            p.Add("Name", Name);
            p.Add("Id", Id);

            return(_dataAccess.SaveData(
                       "scud97_kssu.spAddUserName",
                       p,
                       "Default"));
        }
Esempio n. 9
0
        public Task <int> UpdateRestaurant(int RestaurantID, string RestaurantName, int ExpenseID, int LocationID)
        {
            DynamicParameters p = new DynamicParameters();

            p.Add("RestaurantID", RestaurantID);
            p.Add("RestaurantName", RestaurantName);
            p.Add("ExpenseID", ExpenseID);
            p.Add("LocationID", LocationID);

            return(_dataAccess.SaveData(
                       "scud97_kssu.spUpdateRestaurant",
                       p,
                       "Default"));
        }
Esempio n. 10
0
        public Task <int> UpdateFilm(int FilmID, string AddedByID, string FilmName, DateTime ReleaseDate, DateTime AddedDate, bool Watched, int Runtime)
        {
            DynamicParameters p = new DynamicParameters();

            p.Add("FilmID", FilmID);
            p.Add("FilmName", FilmName);
            p.Add("ReleaseDate", ReleaseDate);
            p.Add("AddedDate", AddedDate);
            p.Add("Watched", Watched);
            p.Add("AddedByID", AddedByID);
            p.Add("Runtime", Runtime);

            return(_dataAccess.SaveData(
                       "scud97_kssu.spUpdateFilm",
                       p,
                       "Default"));
        }