예제 #1
0
        public void UpdateLocation(int id, string name, string state, string GPS, bool coast, int fishId)
        {
            Location l = Dataservice.Locations.SingleOrDefault(c => c.Id == id);

            l.Name    = name;
            l.State   = state;
            l.GPS     = GPS;
            l.IsCoast = coast;
            l.FishId  = fishId;
            Dataservice.SubmitChanges();
        }
예제 #2
0
        public void AddLocation(string name, string state, string GPS, bool coast, int fishId)
        {
            Location l = new Location();

            l.Name    = name;
            l.State   = state;
            l.GPS     = GPS;
            l.IsCoast = coast;
            l.FishId  = fishId;
            Dataservice.Locations.InsertOnSubmit(l);
            Dataservice.SubmitChanges();
        }
예제 #3
0
        public void UpdateBoat(int id, string name, string hullNum, int powerId, int memberId, int size, bool deleted)
        {
            Boat b = Dataservice.Boats.SingleOrDefault(c => c.Id == id);

            b.Name       = name;
            b.HullNumber = hullNum;
            b.PowerId    = powerId;
            b.MemberId   = memberId;
            b.Size       = size;
            b.IsDeleted  = deleted;
            Dataservice.SubmitChanges();
        }
예제 #4
0
        public void AddBoat(string name, string hullNum, int powerId, int memberId, int size)
        {
            Boat b = new Boat();

            b.Name       = name;
            b.HullNumber = hullNum;
            b.PowerId    = powerId;
            b.MemberId   = memberId;
            b.Size       = size;
            Dataservice.Boats.InsertOnSubmit(b);
            Dataservice.SubmitChanges();
        }
예제 #5
0
        public void UpdateFish(int id, decimal lenght, decimal weight, string type, int loactionId, string notes, int boatId,
                               int memberId, bool deleted)
        {
            Fish f = Dataservice.Fishes.SingleOrDefault(c => c.Id == id);

            f.Length     = lenght;
            f.Weight     = weight;
            f.Type       = type;
            f.LocationId = loactionId;
            f.BoatId     = boatId;
            f.MemberId   = memberId;
            f.IsDeleted  = deleted;
            Dataservice.SubmitChanges();
        }
예제 #6
0
        public void AddFish(decimal length, decimal weight, string type, int loactionId, string notes, int boatId,
                            int memberId)
        {
            Fish f = new Fish();

            f.Length     = length;
            f.Weight     = weight;
            f.Type       = type;
            f.LocationId = loactionId;
            f.BoatId     = boatId;
            f.MemberId   = memberId;
            Dataservice.Fishes.InsertOnSubmit(f);
            Dataservice.SubmitChanges();
        }
예제 #7
0
        public void UpDateMember(int id, string first, string last, string email, string phone, string address,
                                 string address2, string city, string state, string zip, bool ative)
        {
            Member m = Dataservice.Members.SingleOrDefault(c => c.Id == id);

            m.FirstName = first;
            m.LastName  = last;
            m.Email     = email;
            m.Phone     = phone;
            m.Address   = address;
            m.Address2  = address2;
            m.City      = city;
            m.State     = state;
            m.Zip       = zip;
            m.IsAtive   = ative;
            Dataservice.SubmitChanges();
        }
예제 #8
0
        public void AddMember(string first, string last, string email, string phone, string address,
                              string address2, string city, string state, string zip)
        {
            Member m = new Member();

            m.FirstName = first;
            m.LastName  = last;
            m.Email     = email;
            m.Phone     = phone;
            m.Address   = address;
            m.Address2  = address2;
            m.City      = city;
            m.State     = state;
            m.Zip       = zip;
            m.IsAtive   = true;
            m.DateAdded = DateTime.Now;
            Dataservice.Members.InsertOnSubmit(m);
            Dataservice.SubmitChanges();
        }