Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- koneksikuDataContext dbku = new koneksikuDataContext();
- msemployee mep = new msemployee();
- DataGridView datagrid = new DataGridView();
- BindingSource bs = new BindingSource();
- var ambil = (from s in dbku.msemployees select s).First();
- datagrid.ColumnCount = 6;
- datagrid.AutoGenerateColumns = false;
- //DataTable dt = new DataTable();
- //SqlDataAdapter sda = new SqlDataAdapter();
- //sda.Fill(dt);
- datagrid.Columns[0].HeaderText = "EmployeeID";
- datagrid.Columns[0].DataPropertyName = "employeeid";
- datagrid.Columns[1].HeaderText = "Name";
- datagrid.Columns[1].DataPropertyName = "name";
- datagrid.Columns[2].HeaderText = "Email";
- datagrid.Columns[2].DataPropertyName = "email";
- datagrid.Columns[3].HeaderText = "Password";
- datagrid.Columns[3].DataPropertyName = "password";
- datagrid.Columns[4].HeaderText = "HandPhone";
- datagrid.Columns[4].DataPropertyName = "handphone";
- datagrid.Columns[5].HeaderText = "Position";
- datagrid.Columns[5].DataPropertyName = "position";
- this.datagrid.DataSource = datagrid;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement