Esempio n. 1
0
 public async Task <ActionResult> UpdateTrain(OutModels.Models.Trainings product)
 {
     try
     {
         TrainingModel b = (TrainingModel)_mapper.Map <OutModels.Models.Trainings, TrainingModel>(product);
         return(new JsonResult(await this._repository.Update(b)));
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Esempio n. 2
0
 public async Task <ActionResult> DisableTrain(OutModels.Models.Trainings product)
 {
     try
     {
         int id = product.T_Id;
         if (id == 0)
         {
             return(new JsonResult(ResponseModel.Error("موردی یافت نشد")));
         }
         return(new JsonResult(await this._repository.LogicalAvailable(id, false)));
     }
     catch (Exception ex)
     {
         return(null);
     }
 }