// get all director records
        public List <DirectorDTO> GetAllDirector()
        {
            // list for storing director objects
            List <DirectorDTO> directorList = new List <DirectorDTO>();


            try
            {
                // get all rows in the table using query
                tabDirectorTableAdapter.Fill(tabDirectorDataTable);

                // convert rows into objects
                foreach (DataRow directorRow in tabDirectorDataTable.Rows)
                {
                    DirectorDTO director = new DirectorDTO
                    {
                        DID          = (int)directorRow[0],
                        DirectorName = (string)directorRow[1]
                    };

                    directorList.Add(director);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

            return(directorList);
        }
 // update a director row
 public bool IsDirectorUpdated(DirectorDTO updatedDirector)
 {
     try
     {
         // update row using query
         tabDirectorTableAdapter.UpdateDirector(updatedDirector.DirectorName, updatedDirector.DID);
         return(true);
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
         return(false);
     }
 }
 // add new director row into Director table
 public bool IsDirectorInserted(DirectorDTO newDirector)
 {
     try
     {
         // insert row using query
         tabDirectorTableAdapter.InsertDirector(newDirector.DirectorName);
         return(true);
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
         return(false);
     }
 }