Example #1
0
            public ReleaseBBMovies ReleaseBBMovies_ReturnSQL(string ID = "")
            {
                SqlConnection   Conn         = ReleaseBBMovies_Conn();
                string          SelectLine   = "Select [MovieName],[IMDbID],[Year],[PostTitle],[PostURL],[ImageURL],[RapidGator],[LinksChecked],[InCollection],[DateAdded],[Cateogry] From " + ReleaseBBMovies_TableName() + " WHERE ID = '" + ID + "'";
                DataTable       ReturnTable  = sql.GetDataTable(Conn, SelectLine);
                ReleaseBBMovies returnObject = new ReleaseBBMovies();

                if (ReturnTable != null)
                {
                    foreach (DataRow ret in ReturnTable.Rows)
                    {
                        returnObject.MovieName    = ret["MovieName"].ToString();
                        returnObject.IMDbID       = ret["IMDbID"].ToString();
                        returnObject.Year         = ret["Year"].ToString();
                        returnObject.PostTitle    = ret["PostTitle"].ToString();
                        returnObject.PostURL      = ret["PostURL"].ToString();
                        returnObject.ImageURL     = ret["ImageURL"].ToString();
                        returnObject.RapidGator   = ret["RapidGator"].ToString();
                        returnObject.LinksChecked = ret["LinksChecked"].ToString();
                        returnObject.InCollection = ret["InCollection"].ToString();
                        returnObject.DateAdded    = ret["DateAdded"].ToString();
                        returnObject.Cateogry     = ret["Cateogry"].ToString();
                        return(returnObject);
                    }
                }
                return(returnObject);
            }
Example #2
0
            public List <PrnChill> PrnChill_ReturnSQLList(string Command = "")
            {
                _Database.SQL sql = new _Database.SQL();
                if (Command == "")
                {
                    Command = "Select * From PrnChill_TableName()";
                }
                SqlConnection   Conn        = PrnChill_Conn();
                DataTable       ReturnTable = sql.GetDataTable(Conn, Command);
                List <PrnChill> ReturnList  = new List <PrnChill>();

                if (ReturnTable != null)
                {
                    foreach (DataRow ret in ReturnTable.Rows)
                    {
                        PrnChill returnObject = new PrnChill();
                        returnObject.PostName      = ret["PostName"].ToString();
                        returnObject.PostURL       = ret["PostURL"].ToString();
                        returnObject.Links         = ret["Links"].ToString();
                        returnObject.DateAdded     = ret["DateAdded"].ToString();
                        returnObject.LinkCheckDate = ret["LinkCheckDate"].ToString();
                        returnObject.InCollection  = ret["InCollection"].ToString();
                        returnObject.ImageDir      = ret["ImageDir"].ToString();
                        ReturnList.Add(returnObject);
                    }
                }
                return(ReturnList);
            }
Example #3
0
            /// <summary>Populate DataGrid with SQL Search Results (returns Row Count) (option to add column with checkboxes to search result grid)</summary>
            /// <param name="RadGrid"> </param>
            /// <param name="conn"> </param>
            /// <param name="SQLQuery"> </param>
            /// <param name="AddCheckBoxColumn"> </param>
            public int SQL(RadGridView RadGrid, SqlConnection conn, string SQLQuery, bool AddCheckBoxColumn = false)
            {
                if (RadGrid == null)
                {
                    return(0);
                }

                bool ClearGrid = true;

                if (ClearGrid)
                {
                    // clear out datagrid contents
                    RadGrid.DataSource = null;
                    RadGrid.Rows.Clear();
                    RadGrid.Columns.Clear();
                    RadGrid.AutoGenerateColumns = true;
                }

                DataTable SQL = new DataTable();

                SQL = sql.GetDataTable(conn, SQLQuery);

                if (AddCheckBoxColumn)                                         // option to add new column with checkboxes to SQL search results
                {
                    SQL.Columns.Add(new DataColumn("Selected", typeof(bool))); //this will show checkboxes in Selected Column
                }


                RadGrid.DataSource = SQL;
                return(RadGrid.RowCount);
            }
Example #4
0
            public TCP TCP_ReturnSQL(string ID = "")
            {
                SqlConnection Conn         = TCP_Conn();
                string        SelectLine   = "Select [VideoID],[FilmName],[FilmURL],[CoverURL],[ImageLinks] From " + TCP_TableName() + " WHERE ID = '" + ID + "'";
                DataTable     ReturnTable  = sql.GetDataTable(Conn, SelectLine);
                TCP           returnObject = new TCP();

                if (ReturnTable != null)
                {
                    foreach (DataRow ret in ReturnTable.Rows)
                    {
                        returnObject.VideoID    = ret["VideoID"].ToString();
                        returnObject.FilmName   = ret["FilmName"].ToString();
                        returnObject.FilmURL    = ret["FilmURL"].ToString();
                        returnObject.CoverURL   = ret["CoverURL"].ToString();
                        returnObject.ImageLinks = ret["ImageLinks"].ToString();
                        return(returnObject);
                    }
                }
                return(returnObject);
            }
Example #5
0
            public PrnChill PrnChill_ReturnSQL(string PostURL)
            {
                _Database.SQL sql          = new _Database.SQL();
                SqlConnection Conn         = PrnChill_Conn();
                string        SelectLine   = "Select [PostName],[PostURL],[Links],[DateAdded],[LinkCheckDate],[InCollection],[ImageDir] From " + PrnChill_TableName() + " WHERE PostURL = '" + PostURL + "'";
                DataTable     ReturnTable  = sql.GetDataTable(Conn, SelectLine);
                PrnChill      returnObject = new PrnChill();

                if (ReturnTable != null)
                {
                    foreach (DataRow ret in ReturnTable.Rows)
                    {
                        returnObject.PostName      = ret["PostName"].ToString();
                        returnObject.PostURL       = ret["PostURL"].ToString();
                        returnObject.Links         = ret["Links"].ToString();
                        returnObject.DateAdded     = ret["DateAdded"].ToString();
                        returnObject.LinkCheckDate = ret["LinkCheckDate"].ToString();
                        returnObject.InCollection  = ret["InCollection"].ToString();
                        returnObject.ImageDir      = ret["ImageDir"].ToString();
                        return(returnObject);
                    }
                }
                return(returnObject);
            }