Load() public method

public Load ( IDataReader dr ) : void
dr IDataReader
return void
Esempio n. 1
0
        public static SlideInfo Get(int slideId)
        {
            SlideInfo slide = null;
            using (IDataReader dr = DataProvider.Instance().GetSlide(slideId)) {
                if (dr.Read()) {
                    slide = new SlideInfo();
                    slide.Load(dr);
                }
                dr.Close();
            }

            //if (slide == null)
            //    return null;

            //using (IDataReader dr = DataProvider.Instance().GetSlideObjects(slide.Id)) {
            //    while (dr.Read()) {
            //        slide.SlideObjects.Add(SlideObjectInfo.FromDataReader(dr));
            //    }
            //    dr.Close();
            //}

            return slide;
        }