コード例 #1
0
ファイル: MasterService.cs プロジェクト: akhilrex/DMP_New
 public void UpdateTraining(Training training)
 {
     var oldTraining = GetTraining(training.Id);
     oldTraining.Name = training.Name;
     oldTraining.Code = training.Code;
     oldTraining.Description = training.Description;
     oldTraining.Designation = training.Designation;
     trainingRepo.SaveChanges();
 }
コード例 #2
0
ファイル: DmpModel.Designer.cs プロジェクト: akhilrex/DMP_New
 /// <summary>
 /// Create a new Training object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="code">Initial value of the Code property.</param>
 /// <param name="objectInfo">Initial value of the ObjectInfo property.</param>
 /// <param name="designation">Initial value of the Designation property.</param>
 public static Training CreateTraining(global::System.Int32 id, global::System.String name, global::System.String code, ObjectInfo objectInfo, global::System.String designation)
 {
     Training training = new Training();
     training.Id = id;
     training.Name = name;
     training.Code = code;
     training.ObjectInfo = StructuralObject.VerifyComplexObjectIsNotNull(objectInfo, "ObjectInfo");
     training.Designation = designation;
     return training;
 }
コード例 #3
0
ファイル: MasterModel.cs プロジェクト: gchamoli/DMP
 public static TrainingModel FromDomainModel(Training training)
 {
     return new TrainingModel {
         Id = training.Id,
         Name = training.Name,
         Description = training.Description,
         Code = training.Code,
         Designation = training.Designation
     };
 }
コード例 #4
0
ファイル: DmpModel.Designer.cs プロジェクト: akhilrex/DMP_New
 /// <summary>
 /// Deprecated Method for adding a new object to the Trainings EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTrainings(Training training)
 {
     base.AddObject("Trainings", training);
 }