partial void UpdateYear(Year instance);
 partial void DeleteYear(Year instance);
 partial void InsertYear(Year instance);
		private void detach_Years(Year entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
		private void attach_Years(Year entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}
Beispiel #6
0
 public int Add(Year y)
 {
     db.Years.InsertOnSubmit(y);
     db.SubmitChanges();
     return y.YID;
 }
Beispiel #7
0
        public int SaveNewYear(string name, DateTime Date, int Year, int ownerID)
        {
            DataRepository dataRepository = new DataRepository();
            Year yr = new Year();
            yr.Name = name;
            yr.Year1 = Year;
            yr.Date = Date;
            yr.OwnerID = ownerID;

            int YID = dataRepository.Add(yr);
            return YID;
        }