Exemple #1
0
 public ContentResult GetSubtypesForType(int typeId)
 {
     //bool saveResult;
     //string error = string.Empty;
     HelpQuestionSubtypesModel model = new HelpQuestionSubtypesModel { Error = string.Empty };
     try
     {
         HelpBl.GetSubtypesForType(typeId, model);
     }
     catch (Exception ex)
     {
         Log.Error("Exception on GetSubtypesForType:", ex);
         model.Error = ex.GetBaseException().Message;
     }
     JavaScriptSerializer jsonSerializer = new JavaScriptSerializer();
     var jsonString = jsonSerializer.Serialize(model);
     return Content(jsonString);
 }
Exemple #2
0
 public void GetSubtypesForType(int typeId, HelpQuestionSubtypesModel model)
 {
     model.Subtypes = HelpQuestionSubtypeDao.LoadForTypeIdSortedByOrder(typeId)
          .ConvertAll(x => new IdNameDto { Id = x.Id, Name = x.Name });
 }