Exemplo n.º 1
0
        private void frmFaculty_Load(object sender, EventArgs e)
        {
            FacultyBUS.RenderListViewDataFaculty(lvwFaculty);

            // Load Initial Config
            FormSetup.FormLoad(this);
        }
        public FrmPersonalInformation(Staff staff)
        {
            InitializeComponent();
            this.staff = staff;
            staffBUS   = new StaffBUS();
            subjectBUS = new SubjectBUS();
            facultyBUS = new FacultyBUS();

            faculties = facultyBUS.GetList();
        }
Exemplo n.º 3
0
        private void BindCmbFaculty(string t = "", string w = "", string o = "")
        {
            List <Faculty> lst = new FacultyBUS().Faculty_GetByTop(t, w, o);

            lst.Insert(0, new Faculty("0", "Select an option"));
            cmbKhoa.DataSource    = lst;
            cmbKhoa.DisplayMember = "facultyName";
            cmbKhoa.ValueMember   = "Id";
            cmbKhoa.SelectedIndex = 0;
        }
        private void BinCmbFaculty(String t, String w, String o)
        {
            List <Entity.Faculty> lst = new FacultyBUS().Faculty_GetByTop(t, w, o);

            lst.Insert(0, new Faculty("0", "-- Select an option --"));
            cmbFacultyID.DataSource    = lst;
            cmbFacultyID.DisplayMember = "facultyName";
            cmbFacultyID.ValueMember   = "id";
            cmbFacultyID.SelectedIndex = 0;
        }
Exemplo n.º 5
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (txtFacultyId.Text.Length <= 0)
            {
                MessageBox.Show(MessageBoxText.NotSelectListView, MessageBoxText.CaptionInformation, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            Faculty faculty = new Faculty(txtFacultyId.Text, txtFacultyName.Text);

            FacultyBUS.HandleUpdateFaculty(lvwFaculty, faculty);
        }
Exemplo n.º 6
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            new UserBUS();
            FacultyBUS.RenderComboBoxDataFaculties(cboFaculty);
            CourseBUS.RenderComboBoxDataCourses(cboCourse);

            SelectTypeUser();

            lblWelcome.Text = "Xin chào ADMIN " + Control.userLogin.Name;

            // Load Initial Config
            FormSetup.FormLoad(this);
        }
Exemplo n.º 7
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (txtFacultyId.Text.Length <= 0)
            {
                MessageBox.Show(MessageBoxText.NotSelectListView, MessageBoxText.CaptionInformation, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            FacultyBUS.HandleDeleteFaculty(lvwFaculty, txtFacultyId.Text);

            txtFacultyId.Text   = String.Empty;
            txtFacultyName.Text = String.Empty;
        }
Exemplo n.º 8
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            if (CodeNumExists())
            {
                return;
            }
            if (txtFacultyId.Text.Length <= 0)
            {
                lblFacultyId.ForeColor = ColorTheme.getTheme("danger");
                txtFacultyId.Focus();
                MessageBox.Show(MessageBoxText.RequiredInput, MessageBoxText.CaptionInformation, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            Faculty faculty = new Faculty(txtFacultyId.Text, txtFacultyName.Text);

            FacultyBUS.HandleAddFaculty(lvwFaculty, faculty);

            txtFacultyId.Text   = String.Empty;
            txtFacultyName.Text = String.Empty;
        }
Exemplo n.º 9
0
        private void frmClass_Load(object sender, EventArgs e)
        {
            new ClassBUS();
            CourseBUS.RenderListViewDataCourses(lvwCourse);
            FacultyBUS.RenderListViewDataFaculty(lvwFaculty);
            ClassBUS.RenderListViewFromState(lvwClass);

            // Select Default
            if (lvwCourse.Items.Count > 0)
            {
                lvwCourse.Items[0].Selected = true;
                lvwCourse.Select();
            }

            if (lvwFaculty.Items.Count > 0)
            {
                lvwFaculty.Items[0].Selected = true;
                lvwFaculty.Select();
            }

            // Load Initial Config
            FormSetup.FormLoad(this);
        }
Exemplo n.º 10
0
        private void frmSubject_Load(object sender, System.EventArgs e)
        {
            new SubjectBUS();
            CourseBUS.RenderListViewDataCourses(lvwCourse);
            FacultyBUS.RenderListViewDataFaculty(lvwFaculty);
            SubjectBUS.RenderListViewFromState(lvwSubject);
            UserBUS.RenderComboBoxDataLecturer(cboLecturer);

            // Select Default
            if (lvwCourse.Items.Count > 0)
            {
                lvwCourse.Items[0].Selected = true;
                lvwCourse.Select();
            }

            if (lvwFaculty.Items.Count > 0)
            {
                lvwFaculty.Items[0].Selected = true;
                lvwFaculty.Select();
            }

            // Load Initial Config
            FormSetup.FormLoad(this);
        }
Exemplo n.º 11
0
 private void picReloadFaculty_Click(object sender, EventArgs e)
 {
     FacultyBUS.RenderComboBoxDataFaculties(cboFaculty);
     MessageBox.Show(MessageBoxText.ReloadDataSuccess, MessageBoxText.CaptionSuccess, MessageBoxButtons.OK, MessageBoxIcon.Information);
 }