Exemple #1
0
        private void btn_xoa_Click(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(txt_hoten.Text))
            {
                DialogResult result = MessageBox.Show("Bạn muốn xóa giáo viên " + txt_hoten.Text, "Thông báo", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                switch (result)
                {
                case DialogResult.OK:
                {
                    DataConnection.ThucThi("exec dbo.xoagiaovien N'" + txt_magv.Text + "'");
                    MessageBox.Show("xóa thành công giáo viên " + txt_hoten.Text, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    dtgr_DanhsachGV.DataSource = DataConnection.Danhsach("exec dbo.DanhSachGV").Tables[0];
                    break;
                }

                case DialogResult.Cancel:
                {
                    break;
                }
                }
            }
            else
            {
                MessageBox.Show("Vui lòng nhập tên giáo viên cần xóa ", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Exemple #2
0
        private void btn_xoa_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(txt_tendt.Text))
            {
                DialogResult result = MessageBox.Show("Bạn có muốn xóa đề tài " + txt_tendt.Text, "Thông báo", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                switch (result)
                {
                case DialogResult.OK:
                {
                    DataConnection.ThucThi("exec dbo.xoadetai N'" + txt_tendt.Text + "'");
                    MessageBox.Show("Xóa thành công đề tài " + txt_tendt.Text, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    dtgr_danhsachdetai.DataSource = DataConnection.Danhsach(query_dsdetai).Tables[0];
                    break;
                }

                case DialogResult.Cancel:
                {
                    break;
                }
                }
            }
            else
            {
                MessageBox.Show("Bạn vui lòng nhập tên đề tài cần xóa", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
        private void btn_xoa_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(txt_hoten.Text))
            {
                DialogResult result = MessageBox.Show("Bạn có muốn xóa", "Thông báo", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                switch (result)
                {
                case DialogResult.OK:
                {
                    DataConnection.ThucThi("exec dbo.XoaSV1 N'" + txt_hoten.Text + "'");
                    MessageBox.Show("Xóa thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    dtgr_danhsachSV.DataSource = DataConnection.Danhsach(query_dssv).Tables[0];
                    break;
                }

                case DialogResult.Cancel:
                {
                    break;
                }
                }
            }
            else
            {
                MessageBox.Show("Bạn chưa nhập thông tin", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Exemple #4
0
 private void btn_sua_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txt_tendt.Text))
     {
         DataConnection.ThucThi("exec dbo.suadetai N'" + txt_tendt.Text + "',N'" + txt_noidung.Text + "','" + dtp_ngaybd.Text + "','" + dtp_ngaykt.Text + "',N'" + cbb_giaovien.Text + "',N'" + cbb_chuyennganh.Text + "'");
         MessageBox.Show("Sửa thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
         dtgr_danhsachdetai.DataSource = DataConnection.Danhsach(query_dsdetai).Tables[0];
     }
     else
     {
         MessageBox.Show("Bạn vui lòng nhập tên đề tài cần sửa", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 private void btn_thaydoi_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txt_matkhaumoi.Text))
     {
         DataConnection.ThucThi("update dbo.taikhoan set matkhau=N'" + txt_matkhaumoi.Text + "' where tentaikhoan=N'" + txt_taikhoan.Text + "'");
         MessageBox.Show("Đã đổi mật khẩu", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
         panel_matkhaumoi.Visible = false;
     }
     else
     {
         MessageBox.Show("Bạn chưa nhập mật khẩu mới", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Exemple #6
0
 private void btn_sua_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txt_hoten.Text))
     {
         DataConnection.ThucThi("exec dbo.Suagiaovien N'" + txt_hoten.Text + "','" + dtp_ngaysinhgv.Value + "',N'" + cbb_bomon.Text + "'," + cbb_luong.Text + "");
         MessageBox.Show("sửa thành công giáo viên " + txt_hoten.Text, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
         dtgr_DanhsachGV.DataSource = DataConnection.Danhsach("exec dbo.DanhSachGV").Tables[0];
     }
     else
     {
         MessageBox.Show("Vui lòng nhập tên giáo viên cần sửa ", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 private void btn_sua_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txt_hoten.Text))
     {
         DataConnection.ThucThi("exec dbo.suasv N'" + txt_hoten.Text + "','" + dt_ngaysinh.Text + "',N'" + cbb_lopsh.Text + "',N'" + txt_diachi.Text + "',N'" + cbb_detai.Text + "',N'" + txt_noidungth.Text + "',N'" + cbb_vaitro.Text + "',N'" + cbb_ketqua.Text + "'");
         MessageBox.Show("Sửa thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
         dtgr_danhsachSV.DataSource = DataConnection.Danhsach(query_dssv).Tables[0];
     }
     else
     {
         MessageBox.Show("Bạn chưa nhập thông tin", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }