Exemple #1
0
        public static List <GlobalContent> GetGlobalContent(int siteId)
        {
            List <GlobalContent> globalContents = new List <GlobalContent>();

            using (IDataReader reader = DBModule.GetGlobalContent(siteId))
            {
                while (reader.Read())
                {
                    globalContents.Add(new GlobalContent {
                        ModuleGuid   = Guid.Parse(reader["ModuleGuid"].ToString()),
                        ModuleID     = Convert.ToInt32(reader["ModuleId"]),
                        ModuleTitle  = reader["ModuleTitle"].ToString(),
                        FeatureName  = reader["FeatureName"].ToString(),
                        ResourceFile = reader["ResourceFile"].ToString(),
                        CreatedBy    = reader["CreatedBy"].ToString(),
                        CreatedById  = Convert.ToInt32(reader["CreatedById"]),
                        ControlSrc   = reader["ContrlSrc"].ToString(),
                        UseCount     = Convert.ToInt32(reader["UseCount"])
                    });
                }
            }
            return(globalContents);
        }