public DataTable ListForRole(CommandListVM model) { SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@ApplicationID", _requestInfo.ApplicationId); param[1] = new SqlParameter("@RoleID", model.RoleID); return(SQLHelper.GetDataTable(CommandType.StoredProcedure, "org.spGetCommandsForRole", param)); }
public IHttpActionResult ListForRole(CommandListVM model) { try { var result = _service.ListForRole(model); return(Ok(result)); } catch { throw; } }
public Result <List <Command> > ListForRole(CommandListVM model) { var table = ConvertDataTableToList.BindList <Command>(_dataSource.ListForRole(model)); if (table.Count > 0 || table.Count == 0) { return(Result <List <Command> > .Successful(data : table)); } return(Result <List <Command> > .Failure()); }