public Messages <tblNew> UpdateView(short permissions, int id) { var response = new Commons.Messages <tblNew>() { Status = false, Message = string.Empty }; try { if (ADecentralize.Delete(permissions)) { response.Status = new ANews().UpdateView(id); response.Message = response.Status ? "Update view successfully." : "Update view failed."; return(response); } response.Message = "Limit permissions!"; return(response); } catch (Exception ex) { FileHelper.WriteLine(Settings.Path, ex); response.Message = "Execution error!"; return(response); } }
public Messages <tblNew> GetByStatusPaging(short permissions, short status, int pageNumber, int pageSize) { var response = new Commons.Messages <tblNew>() { Status = false, Message = string.Empty }; try { if (ADecentralize.Delete(permissions)) { response.List = new ANews().GetByStatusPaging(status, pageNumber, pageSize); response.Status = true; response.Message = response.Status ? "Get by status paging successfully." : "Get by status paging failed."; return(response); } response.Message = "Limit permissions!"; return(response); } catch (Exception ex) { FileHelper.WriteLine(Settings.Path, ex); response.Message = "Execution error!"; return(response); } }