public ActionResult Index() { try { #region " [ Declaration ] " TimelineService _timelineService = new TimelineService(); CetificateService _cetificateService = new CetificateService(); ViewBag.timeline = _timelineService.GetAll(UserID); ViewBag.cetificate = _cetificateService.GetAll(UserID); #endregion return(View()); } catch (ServiceException serviceEx) { throw serviceEx; } catch (DataAccessException accessEx) { throw accessEx; } catch (Exception ex) { throw new ControllerException(FILE_NAME, "Index", UserID, ex); } }
public JsonResult Delete(CetificateModel model) { try { #region " [ Declaration ] " CetificateService _service = new CetificateService(); #endregion #region " [ Main process ] " model.CreateBy = UserID; model.DeleteBy = UserID; model.DeleteDate = DateTime.Now; #endregion //Call to service return(this.Json(_service.Delete(model), JsonRequestBehavior.AllowGet)); } catch (ServiceException serviceEx) { throw serviceEx; } catch (DataAccessException accessEx) { throw accessEx; } catch (Exception ex) { throw new ControllerException(FILE_NAME, "Delete", UserID, ex); } }
public ActionResult Edit(string id) { try { #region " [ Declaration ] " CetificateService _service = new CetificateService(); ViewBag.id = id; #endregion // Call to service CetificateModel model = _service.GetItemByID(new CetificateModel() { ID = new Guid(id), CreateBy = UserID, Insert = false }); return(View(model)); } catch (ServiceException serviceEx) { throw serviceEx; } catch (DataAccessException accessEx) { throw accessEx; } catch (Exception ex) { throw new ControllerException(FILE_NAME, "Edit", UserID, ex); } }
public JsonResult Index(CustomDataTableRequestHelper requestData) { try { #region " [ Declaration ] " CetificateService _service = new CetificateService(); #endregion #region " [ Main processing ] " requestData = requestData.SetOrderingColumnName(); #endregion //Call to service Dictionary <string, object> _return = _service.List(requestData, UserID); if ((ResponseStatusCodeHelper)_return[DatatableCommonSetting.Response.STATUS] == ResponseStatusCodeHelper.OK) { DataTableResponse <CetificateModel> itemResponse = _return[DatatableCommonSetting.Response.DATA] as DataTableResponse <CetificateModel>; return(this.Json(itemResponse, JsonRequestBehavior.AllowGet)); } // return(this.Json(new DataTableResponse <CetificateModel>(), JsonRequestBehavior.AllowGet)); } catch (ServiceException serviceEx) { throw serviceEx; } catch (DataAccessException accessEx) { throw accessEx; } catch (Exception ex) { throw new ControllerException(FILE_NAME, "Index", UserID, ex); } }