コード例 #1
0
 public List <CustomCollectionFiles> GetCollectionListForMaster(int TopicId, char status)
 {
     using (GalleryDataContext context = new GalleryDataContext(Settings.ConnectionString))
     {
         context.CommandTimeout = Settings.CommandTimeout;
         var query = from gtf in context.Gallery_Topics
                     join cl in context.Gallery_Collections
                     on gtf.Gallery_TopicId equals cl.TopicId
                     where gtf.Status == status && gtf.Gallery_TopicId == TopicId
                     select new { gtf, cl };
         List <CustomCollectionFiles> list = new List <CustomCollectionFiles>();
         foreach (var c in query)
         {
             CustomCollectionFiles file_obj = new CustomCollectionFiles();
             file_obj.TopicId           = c.gtf.Gallery_TopicId;
             file_obj.CollectionId      = c.cl.CollectionId;
             file_obj.Title             = c.cl.Title;
             file_obj.IconFile          = c.cl.IconFile;
             file_obj.Description       = c.cl.Description;
             file_obj.ListOrder         = Convert.ToInt32(c.cl.ListOrder);
             file_obj.Tags              = c.cl.Tags;
             file_obj.Url               = c.cl.Url;
             file_obj.CreatedOnDate     = Convert.ToDateTime(c.cl.CreatedOnDate);
             file_obj.LastModifieddDate = Convert.ToDateTime(c.cl.LastModifieddDate);
             file_obj.UserLog           = c.cl.UserLog.ToString();
             file_obj.UserLastUpdate    = c.cl.UserLastUpdate.ToString();
             file_obj.IPLog             = c.cl.IPLog;
             file_obj.IPLastUpdate      = c.cl.IPLastUpdate;
             file_obj.Status            = c.cl.Status;
             list.Add(file_obj);
         }
         return(list);
     }
 }
コード例 #2
0
 public List<CustomCollectionFiles> GetCollectionListForMaster(int TopicId, char status)
 {
     using (GalleryDataContext context = new GalleryDataContext(Settings.ConnectionString))
     {
         context.CommandTimeout = Settings.CommandTimeout;
         var query = from gtf in context.Gallery_Topics
                     join cl in context.Gallery_Collections
                     on gtf.Gallery_TopicId equals cl.TopicId
                     where gtf.Status == status && gtf.Gallery_TopicId == TopicId
                     select new { gtf, cl };
         List<CustomCollectionFiles> list = new List<CustomCollectionFiles>();
         foreach (var c in query)
         {
             CustomCollectionFiles file_obj = new CustomCollectionFiles();
             file_obj.TopicId = c.gtf.Gallery_TopicId;
             file_obj.CollectionId = c.cl.CollectionId;
             file_obj.Title = c.cl.Title;
             file_obj.IconFile = c.cl.IconFile;
             file_obj.Description = c.cl.Description;
             file_obj.ListOrder = Convert.ToInt32(c.cl.ListOrder);
             file_obj.Tags = c.cl.Tags;
             file_obj.Url = c.cl.Url;
             file_obj.CreatedOnDate = Convert.ToDateTime(c.cl.CreatedOnDate);
             file_obj.LastModifieddDate = Convert.ToDateTime(c.cl.LastModifieddDate);
             file_obj.UserLog = c.cl.UserLog.ToString();
             file_obj.UserLastUpdate = c.cl.UserLastUpdate.ToString();
             file_obj.IPLog = c.cl.IPLog;
             file_obj.IPLastUpdate = c.cl.IPLastUpdate;
             file_obj.Status = c.cl.Status;
             list.Add(file_obj);
         }
         return list;
     }
 }