Пример #1
0
 public bool Delete(int galleryID)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.Gallery_Delete(galleryID));
     }
 }
Пример #2
0
 public bool Update(int galleryID, string name, string description, int sortOrder, string displayImage)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.Gallery_Update(galleryID, name, description, sortOrder, displayImage));
     }
 }
Пример #3
0
 public bool Update(int gigID, string description, string venue, DateTime startDateTime)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.Gig_Update(gigID, description, venue, startDateTime));
     }
 }
Пример #4
0
 public bool Delete(int linkID)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.Link_Delete(linkID));
     }
 }
Пример #5
0
 public bool Delete(int newsID)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.News_Delete(newsID));
     }
 }
Пример #6
0
 public bool Update(int newsID, string subject, string newsText)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.News_Update(newsID, subject, newsText));
     }
 }
Пример #7
0
 public void Add(string name, string description, int sortOrder)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         db.Gallery_Insert(name, description, sortOrder);
     }
 }
Пример #8
0
 public bool Delete(int guestbookID)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.Guestbook_Delete(guestbookID));
     }
 }
Пример #9
0
 public int Add(string name, string email, string comment)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.Guestbook_Insert(name, email, comment, null));
     }
 }
Пример #10
0
 public bool Delete(int profileID)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.Profile_Delete(profileID));
     }
 }
Пример #11
0
 public int Add(string name, string profileText, int sortOrder)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.Profile_Insert(name, profileText, sortOrder));
     }
 }
Пример #12
0
 public bool Update(int profileID, string name, string profileText, int sortOrder)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.Profile_Update(profileID, name, profileText, sortOrder));
     }
 }
Пример #13
0
 public bool Update(int linkID, string url, string title, string note, int sortOrder)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.Link_Update(linkID, url, title, note, sortOrder));
     }
 }
Пример #14
0
 public int Add(string url, string title, string note, int sortOrder)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.Link_Insert(url, title, note, sortOrder));
     }
 }
Пример #15
0
 public bool Delete(int imageID)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.Image_Delete(imageID));
     }
 }
Пример #16
0
 public bool Delete(int gigID)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.Gig_Delete(gigID));
     }
 }
Пример #17
0
 public int Add(string description, string venue, DateTime startDateTime)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.Gig_Insert(description, venue, startDateTime));
     }
 }
Пример #18
0
 public bool Update(int imageID, string title, int sortOrder)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.Image_Update(imageID, title, sortOrder));
     }
 }
Пример #19
0
 public void Add(string filename, string title, int galleryID, int sortOrder)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         db.Image_Insert(filename, title, galleryID, sortOrder);
     }
 }
Пример #20
0
 public int Add(string subject, string newsText)
 {
     using (SprocWrapper db = new SprocWrapper())
     {
         return(db.News_Insert(subject, newsText, DateTime.Now));
     }
 }
Пример #21
0
        public bool Update(int guestbookID, bool display)
        {
            Guestbook guestbook = Get(guestbookID);

            using (SprocWrapper db = new SprocWrapper())
            {
                return(db.Guestbook_Update(guestbookID, guestbook.Name, guestbook.Email, guestbook.Comment, guestbook.Reply, display));
            }
        }
Пример #22
0
        public IList <Guestbook> Get(string where, string orderBy, int startIndex, int noRecords, out int totalNoRecords)
        {
            IList <Guestbook> guestbookEntries = new List <Guestbook>();

            using (SprocWrapper db = new SprocWrapper())
            {
                using (IDataReader reader = db.GuestbookEntries_Get(where, orderBy))
                {
                    FillGuestbookCollection(reader, guestbookEntries, startIndex, noRecords, out totalNoRecords);
                }
            }

            return(guestbookEntries);
        }
Пример #23
0
        public IList <Link> Get(string where, string orderBy, int startIndex, int noRecords, out int totalNoRecords)
        {
            IList <Link> links = new List <Link>();

            using (SprocWrapper db = new SprocWrapper())
            {
                using (IDataReader reader = db.Links_Get(where, orderBy))
                {
                    FillLinkCollection(reader, links, 0, Int32.MaxValue, out totalNoRecords);
                }
            }

            return(links);
        }
Пример #24
0
        public IList <Gig> Get(string where, string orderBy, int startIndex, int noRecords, out int totalNoRecords)
        {
            IList <Gig> gigs = new List <Gig>();

            using (SprocWrapper db = new SprocWrapper())
            {
                using (IDataReader reader = db.Gigs_Get(where, orderBy))
                {
                    FillGigCollection(reader, gigs, 0, Int32.MaxValue, out totalNoRecords);
                }
            }

            return(gigs);
        }
Пример #25
0
        public IList <News> Get(string where, string orderBy, int startIndex, int noRecords, out int totalNoRecords)
        {
            IList <News> news = new List <News>();

            using (SprocWrapper db = new SprocWrapper())
            {
                using (IDataReader reader = db.NewsItems_Get(where, orderBy))
                {
                    FillNewsCollection(reader, news, startIndex, noRecords, out totalNoRecords);
                }
            }

            return(news);
        }
Пример #26
0
        public IList <Image> Get(int galleryID)
        {
            IList <Image> images = new List <Image>();

            using (SprocWrapper db = new SprocWrapper())
            {
                using (IDataReader reader = db.Image_Get("GalleryID=" + galleryID.ToString(), "SortOrder ASC"))
                {
                    int total;
                    FillImageCollection(reader, images, 0, Int32.MaxValue, out total);
                }
            }

            return(images);
        }
Пример #27
0
        public IList <Gallery> Get()
        {
            IList <Gallery> galleries = new List <Gallery>();

            using (SprocWrapper db = new SprocWrapper())
            {
                using (IDataReader reader = db.Gallery_Get(null, "SortOrder ASC"))
                {
                    int total;
                    FillGalleryCollection(reader, galleries, 0, Int32.MaxValue, out total);
                }
            }

            return(galleries);
        }
Пример #28
0
        public IList <Profile> GetAll()
        {
            IList <Profile> galleries = new List <Profile>();

            using (SprocWrapper db = new SprocWrapper())
            {
                using (IDataReader reader = db.Profile_Get())
                {
                    int total;
                    FillProfileCollection(reader, galleries, 0, Int32.MaxValue, out total);
                }
            }

            return(galleries);
        }
Пример #29
0
        public Image GetImage(int imageID)
        {
            IList <Image> images = new List <Image>();

            using (SprocWrapper db = new SprocWrapper())
            {
                using (IDataReader reader = db.Image_Get("ImageID=" + imageID.ToString(), null))
                {
                    int total;
                    FillImageCollection(reader, images, 0, Int32.MaxValue, out total);
                }
            }

            if (images.Count == 1)
            {
                return(images[0]);
            }
            else
            {
                return(null);
            }
        }
Пример #30
0
        public Profile GetProfile(int profileID)
        {
            IList <Profile> galleries = new List <Profile>();

            using (SprocWrapper db = new SprocWrapper())
            {
                using (IDataReader reader = db.Profile_Get(profileID))
                {
                    int total;
                    FillProfileCollection(reader, galleries, 0, Int32.MaxValue, out total);
                }
            }

            if (galleries.Count == 1)
            {
                return(galleries[0]);
            }
            else
            {
                return(null);
            }
        }