Exemple #1
0
 private void bt_xacnhan_Click(object sender, EventArgs e)
 {
     if (tb_ma.Text == "")
     {
         MessageBox.Show("bạn chưa điền thông tin", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         string query = "select *from dbo.ThiSinh ts join dbo.ChitietDK ct on ts.SBD=ct.SBD and ts.SBD=@ma";
         using (SqlConnection connection = new SqlConnection(Dataconection.conection))
         {
             connection.Open();
             SqlCommand command = new SqlCommand(query, connection);
             command.Parameters.AddWithValue("@ma", tb_ma.Text);
             SqlDataReader adapter = command.ExecuteReader();
             if (adapter.Read() == true)
             {
                 var model = from p in dt.ThiSinhs where (p.SBD == tb_ma.Text) select p.HoTen;
                 foreach (string item in model)
                 {
                     tb_hoten.Text = item;
                 }
                 Dataconection.sua("exec dbo._Xacnhan '" + tb_ma.Text + "'");
                 MessageBox.Show("Đã xác nhận!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
             else
             {
                 MessageBox.Show("Thí sinh không tồn tai!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
             connection.Close();
         }
     }
     dataGridView1.DataSource = Dataconection.Danhsach(query_dsxacnhan).Tables[0];
 }
Exemple #2
0
 public DanhsachHD()
 {
     InitializeComponent();
     lb_thongtin.Text = "Danh sách thành viên hội đồng";
     dataGridView1.DataSource = Dataconection.Danhsach(query_thanhvienHD).Tables[0];
     biding();
 }
Exemple #3
0
 private void bt_cap_Click(object sender, EventArgs e)
 {
     if (tb_mahd.Text != "" && tb_sbd.Text != "")
     {
         string query = "kiemtra @sbd,@mahd";
         using (SqlConnection connection = new SqlConnection(Dataconection.conection))
         {
             connection.Open();
             SqlCommand command = new SqlCommand(query, connection);
             command.Parameters.AddWithValue("@sbd", tb_sbd.Text);
             command.Parameters.AddWithValue("@mahd", tb_mahd.Text);
             SqlDataReader reader = command.ExecuteReader();
             if (reader.Read() == true)
             {
                 if (Dataconection.IsNumber(tb_sovanbang.Text) == true && Dataconection.IsNumber(tb_sovaoso.Text) == true)
                 {
                     add();
                     MessageBox.Show("Cấp thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                     dt_danhsach.DataSource = Dataconection.Danhsach(query_danhsachcap).Tables[0];
                 }
                 else
                 {
                     MessageBox.Show("Số văn bằng hoặc số vào sổ không hợp lệ!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 }
             }
             else
             {
                 MessageBox.Show("SBD hoặc MaHD không tồn tại!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
             connection.Close();
         }
     }
     else
     {
         MessageBox.Show("bạn chưa điền thông tin", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Exemple #4
0
 public Quanlithisinhdnagki()
 {
     InitializeComponent();
     dt_danhsachthisinh.DataSource = Dataconection.Danhsach(query_danhsachdk).Tables[0];
     biding();
 }
Exemple #5
0
 public QuanliDiem()
 {
     InitializeComponent();
     dt_danhsachdiem.DataSource = Dataconection.Danhsach(query_dsdiem).Tables[0];
     biding();
 }
Exemple #6
0
 public CapVanBang()
 {
     InitializeComponent();
     dt_danhsach.DataSource = Dataconection.Danhsach(query_danhsachcap).Tables[0];
 }
Exemple #7
0
 public FormXacNhan()
 {
     InitializeComponent();
     dataGridView1.DataSource = Dataconection.Danhsach(query_dsxacnhan).Tables[0];
 }
Exemple #8
0
 private void danhsachthutienToolStripMenuItem_Click(object sender, EventArgs e)
 {
     dataGridView1.DataSource = Dataconection.Danhsach(query_danhsachthutien).Tables[0];
 }
Exemple #9
0
 private void danhSáchthubaiToolStripMenuItem_Click(object sender, EventArgs e)
 {
     lb_thongtin.Text         = "Danh sách thu bài";
     dataGridView1.DataSource = Dataconection.Danhsach(query_thubai).Tables[0];
 }
Exemple #10
0
 public Home()
 {
     InitializeComponent();
     lb_thongtin.Text         = "Danh sách thí sinh đăng kí";
     dataGridView1.DataSource = Dataconection.Danhsach(query_thisinhdangki).Tables[0];
 }