コード例 #1
0
 public Goals AddGoal(int disciplineId, short periodDays, double value, string description, int ownerId)
 {
     try
     {
         var g = new Goals();
         g.Description = description;
         g.DisciplineId = disciplineId;
         g.PeriodDays = periodDays;
         g.Value = value;
         g.OwnerId = ownerId;
         db.Goals.InsertOnSubmit(g);
         db.SubmitChanges();
         return g;
     }
     catch (Exception e)
     {
         return null;
     }
 }
コード例 #2
0
 partial void UpdateGoals(Goals instance);
コード例 #3
0
 partial void DeleteGoals(Goals instance);
コード例 #4
0
 partial void InsertGoals(Goals instance);
コード例 #5
0
		private void detach_Goals(Goals entity)
		{
			this.SendPropertyChanging();
			entity.Users = null;
		}
コード例 #6
0
		private void attach_Goals(Goals entity)
		{
			this.SendPropertyChanging();
			entity.Users = this;
		}
コード例 #7
0
		private void detach_Goals(Goals entity)
		{
			this.SendPropertyChanging();
			entity.Discipline = null;
		}
コード例 #8
0
		private void attach_Goals(Goals entity)
		{
			this.SendPropertyChanging();
			entity.Discipline = this;
		}