Esempio n. 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) }));
 }
Esempio n. 2
0
        public IEnumerable <MainMenuModel> GetAllMenu()
        {
            DataTable data = SqlHelper.ExecuteDataTable(" SELECT * FROM SJMainMenu order by ShowOrder ;", null);

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