Пример #1
0
 public static List<FeaturedLogo> GetAll()
 {
     TeachinVietnamDataContext dbContext = new TeachinVietnamDataContext();
     var all = dbContext.tbl_feature_logos.Where(x=>x.active==true).OrderByDescending(x => x.SortOrder);
     List<FeaturedLogo> list = new List<FeaturedLogo>();
     foreach (var obj in all)
     {
         FeaturedLogo fl = new FeaturedLogo();
         fl.orgName = obj.OrganizationName;
         fl.logo = obj.logo;
         fl.username = obj.username;
         list.Add(fl);
     }
     return list;
 }
Пример #2
0
 public static FeaturedLogo GetFeatureLogoById(int _id)
 {
     TeachinVietnamDataContext dbContext = new TeachinVietnamDataContext();
     proc_feature_logo_GetByIdResult logo = dbContext.proc_feature_logo_GetById(_id).FirstOrDefault();
     if (logo != null)
     {
         FeaturedLogo fl = new FeaturedLogo();
         fl.id = logo.id;
         fl.Active = (bool)logo.active;
         fl.OrgName = logo.OrganizationName;
         fl.Logo = logo.logo;
         fl.Username = logo.username;
         fl.SortOrder = Convert.ToInt32(logo.SortOrder);
         return fl;
     }
     return null;
 }