Exemple #1
0
        private void PictureBox13_Click(object sender, EventArgs e)
        {
            FormCapNhatNhanVien frmCapNhat = new FormCapNhatNhanVien(lblMaNV.Text);

            frmCapNhat.ShowDialog();
            Reset();
        }
        private void PictureBox13_Click(object sender, EventArgs e)
        {
            if (lblMaNV.Text == "")
            {
                PushNoti noti1 = new PushNoti("Error", "Chọn một nhân viên để sửa!");
                noti1.Width = this.Width;
                this.Controls.Add(noti1);
                noti1.Show();
                noti1.ShowNoti();
                return;
            }
            if ((lblChucVu.Text == "Quản lí" || lblChucVu.Text == "Quản lí nhân sự") && ThongTinDangNhap.ChucVu == "Quản lí nhân sự")
            {
                PushNoti noti1 = new PushNoti("Error", "Bạn không có quyền hạn thao tác trên nhân viên này. Vui lòng sử dụng một tài khoản cấp cao hơn");
                noti1.Width = this.Width;
                this.Controls.Add(noti1);
                noti1.Show();
                noti1.ShowNoti();
                return;
            }
            if (lblChucVu.Text == "Quản lí" && ThongTinDangNhap.ChucVu == "Quản lí")
            {
                PushNoti noti1 = new PushNoti("Error", "Bạn không có quyền hạn thao tác trên nhân viên này. Vui lòng sử dụng một tài khoản cấp cao hơn");
                noti1.Width = this.Width;
                this.Controls.Add(noti1);
                noti1.Show();
                noti1.ShowNoti();
                return;
            }
            FormCapNhatNhanVien frmCapNhat = new FormCapNhatNhanVien(lblMaNV.Text);

            frmCapNhat.ShowDialog();
            Reset();
        }
        private void PictureBox13_Click(object sender, EventArgs e)
        {
            if (lblMaNV.Text == "")
            {
                PushNoti noti1 = new PushNoti("Error", "Chọn một nhân viên để sửa!");
                noti1.Width = this.Width;
                this.Controls.Add(noti1);
                noti1.Show();
                noti1.ShowNoti();
                return;
            }
            FormCapNhatNhanVien frmCapNhat = new FormCapNhatNhanVien(lblMaNV.Text);

            frmCapNhat.ShowDialog();
            Reset();
        }