Ejemplo n.º 1
0
        public M_Galleries GalleryDetail(int GalleryId)
        {
            Execute     Exec = new Execute(DatabaseType.DBType1);
            M_Galleries G    = new M_Galleries(Exec.ExecuteQuery <DataRow>("SELECT * FROM Gallery WHERE GalleryId = " + GalleryId, 0, CommandType.Text));

            return(G);
        }
Ejemplo n.º 2
0
        public List <M_Galleries> GetAllGalleryListWithCondition(int top, string condition)
        {
            List <M_Galleries> lst  = new List <M_Galleries>();
            DataTable          dt   = new DataTable();
            Execute            Exec = new Execute(DatabaseType.DBType1);

            dt = Exec.ExecuteQuery <DataTable>("SELECT TOP " + top + " * FROM Gallery WHERE " + condition + " ORDER BY GalleryId DESC", 0, CommandType.Text);
            foreach (DataRow dr in dt.Rows)
            {
                M_Galleries G = new M_Galleries(dr);
                lst.Add(G);
            }
            return(lst);
        }