/**
  * Initializes the crud handler
  *
  * The paramater form will contain accessors for the basic form layout
  *
  * The parameter formOptions will contain access for adition form compoenents needed to modify entries
  *
  * **/
 public GenericDatabaseCrud(CollegeEntities1 database, DbSet <T> set, GenericFormCore form)
 {
     this.Database = database;
     this.DataSet  = set;
     Mode          = EditMode.Add;
     this.FormCore = form;
 }
        public EditForm2()
        {
            database = new CollegeEntities1();
            InitializeComponent();


            deptCrud       = new DepartmentCrud(database, this, new DepartmentOptions(this));
            seaCrud        = new SeasonCrud(database, this, new SeasonOptions(this));
            gradeCrud      = new GradeCrud(database, this, new GradeOptions(this));
            majorCrud      = new MajorCrud(database, this, new MajorOptions(this));
            semesterCrud   = new SemesterCrud(database, this, new SemesterOptions(this));
            personCrud     = new PersonCrud(database, this, new PersonOptions(this));
            studentCrud    = new StudentCrud(database, this, new StudentOptions(this));
            courseCrud     = new CourseCrud(database, this, new CourseOptions(this));
            enrollmentCrud = new EnrollmentCrud(database, this, new EnrollmentOptions(this));
            facultyCrud    = new FacultyCrud(database, this, new FacultyOptions(this));
            sectionCrud    = new SectionCrud(database, this, new SectionOptions(this));

            updateListBoxes();

            DisableAllCruds();
            deptCrud.EnableCrud();
        }
 public EnrollmentCrud(CollegeEntities1 database, GenericFormCore core, EnrollmentComponent options) : base(database, database.Enrollments, core)
 {
     Options = options;
 }
 public PersonCrud(CollegeEntities1 database, GenericFormCore core, PersonComponent options) : base(database, database.People, core)
 {
     Options = (PersonComponent)options;
 }
 public SeasonCrud(CollegeEntities1 database, GenericFormCore core, SeasonComponent options) : base(database, database.Seasons, core)
 {
     Options = (SeasonComponent)options;
 }
 public MajorCrud(CollegeEntities1 database, GenericFormCore core, MajorCompoenent options) : base(database, database.Majors, core)
 {
     Options = (MajorCompoenent)options;
 }
Beispiel #7
0
 public StudentCrud(CollegeEntities1 database, GenericFormCore core, StudentCompoenent options) : base(database, database.Students, core)
 {
     Options = (StudentCompoenent)options;
 }
Beispiel #8
0
 public DepartmentCrud(CollegeEntities1 database, GenericFormCore core, DeparmentComponent options) : base(database, database.Departments, core)
 {
     Options = options;
 }
Beispiel #9
0
 public GradeCrud(CollegeEntities1 database, GenericFormCore core, GradeComponent options) : base(database, database.Grades, core)
 {
     Options = (GradeComponent)options;
 }
 public CourseCrud(CollegeEntities1 database, GenericFormCore core, CourseCompoenent options) : base(database, database.Courses, core)
 {
     Options = (CourseCompoenent)options;
 }
Beispiel #11
0
 public FacultyCrud(CollegeEntities1 database, GenericFormCore core, FacultyComponent options) : base(database, database.Faculties, core)
 {
     Options = (FacultyComponent)options;
 }