Exemple #1
0
        // for login (with matching name from the database)
        public Customer Authinticate(string firstName, string lastName)
        {
            var db   = new MarinaEntities();
            var auth = db.Customers.FirstOrDefault(c => c.FirstName == firstName && c.LastName == lastName);

            return(auth);
        }
Exemple #2
0
        //Slip
        public IList <Slip> GetSlip()
        {
            var db  = new MarinaEntities();
            var slp = db.Slips.ToList();

            return(slp);
        }
Exemple #3
0
        //Lease slip
        public IList <Lease> GetLeaseSlip()
        {
            var db     = new MarinaEntities();
            var lesSlp = db.Leases.ToList();

            return(lesSlp);
        }
Exemple #4
0
        //Dock
        public IList <Dock> GetDock()
        {
            var db   = new MarinaEntities();
            var dock = db.Docks.ToList();

            return(dock);
        }
Exemple #5
0
        //Saving lease
        public void SaveLease(int custId, int slipId)
        {
            var db = new MarinaEntities();

            Lease L = new Lease();

            L.CustomerID = custId;
            L.SlipID     = slipId;
            db.Leases.Add(L);
            db.SaveChanges();
        }