public void UpdateDealerManpowerTarget(DealerManpowerTargets target) { var oldTarget = GetDealerManpowerTarget(target.Id); oldTarget.MonthId = target.MonthId; oldTarget.Planned = target.Planned; oldTarget.Description = target.Description; oldTarget.UserId = target.UserId; oldTarget.DealerId = target.DealerId; oldTarget.ProductId = target.ProductId; manpowerTargetRepo.SaveChanges(); }
/// <summary> /// Deprecated Method for adding a new object to the DealerManpowerTargets EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToDealerManpowerTargets(DealerManpowerTargets dealerManpowerTargets) { base.AddObject("DealerManpowerTargets", dealerManpowerTargets); }
/// <summary> /// Create a new DealerManpowerTargets object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="monthId">Initial value of the MonthId property.</param> /// <param name="planned">Initial value of the Planned property.</param> /// <param name="userId">Initial value of the UserId property.</param> /// <param name="objectInfo">Initial value of the ObjectInfo property.</param> /// <param name="dealerId">Initial value of the DealerId property.</param> /// <param name="productId">Initial value of the ProductId property.</param> public static DealerManpowerTargets CreateDealerManpowerTargets(global::System.Int32 id, global::System.Int32 monthId, global::System.Int32 planned, global::System.Int32 userId, ObjectInfo objectInfo, global::System.Int32 dealerId, global::System.Int32 productId) { DealerManpowerTargets dealerManpowerTargets = new DealerManpowerTargets(); dealerManpowerTargets.Id = id; dealerManpowerTargets.MonthId = monthId; dealerManpowerTargets.Planned = planned; dealerManpowerTargets.UserId = userId; dealerManpowerTargets.ObjectInfo = StructuralObject.VerifyComplexObjectIsNotNull(objectInfo, "ObjectInfo"); dealerManpowerTargets.DealerId = dealerId; dealerManpowerTargets.ProductId = productId; return dealerManpowerTargets; }