public FrmSelectStaff(Staff staff,Schedule schedule,int status)
 {
     InitializeComponent();
     this.staff = staff;
     this.schedule = schedule;
     this.statusButton = status;
 }
 public DialogNotification(Notification notification, Staff staff)
 {
     InitializeComponent();
     this.notification = notification;
     notificationBUS = new NotificationBUS();
     scheduleBUS = new ScheduleBUS();
     this.staff = staff;
 }
 public DialogNotification()
 {
     InitializeComponent();
     notification = new Notification();
     staff = new Staff();
     scheduleBUS = new ScheduleBUS();
     notificationBUS = new NotificationBUS();
 }
Beispiel #4
0
 public FrmMain(Staff staff)
 {
     InitializeComponent();
     this.staff = staff;
     timer1 = 0;
     notificationBUS = new NotificationBUS();
     checking = true;
     flag = 0;
 }
        public FrmPersonalInformation(Staff staff)
        {
            InitializeComponent();
            this.staff = staff;
            staffBUS = new StaffBUS();
            subjectBUS = new SubjectBUS();
            facultyBUS = new FacultyBUS();

            faculties = facultyBUS.GetList();
        }
Beispiel #6
0
 public bool UpdateStaffInformation(Staff staff)
 {
     SqlParameter[] parameters = new SqlParameter[]{
         new SqlParameter("@MaCanBo",staff.ID),
         new SqlParameter("@TenCanBo",staff.Name),
         new SqlParameter("@GioiTinh",staff.Sex),
         new SqlParameter("@NgaySinh",staff.Birthday),
         new SqlParameter("@Email",staff.Email),
         new SqlParameter("@SoDienThoai",staff.PhoneNumber),
         new SqlParameter("@DiaChi",staff.Address),
         new SqlParameter("@TenBoMOn",staff.Subject)
     };
     return DBConnection.Instance.ExecuteQuery("UpdateStaffInformation", parameters, CommandType.StoredProcedure);
 }
Beispiel #7
0
        public bool Delete(Staff cb)
        {
            try
            {

                SqlParameter[] sqlParams = new SqlParameter[]{
                          new SqlParameter("@MaCanBo", cb.ID)
            };
                return DBConnection.Instance.ExecuteQuery("Staff_Delete", sqlParams, CommandType.StoredProcedure);
            }
            catch (Exception ex)
            {
                return false;
            }
        }
Beispiel #8
0
        public bool Edit(Staff cb, string SubjectID, string FacultyID)
        {
            try
            {

                SqlParameter[] sqlParams = new SqlParameter[]{
                          new SqlParameter("@MaCanBo", cb.ID),
                          new SqlParameter("@TenCanBo", cb.Name),
                          new SqlParameter("@GioiTinh", cb.Sex),
                          new SqlParameter("@NgaySinh", cb.Birthday),
                          new SqlParameter("@Email", cb.Email),
                          new SqlParameter("@SoDienThoai", cb.PhoneNumber),
                          new SqlParameter("@DiaChi", cb.Address),
                          new SqlParameter("@MaBoMon", SubjectID)
            };
                return DBConnection.Instance.ExecuteQuery("Staff_Update", sqlParams, CommandType.StoredProcedure);
            }
            catch (Exception ex)
            {
                return false;
            }
        }
 public FrmSelectStaff()
 {
     InitializeComponent();
     staff = new Staff();
 }
 public FrmFacultyManagement(Staff staff)
 {
     InitializeComponent();
     this.staff = staff;
 }
 public FrmChangePassword()
 {
     InitializeComponent();
     staff = new Staff();
     staffBUS = new StaffBUS();
 }
 public FrmStaffManagement()
 {
     InitializeComponent();
     staff = new Staff();
 }
 public FrmChangePassword(Staff staff)
 {
     InitializeComponent();
     this.staff = staff;
     staffBUS = new StaffBUS();
 }
 private Staff StaffCB()
 {
     Staff cb = new Staff();
     cb.ID = txtMaCanBo.Text;
     cb.Name = txtTenCanBo.Text;
     cb.Sex = cboGioiTinh.Text;
     cb.Birthday = dtpNgaySinh.Value;
     cb.Email = txtEmail.Text;
     cb.PhoneNumber = txtSDT.Text;
     cb.Address = txtdiachi.Text;
     return cb;
 }
 private bool KiemTra(Staff cb)
 {
     if(txtMaCanBo.Text.Equals(""))
     {
         MessageBox.Show("Mã cán bộ không được để trống !", "Thông Báo");
         return false;
     }
     if (txtTenCanBo.Text.Equals(""))
     {
         MessageBox.Show("Tên cán bộ không được để trống !", "Thông Báo");
         return false;
     }
     if (txtEmail.Text.Equals(""))
     {
         MessageBox.Show("Email không được để trống !", "Thông Báo");
         return false;
     }
     if (txtSDT.Text.Equals(""))
     {
         MessageBox.Show("Số điện thoại không được để trống !", "Thông Báo");
         return false;
     }
     return true;
 }
 public FrmScheduleManagement(Staff staff)
 {
     InitializeComponent();
     this.staff = staff;
 }
Beispiel #17
0
 public Staff GetStaffByAccount(String account)
 {
     try
     {
         Staff staff = new Staff();
         DataTable dt = staffDAL.GetStaffByAccount(account);
         if (dt.Rows.Count <= 0)
         {
             throw new Exception("Tài khoản không tồn tại!");
         }
         else
         {
             staff.ID = dt.Rows[0][0].ToString();
             staff.Name = dt.Rows[0][1].ToString();
             staff.Sex = dt.Rows[0][2].ToString();
             staff.Birthday = Convert.ToDateTime(dt.Rows[0][3].ToString());
             staff.Email = dt.Rows[0][4].ToString();
             staff.PhoneNumber = dt.Rows[0][5].ToString();
             staff.Address = dt.Rows[0][6].ToString();
             staff.Subject = dt.Rows[0][7].ToString();
             staff.Account = dt.Rows[0][8].ToString();
             staff.Password = dt.Rows[0][9].ToString();
             if (dt.Rows[0][10].ToString().Equals("Admin"))
             {
                 staff.Type = 1;
             }
             else
             {
                 if (dt.Rows[0][10].ToString().Equals("Chủ nhiệm khoa"))
                 {
                     staff.Type = 2;
                 }
                 else
                 {
                     if (dt.Rows[0][10].ToString().Equals("Chủ nhiệm bộ môn"))
                     {
                         staff.Type = 3;
                     }
                     else
                     {
                         staff.Type = 4;
                     }
                 }
             }
             staff.Faculty = dt.Rows[0][11].ToString();
             return staff;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #18
0
 public bool UpdateStaffInformation(Staff staff)
 {
     try
     {
         return staffDAL.UpdateStaffInformation(staff);
     }
     catch(Exception ex)
     {
         throw ex;
     }
 }
 public FrmSelectStaff(Staff staff, Schedule schedule)
 {
     // TODO: Complete member initialization
     this.staff = staff;
     this.schedule = schedule;
 }
 public FrmSubjectManagement(Staff staff)
 {
     InitializeComponent();
     this.staff = staff;
 }