Exemplo n.º 1
0
        private void btnXoa_Click_1(object sender, EventArgs e)
        {
            DialogResult tl = MessageBox.Show("Bạn có chắc chắn muốn xóa?", "Xóa", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (tl == DialogResult.Yes)
            {
                int    maNV  = Convert.ToInt32(txtMaNV.Text);
                string nganh = cboNganh.SelectedValue.ToString();
                bool   kt    = trinhdoCMBUL.xoaTDCM(maNV, nganh);
                if (kt)
                {
                    MessageBox.Show("Xóa thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("Xóa thất bại!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                UCQLTrinhDoChuyenMon uCQLTrinhDoChuyen = new UCQLTrinhDoChuyenMon();
                uCQLTrinhDoChuyen.hienThi();
                this.Close();
            }
            else
            {
                this.Close();
            }
        }
Exemplo n.º 2
0
        private void btnThemTDCM_Click_1(object sender, EventArgs e)
        {
            int    maNV       = Convert.ToInt32(lbMaNhanVienTDCM.Text);
            string nganh      = txtNganh.Text.ToString();
            string trinhdo    = cboTrinhDo.SelectedValue.ToString();
            string loaihinhDT = cbbLoaihinhDaoTao.SelectedValue.ToString();
            string truongDT   = txtTruongDaoTao.Text.ToString();
            bool   kt         = trinhDoChuyenMonBUL.ThemTDCM(maNV, nganh, trinhdo, loaihinhDT, truongDT);

            if (kt)
            {
                MessageBox.Show("Thêm thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("Thêm thất bại!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            UCQLTrinhDoChuyenMon uCQLTrinhDoChuyen = new UCQLTrinhDoChuyenMon();
        }
Exemplo n.º 3
0
        private void btnSuaTDCM_Click_1(object sender, EventArgs e)
        {
            int    maNV       = Convert.ToInt32(txtMaNV.Text);
            string nganh      = cboNganh.SelectedValue.ToString();
            string trinhdo    = cboTrinhDo.SelectedValue.ToString();
            string loaihinhDT = cboLoaiHinhDT.SelectedValue.ToString();
            string truongDT   = txtTruongDT.Text.ToString();
            bool   kt         = trinhdoCMBUL.suaTDCM(maNV, nganh, trinhdo, loaihinhDT, truongDT);

            if (kt)
            {
                MessageBox.Show("Sửa thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("Sửa thất bại!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            UCQLTrinhDoChuyenMon uCQLTrinhDoChuyen = new UCQLTrinhDoChuyenMon();

            uCQLTrinhDoChuyen.hienThi();
            this.Close();
        }