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));
        }
Exemplo n.º 2
0
 public IHttpActionResult ListForRole(CommandListVM model)
 {
     try
     {
         var result = _service.ListForRole(model);
         return(Ok(result));
     }
     catch { throw; }
 }
Exemplo n.º 3
0
        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());
        }