예제 #1
0
 public object GetUserRole(int userId)
 {
     return(SqlHelper.ExecuteScalar("select RoleId from SJUserRole where UserId=@UserId order by RoleId", new SqlParameter[] { new SqlParameter("@UserId", userId) }));
 }
예제 #2
0
        public IEnumerable <MainMenuModel> GetAllMenu()
        {
            DataTable data = SqlHelper.ExecuteDataTable(" SELECT * FROM SJMainMenu order by ShowOrder ;", null);

            return(SqlHelper.DataTableToModelList <MainMenuModel>(data));
        }