public ActionResult Delete(int?trackId, int?masterAlbumId = null, int?masterGenreId = null, int?masterMediaTypeId = null) { TrackItemModel trackItemModel = new TrackItemModel() { IsSecurityOperations = this.IsSecurityOperations, Track = new TrackViewModel(), ControllerAction = "Delete", MasterAlbumId = masterAlbumId, MasterGenreId = masterGenreId, MasterMediaTypeId = masterMediaTypeId }; try { TrackDTO trackDTO = Application.GetById(trackItemModel.OperationResult, new object[] { trackId }); if (trackDTO != null) { trackItemModel.Track = new TrackViewModel(trackDTO); } } catch (Exception exception) { trackItemModel.OperationResult.ParseException(exception); } return(PartialView(trackItemModel)); }
public ActionResult Delete(TrackItemModel trackItemModel) { try { if (Application.Delete(trackItemModel.OperationResult, (TrackDTO)trackItemModel.Track.ToDTO())) { return(JsonResultSuccess(new { uri = ReadUrlDictionary() })); } } catch (Exception exception) { trackItemModel.OperationResult.ParseException(exception); } return(JsonResultOperationResult(trackItemModel.OperationResult)); }
public ActionResult Delete(TrackItemModel trackItemModel) { try { if (Application.Delete(trackItemModel.OperationResult, (TrackDTO)trackItemModel.Track.ToDTO())) { return(RedirectToUrlDictionary()); } } catch (Exception exception) { trackItemModel.OperationResult.ParseException(exception); } trackItemModel.IsSecurityOperations = IsSecurityOperations; return(View(trackItemModel)); }
public ActionResult Update(TrackItemModel trackItemModel) { try { if (ValidateModelState(Application.Repository)) { if (Application.Update(trackItemModel.OperationResult, (TrackDTO)trackItemModel.Track.ToDTO())) { return(JsonResultSuccess(new { uri = ReadUrlDictionary() })); } } } catch (Exception exception) { trackItemModel.OperationResult.ParseException(exception); } return(JsonResultOperationResult(trackItemModel.OperationResult)); }
public ActionResult Create(int?masterAlbumId = null, int?masterGenreId = null, int?masterMediaTypeId = null) { TrackItemModel trackItemModel = new TrackItemModel() { IsSecurityOperations = this.IsSecurityOperations, Track = new TrackViewModel(), ControllerAction = "Create", MasterAlbumId = masterAlbumId, MasterGenreId = masterGenreId, MasterMediaTypeId = masterMediaTypeId }; try { IsCreate(trackItemModel.OperationResult); } catch (Exception exception) { trackItemModel.OperationResult.ParseException(exception); } return(PartialView(trackItemModel)); }
public ActionResult Update(TrackItemModel trackItemModel) { try { if (ValidateModelState(Application.Repository)) { if (Application.Update(trackItemModel.OperationResult, (TrackDTO)trackItemModel.Track.ToDTO())) { return(RedirectToUrlDictionary()); } } } catch (Exception exception) { trackItemModel.OperationResult.ParseException(exception); } trackItemModel.IsSecurityOperations = IsSecurityOperations; return(View(trackItemModel)); }