예제 #1
0
 public Controller.DtoEntity.Objective ExecuteUpdate(Controller.DtoEntity.Objective objective)
 {
     try {
         if (Singleton.ObjectiveSelect.Select(objective.Id) == null)
         {
             throw new Exception("Objective Update. Objective doesn't exist.");
         }
         return(CommonSingleton.ObjectiveCommon.ToDtoEntity(Singleton.ObjectiveUpdate.Update(CommonSingleton.ObjectiveCommon.ToDataEntity(objective))));
     }
     catch (Exception) {
         throw;
     }
 }
예제 #2
0
 public Guid ExecuteAdd(Controller.DtoEntity.Objective objective)
 {
     try {
         if (string.IsNullOrEmpty(objective.Name))
         {
             throw new Exception("Add Objective, Name shouldn't be empty");
         }
         Data.DataEntity.Objective objectiveResult = Singleton.ObjectiveAdd.Add(CommonSingleton.ObjectiveCommon.ToDataEntity(objective));
         return(objectiveResult.Id);
     }
     catch (Exception) {
         throw;
     }
 }