Esempio n. 1
0
 public void UpdateSpecialScheme(SpecialScheme specialScheme)
 {
     var oldScheme = GetSpecialScheme(specialScheme.Id);
     oldScheme.RegionId = specialScheme.RegionId;
     oldScheme.StateId = specialScheme.StateId;
     oldScheme.DealerId = specialScheme.DealerId;
     oldScheme.Name = specialScheme.Name;
     oldScheme.MonthId = specialScheme.MonthId;
     oldScheme.Description = specialScheme.Description;
     specialSchemeRepo.SaveChanges();
 }
Esempio n. 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the SpecialSchemes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSpecialSchemes(SpecialScheme specialScheme)
 {
     base.AddObject("SpecialSchemes", specialScheme);
 }
Esempio n. 3
0
 public static SpecialSchemeModel FromDomainModel(SpecialScheme scheme)
 {
     return new SpecialSchemeModel {
         Id = scheme.Id,
         Name = scheme.Name,
         RegionId = scheme.RegionId,
         Region = scheme.Region.Name,
         StateId = scheme.StateId,
         DealerId = scheme.DealerId,
         Description = scheme.Description,
         MonthId = scheme.MonthId,
         Month = string.Format("{0}-{1}", scheme.Month.Name, scheme.Month.Year)
     };
 }
Esempio n. 4
0
 /// <summary>
 /// Create a new SpecialScheme object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="objectInfo">Initial value of the ObjectInfo property.</param>
 /// <param name="regionId">Initial value of the RegionId property.</param>
 /// <param name="monthId">Initial value of the MonthId property.</param>
 /// <param name="stateId">Initial value of the StateId property.</param>
 /// <param name="dealerId">Initial value of the DealerId property.</param>
 public static SpecialScheme CreateSpecialScheme(global::System.Int32 id, global::System.String name, ObjectInfo objectInfo, global::System.Int32 regionId, global::System.Int32 monthId, global::System.Int32 stateId, global::System.Int32 dealerId)
 {
     SpecialScheme specialScheme = new SpecialScheme();
     specialScheme.Id = id;
     specialScheme.Name = name;
     specialScheme.ObjectInfo = StructuralObject.VerifyComplexObjectIsNotNull(objectInfo, "ObjectInfo");
     specialScheme.RegionId = regionId;
     specialScheme.MonthId = monthId;
     specialScheme.StateId = stateId;
     specialScheme.DealerId = dealerId;
     return specialScheme;
 }