/** * 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; }
/** * unbinds this crud behavior to the form * **/ public void UnbindStandardComponent() { GenericFormCore form = FormCore; form.SubmitButton.Click -= submitButton_Click; form.ListBoxView.SelectedIndexChanged -= generalListBox_SelectedIndexChanged; form.AddRadio.Click -= addRadio_CheckedChanged; form.UpdateRadio.Click -= updateRadioBut_CheckedChanged; form.DeleteRadio.Click -= deleteRadioBut_CheckedChanged; form.ListBoxView.DataSource = null; Filter = null; }
/** * Binds this crud behavior to the form * **/ public void BindStandardComponent() { Filter = null; GenericFormCore form = FormCore; form.SubmitButton.Click += submitButton_Click; form.ListBoxView.SelectedIndexChanged += generalListBox_SelectedIndexChanged; form.AddRadio.Click += addRadio_CheckedChanged; form.UpdateRadio.Click += updateRadioBut_CheckedChanged; form.DeleteRadio.Click += deleteRadioBut_CheckedChanged; form.ListBoxView.DisplayMember = "Name"; form.ListBoxView.DataSource = FilterEntry <T>(ConvertToEntry(DataSet, NameEntry), Filter); form.DeleteRadio.Checked = false; form.UpdateRadio.Checked = false; form.AddRadio.Checked = true; updateSubmitMode(); }
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; }
public StudentCrud(CollegeEntities1 database, GenericFormCore core, StudentCompoenent options) : base(database, database.Students, core) { Options = (StudentCompoenent)options; }
public DepartmentCrud(CollegeEntities1 database, GenericFormCore core, DeparmentComponent options) : base(database, database.Departments, core) { Options = options; }
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; }
public FacultyCrud(CollegeEntities1 database, GenericFormCore core, FacultyComponent options) : base(database, database.Faculties, core) { Options = (FacultyComponent)options; }