Esempio n. 1
0
		/// <summary>
		/// Populates the fields of a single objects from the columns found in an open reader.
		/// </summary>
		/// <param name="obj" type="VUserRoles">Object of VUserRoles to populate</param>
		/// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			5/2/2015 4:13:15 AM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static void PopulateObjectFromReader(VUserRoleBase obj,IDataReader rdr) 
		{

			obj.UserID = rdr.GetInt32(rdr.GetOrdinal(VUserRoleFields.UserID));
			obj.GroupID = rdr.GetInt32(rdr.GetOrdinal(VUserRoleFields.GroupID));
			if (!rdr.IsDBNull(rdr.GetOrdinal(VUserRoleFields.GroupName)))
			{
				obj.GroupName = rdr.GetString(rdr.GetOrdinal(VUserRoleFields.GroupName));
			}
			
			obj.RoleName = rdr.GetString(rdr.GetOrdinal(VUserRoleFields.RoleName));
			obj.RolePath = rdr.GetString(rdr.GetOrdinal(VUserRoleFields.RolePath));
			obj.Expr1 = rdr.GetInt32(rdr.GetOrdinal(VUserRoleFields.Expr1));
			if (!rdr.IsDBNull(rdr.GetOrdinal(VUserRoleFields.MenuButton)))
			{
				obj.MenuButton = rdr.GetString(rdr.GetOrdinal(VUserRoleFields.MenuButton));
			}
			

		}