using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using Hoi_Ton.Thu_vien_lop;
using Hoi_Ton.Du_lieu;
using System.Collections;
namespace Hoi_Ton.Man_hinh
{
public partial class MH_Dang_ky : Form
{
public MH_Dang_ky()
{
InitializeComponent();
}
string chuoiketnoi = "server=(local);database=hoiton;integrated security=sspi";
SqlConnection ketnoi;
SqlDataAdapter daDaotrang;
SqlCommand bolenh;
DataSet dtDaotrang;
SqlDataReader drDaotrang;
DataTable dtbl;
private void MH_Dang_ky_Load(object sender, EventArgs e)
{
ketnoi = new SqlConnection(chuoiketnoi);
string strCmd = "select madt,chitiet from t_ttindaotrang; select * from t_thongtin";
daDaotrang = new SqlDataAdapter(strCmd, ketnoi);
dtDaotrang = new DataSet();
daDaotrang.Fill(dtDaotrang);
dataGridViewDS.DataSource = dtDaotrang.Tables[1];
cbBoxDao_trang.DataSource = dtDaotrang.Tables[0];
cbBoxDao_trang.DisplayMember = "chitiet";
cbBoxDao_trang.ValueMember = "madt";
cbBoxDao_trang.Enabled = true;
this.cbBoxDao_trang.SelectedIndex = -1;
}