Ejemplo n.º 1
0
 public AddDepartmentForm(int deptId)
 {
     InitializeComponent();
     deptName   = string.Empty;
     department = new Controller.Department
     {
         departmentID = deptId
     };
 }
Ejemplo n.º 2
0
        private void AddUserAccount_Load(object sender, EventArgs e)
        {
            Controller.Department department = new Controller.Department();
            Controller.Role       role       = new Controller.Role();
            department.LoadAllDepartment(comboBoxDepartmentName);
            role.LoadAllRole(comboBoxRole);

            CheckFormCall();
        }
Ejemplo n.º 3
0
 private void HomeForm_Load(object sender, EventArgs e)
 {
     Controller.Role role = new Controller.Role();
     //for admin
     if (role.GetRoleName(userAccount.ua_role) == "Admin")
     {
         labelDepartmentTitle.Text           = "Welcome to Attandance System.\nRole : " + role.GetRoleName(userAccount.ua_role);
         addStudentToolStripMenuItem.Visible = false;
         addTeacherToolStripMenuItem.Visible = false;
         addSectionToolStripMenuItem.Visible = false;
         addSubjectToolStripMenuItem.Visible = false;
     }
     else
     {
         Controller.Department department = new Controller.Department();
         labelDepartmentTitle.Text = "Welcome to :" + department.GetDepartmentName(userAccount.ua_department_id) + " department.\nRole : " + role.GetRoleName(userAccount.ua_role);
         //add
         addDepartmentToolStripMenuItem.Visible  = false;
         addUserAccountToolStripMenuItem.Visible = false;
         //view
         viewDepartmentToolStripMenuItem.Visible  = false;
         viewUserAccountToolStripMenuItem.Visible = false;
     }
 }
Ejemplo n.º 4
0
 public AddDepartmentForm()
 {
     InitializeComponent();
     deptName   = string.Empty;
     department = new Controller.Department();
 }
Ejemplo n.º 5
0
 public ViewDepartmentForm()
 {
     InitializeComponent();
     department = new Controller.Department();
 }