protected void OnButtonSearch_Click(object sender, EventArgs e) { this.presenter = new StudentPresenter(this, new Uni.Model.StudentModel()); this.Repeater1.DataSource = null; this.Repeater1.DataSource = this.presenter.GetStudents(); this.Repeater1.DataBind(); }
public FormStudent() { InitializeComponent(); Presenter = new StudentPresenter(this); formGuardian = new FormGuardian(this); formContact = new FormContact(this); formEnrolledYear = new FormEnrolledYear(this); }
public FrmStudentRegistration(string mode, string id) { InitializeComponent(); studentPresenter = new StudentPresenter(); ThemeHelper th = new ThemeHelper(); th.setFormColor(this); th.setPanelColor(panelTop); th.setGroupBoxColor(groupPersonalInfo); th.setGroupBoxColor(groupSchoolInfo); th.setButtonColor(btnAdd); th.setButtonColor(btnUpdate); th.setButtonColor(btnDelete); th.setRadioButtonColor(rbnMale); th.setRadioButtonColor(rbnFemale); th.setLabelColor(lblFirstName); th.setLabelColor(lblMiddleName); th.setLabelColor(lblLastName); th.setLabelColor(lblAddress); th.setLabelColor(lblContactNo); th.setLabelColor(lblEmailAddress); th.setLabelColor(lblIDNo); th.setLabelColor(lblCourse); th.setLabelColor(lblYearAndSection); if (mode == "form") { btnAdd.Text = "Add"; lblTitle.Text = "STUDENT FORM"; this.Text = lblTitle.Text; if (!String.IsNullOrEmpty(id)) { currentID = id; btnAdd.Text = "Cancel"; btnUpdate.Enabled = true; btnUpdate.FlatStyle = FlatStyle.Flat; btnDelete.Enabled = true; btnDelete.FlatStyle = FlatStyle.Flat; populateFields(); } else { btnUpdate.Enabled = false; btnUpdate.FlatStyle = FlatStyle.Standard; btnDelete.Enabled = false; } } else { lblStatus.Hide(); switchIsActivated.Hide(); lblSwitchStatus.Hide(); activation = false; this.Size = new Size(661, 563); } }
public FormStudents() { InitializeComponent(); dataGrid.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dataGrid.MultiSelect = false; dataGrid.ReadOnly = true; dataGridMark.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dataGridMark.MultiSelect = false; dataGridMark.ReadOnly = true; studentPresenter = new StudentPresenter(this, this); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var studentRepository = new StudentRepository("student"); var roomRepository = new RoomRepository("room"); var laptopRepository = new LaptopRepository("laptop"); var view = new DormitoryForm(); var studentPresenter = new StudentPresenter(view, studentRepository); var roomPresenter = new RoomPresenter(view, roomRepository); var laptopPresenter = new LaptopPresenter(view, laptopRepository); Application.Run(view); }
public frmStudent(User user) { InitializeComponent(); CurrentUser = user; IsEditType = false; typeOfExamList = new List <dynamic> { new { Name = "Tất cả", Value = (int)Enums.TYPE_OF_EXAM.ALL }, new { Name = "Thi chính thức", Value = (int)Enums.TYPE_OF_EXAM.MAIN_EXAM }, new { Name = "Thi thử", Value = (int)Enums.TYPE_OF_EXAM.PRACTICE_EXAM }, }; presenter = new StudentPresenter(this, user); this.Text = CurrentUser != null ? CurrentUser.Username : ""; LastLoginDate = CurrentUser.LastLoginDate; this.Load += FrmStudentMainPage_Load; }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { this.presenter = new StudentPresenter(this, new Uni.Model.StudentModel()); this.Repeater1.DataSource = this.presenter.GetStudents(); this.Repeater1.DataBind(); this.DDLSubject.DataSource = this.presenter.GetSubjects(); this.DDLSubject.DataBind(); this.DDLSubject.Items.Insert(0, new ListItem(string.Empty, string.Empty)); this.DDLSubject.SelectedIndex = 0; this.DDLGroup.DataSource = this.presenter.GetGroup(); this.DDLGroup.DataBind(); this.DDLGroup.Items.Insert(0, new ListItem(string.Empty, string.Empty)); this.DDLGroup.SelectedIndex = 0; } }
private void btnAdd_Click(object sender, EventArgs e) { StudentPresenter stupre = new StudentPresenter(this); stupre.AddStudent(); }