Exemple #1
0
        private void cậpNhậtHợpĐồngToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmHopdong frm = new FrmHopdong();

            frm.Ten   = txtname.Text;
            frm.Quyen = txtquyen.Text;
            frm.ShowDialog();
        }
Exemple #2
0
        private void btThoat_Click(object sender, EventArgs e)
        {
            DialogResult rs;

            rs = MessageBox.Show("Bạn muốn thoát không?", "Thoát", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            if (rs == DialogResult.Yes)
            {
                this.Close();
                FrmHopdong fr = new FrmHopdong();
                fr.btHuy_Click(sender, e);
            }
        }
Exemple #3
0
        public void chuyen(object sender, EventArgs e)
        {
            string insert = "insert into tbl_SinhVien values('" + cbmasv.Text + "',N'" + txtTensv.Text + "',N'" + cbgioitinh.Text + "','" + dtpickngaysinh.Text + "',N'" + txtnoisinh.Text + "',N'" + txtDiachi.Text + "','" + txtSodt.Text + "','" + cbMatruong.Text + "','" + cbSoPhong.Text + "')";

            ketnoi.ThucHienCmd(insert);
            string update = "update tbl_PhongSV set Sosinhvien=Sosinhvien + '" + 1 + "', Giuongtrong=Giuongtrong - '" + 1 + "' where Mapsv='" + cbSoPhong.Text + "'";

            ketnoi.ThucHienCmd(update);
            MessageBox.Show("Bạn đã thêm thành công và nhập thông tin hợp đồng của sinh viên!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            btHuy_Click(sender, e);
            FrmHopdong fr = new FrmHopdong();

            fr.Ten   = txtten.Text;
            fr.Quyen = txtquyen.Text;
            fr.anthoat();
            fr.ShowDialog();
        }