Beispiel #1
0
 public Quanlidetai()
 {
     InitializeComponent();
     dtgr_danhsachdetai.DataSource = DataConnection.Danhsach(query_dsdetai).Tables[0];
     loadchuyennganh();
     loadgiaovien();
 }
Beispiel #2
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);
            }
        }
Beispiel #3
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);
            }
        }
 public QuanLiSV()
 {
     InitializeComponent();
     dtgr_danhsachSV.DataSource = DataConnection.Danhsach(query_dssv).Tables[0];
     danhsachlop();
     danhsachdetai();
 }
        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);
            }
        }
 private void btn_timkiem_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txt_timkiem.Text))
     {
         dtgr_danhsachSV.DataSource = DataConnection.Danhsach("exec dbo.TimkiemSV N'%" + txt_timkiem.Text + "%'").Tables[0];
     }
     else
     {
         dtgr_danhsachSV.DataSource = DataConnection.Danhsach(query_dssv).Tables[0];
     }
 }
Beispiel #7
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);
     }
 }
Beispiel #8
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);
     }
 }
Beispiel #10
0
 private void btn_them_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txt_madt.Text))
     {
         if (DataConnection.kiemtra("select dbo.kiemtramadt('" + txt_madt.Text + "')") == false)
         {
             add();
             MessageBox.Show("Thêm 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];
         }
         else
         {
             MessageBox.Show("Mã " + txt_madt.Text + " đã tồn tại", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     else
     {
         MessageBox.Show("Bạn vui lòng nhập đầy đủ thông tin", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #11
0
 private void btn_them_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txt_magv.Text))
     {
         if (DataConnection.kiemtra("select dbo.kiemtraMGV('" + txt_magv.Text + "')") == false)
         {
             add();
             MessageBox.Show("Thêm 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("Ma " + txt_magv.Text + " đã tồn tại", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     else
     {
         MessageBox.Show("Bạn phải điền đấy đủ thông tin", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #12
0
 private void btn_them_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txt_ma.Text))
     {
         if (DataConnection.kiemtra("select dbo.kiemtraMSV(N'" + txt_ma.Text + "')") == false)
         {
             add();
             MessageBox.Show("Thêm thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
             dtgr_danhsachSV.DataSource = DataConnection.Danhsach(query_dssv).Tables[0];
         }
         else
         {
             MessageBox.Show("Mã " + txt_ma.Text + " đã tồn tại", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     else
     {
         MessageBox.Show("Bạn chưa nhập thông tin", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #13
0
 private void btn_timkiem_Click(object sender, EventArgs e)
 {
     dtgr_danhsachdetai.DataSource = DataConnection.Danhsach("exec dbo.timkiemdetai N'%" + txt_timkiem.Text + "%'").Tables[0];
 }
Beispiel #14
0
 public Home(string thongtin)
 {
     InitializeComponent();
     dtgr_danhsachsv.DataSource = DataConnection.Danhsach(query_dssv).Tables[0];
     lab_thongtin.Text          = thongtin;
 }
Beispiel #15
0
 public Home()
 {
     InitializeComponent();
     dtgr_danhsachsv.DataSource = DataConnection.Danhsach(query_dssv).Tables[0];
 }
Beispiel #16
0
 public QuanLiGiaoVien()
 {
     InitializeComponent();
     dtgr_DanhsachGV.DataSource = DataConnection.Danhsach("exec dbo.DanhSachGV").Tables[0];
     loadbomon();
 }