public SysRoleCollection FetchByQuery(Query qry) { SysRoleCollection coll = new SysRoleCollection(); coll.LoadAndCloseReader(qry.ExecuteReader()); return(coll); }
public SysRoleCollection FetchAll() { SysRoleCollection coll = new SysRoleCollection(); Query qry = new Query(SysRole.Schema); coll.LoadAndCloseReader(qry.ExecuteReader()); return(coll); }
public static LIS.DAL.SysRoleCollection GetSysRoleCollection(string varPkSuid) { SubSonic.QueryCommand cmd = new SubSonic.QueryCommand("SELECT * FROM [dbo].[Sys_Roles] INNER JOIN [tbl_RolesForUsers] ON [Sys_Roles].[FP_sBranchID] = [tbl_RolesForUsers].[FP_sBranchID] WHERE [tbl_RolesForUsers].[FP_sBranchID] = @FP_sBranchID", SysUser.Schema.Provider.Name); cmd.AddParameter("@FP_sBranchID", varPkSuid, DbType.String); IDataReader rdr = SubSonic.DataService.GetReader(cmd); SysRoleCollection coll = new SysRoleCollection(); coll.LoadAndCloseReader(rdr); return(coll); }