public int UpdateDirector(string directorName, int directorID)
        {
            var directorTable   = new UserData.TabDirectorDataTable();
            var directorAdapter = new TabDirectorTableAdapter();
            int rowCount        = 0;

            if (directorName != null)
            {
                rowCount = directorAdapter.UpdateDirector(directorName, directorID);
            }
            return(rowCount);
        }
        public int InsertDirector(String directorName)
        {
            var directorTable   = new UserData.TabDirectorDataTable();
            var directorAdapter = new TabDirectorTableAdapter();
            int rowCount        = 0;

            if (directorName != null)
            {
                rowCount = directorAdapter.InsertDirector(directorName);
                return(rowCount);
            }
            return(rowCount);
        }
        public List <Directors> getDirectors()
        {
            List <Directors> directors = new List <Directors>();

            var directorsTable    = new UserData.TabDirectorDataTable();
            var directorsAdapater = new TabDirectorTableAdapter();

            int rowCount = directorsAdapater.getDirectors(directorsTable);

            if (rowCount > 0)
            {
                foreach (DataRow dr in directorsTable)
                {
                    Directors dir = new Directors();
                    dir.DID          = int.Parse(dr["DID"].ToString());
                    dir.DirectorName = dr["DirectorName"].ToString();

                    directors.Add(dir);
                }
            }
            return(directors);
        }
 public void DeleteDirector(int directorID)
 {
     var directorTable   = new UserData.TabDirectorDataTable();
     var directorAdapter = new TabDirectorTableAdapter();
     int rowCount        = directorAdapter.DeleteDirector(directorID);
 }