public static void Add(Bookings booking)
        {
            var context = new TravelExperts_Group3Context();

            context.Bookings.Add(booking);
            context.SaveChanges();
        }
Exemple #2
0
        public static void Add(Packages package)
        {
            var context = new TravelExperts_Group3Context();

            context.Packages.Add(package);
            context.SaveChanges();
        }
Exemple #3
0
        public static void update(Packages package)
        {
            var context      = new TravelExperts_Group3Context();
            var originalTrip = context.Packages.Find(package.PackageId);

            originalTrip.PkgName = package.PkgName;
            originalTrip.PkgDesc = package.PkgDesc;
            context.SaveChanges();
        }
Exemple #4
0
        //@*coded by Larisa Steig*@
        public static void update(Customers user)
        {
            var context = new TravelExperts_Group3Context();

            var originalCustomer = context.Customers.Find(user.CustomerId);

            originalCustomer.CustFirstName = user.CustFirstName;
            originalCustomer.CustLastName  = user.CustLastName;
            originalCustomer.CustAddress   = user.CustAddress;
            originalCustomer.CustCity      = user.CustCity;
            originalCustomer.CustCountry   = user.CustCountry;
            originalCustomer.CustEmail     = user.CustEmail;
            originalCustomer.CustBusPhone  = user.CustBusPhone;
            originalCustomer.CustHomePhone = user.CustHomePhone;
            originalCustomer.CustProv      = user.CustProv;
            originalCustomer.CustPostal    = user.CustPostal;
            context.SaveChanges();
        }