/// <summary> /// Deprecated Method for adding a new object to the GoalSet EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToGoalSet(Goal goal) { base.AddObject("GoalSet", goal); }
public static bool InsertGoal(DateTime startTime, DateTime endTime, decimal downtime, int occ) { using (DB db = new DB()) { Goal goal = new Goal(); goal.StartTime = startTime; goal.EndTime = endTime; goal.Dowmtime = downtime; goal.Occuring = occ; goal.CLIENT = Filter_Client; goal.LINE = Filter_Line; db.AddToGoalSet(goal); return db.SaveChanges() > 0; } }
/// <summary> /// Create a new Goal object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="startTime">Initial value of the StartTime property.</param> /// <param name="endTime">Initial value of the EndTime property.</param> /// <param name="dowmtime">Initial value of the Dowmtime property.</param> /// <param name="occuring">Initial value of the Occuring property.</param> /// <param name="cLIENT">Initial value of the CLIENT property.</param> public static Goal CreateGoal(global::System.Int32 id, global::System.DateTime startTime, global::System.DateTime endTime, global::System.Decimal dowmtime, global::System.Int32 occuring, global::System.String cLIENT) { Goal goal = new Goal(); goal.Id = id; goal.StartTime = startTime; goal.EndTime = endTime; goal.Dowmtime = dowmtime; goal.Occuring = occuring; goal.CLIENT = cLIENT; return goal; }