public void ShowEmployee() { da = new SqlDataAdapter("Select *from getSaraly", cd.ActiveCon()); ds.Tables[0].Clear(); da.Fill(ds, "Q"); DGV_Employee.DataSource = ds.Tables["Q"]; DGV_Employee.Columns[0].HeaderText = "ລະຫັດ"; DGV_Employee.Columns[1].HeaderText = "ຊື່"; DGV_Employee.Columns[2].HeaderText = "ນາມສະກຸນ"; DGV_Employee.Columns[3].HeaderText = "ຕຳແໜ່ງ"; DGV_Employee.Columns[0].Width = 90; DGV_Employee.Columns[1].Width = 120; DGV_Employee.Columns[2].Width = 120; DGV_Employee.Columns[3].Width = 140; DGV_Employee.Refresh(); }
public void Showdata() { da = new SqlDataAdapter("Select A.EmployeeID,A.Sex,A.EmployeeName,A.EmployeeSurname,A.birth,A.Age,A.Tel,A.Tel1,A.Village,A.District,A.Country,C.DepartmentName,D.ShiftName,B.PositionName,A.PathPicture from Employee As A join Position as B on A.PositionID=B.PositionID join Department as C on A.DepartmentID=C.DepartmentID join Shift as D on A.ShiftID = D.ShiftID", cd.ActiveCon()); da.Fill(ds, "j"); ds.Tables[0].Clear(); da.Fill(ds, "j"); DGV_Employee.DataSource = ds.Tables[0]; DGV_Employee.Columns[0].HeaderText = "ລະຫັດ"; DGV_Employee.Columns[1].HeaderText = "ເພດ"; DGV_Employee.Columns[2].HeaderText = "ຊື່"; DGV_Employee.Columns[3].HeaderText = "ນາມສະກຸນ"; DGV_Employee.Columns[4].HeaderText = "ວ/ດ/ປ"; DGV_Employee.Columns[5].HeaderText = "ອາຍຸ"; DGV_Employee.Columns[6].HeaderText = "ເບີມືຖື"; DGV_Employee.Columns[7].HeaderText = "ຕັ້ງໂຕ"; DGV_Employee.Columns[8].HeaderText = "ບ້ານ"; DGV_Employee.Columns[9].HeaderText = "ເມືອງ"; DGV_Employee.Columns[10].HeaderText = "ແຂວງ"; DGV_Employee.Columns[11].HeaderText = "ພະແນກ"; DGV_Employee.Columns[12].HeaderText = "ກະວຽກ"; DGV_Employee.Columns[13].HeaderText = "ຕໍາແໜ່ງ"; DGV_Employee.Columns[14].HeaderText = "ຂໍ້ມູນຮູບພາບ"; DGV_Employee.Columns[0].Width = 90; DGV_Employee.Columns[1].Width = 120; DGV_Employee.Columns[2].Width = 160; DGV_Employee.Columns[3].Width = 150; DGV_Employee.Columns[4].Width = 160; DGV_Employee.Columns[5].Width = 90; DGV_Employee.Columns[6].Width = 120; DGV_Employee.Columns[7].Width = 120; DGV_Employee.Columns[8].Width = 120; DGV_Employee.Columns[9].Width = 120; DGV_Employee.Columns[10].Width = 120; DGV_Employee.Columns[11].Width = 120; DGV_Employee.Columns[12].Width = 120; DGV_Employee.Columns[13].Width = 120; DGV_Employee.Columns[14].Width = 100; DGV_Employee.Refresh(); }