public void XemThongTin() { Console.WriteLine("\n\tMa: " + Ma); Console.WriteLine("\tTen: " + Ten); Console.WriteLine("\tTuoi: " + Tuoi); Console.WriteLine("\tPhong Ban: " + Phong.ToString()); Console.WriteLine("\tVai tro: " + VaiTro.ToString()); }
public void hienthi() { listView4.Items.Clear(); DataTable dtb = DNV.Load_NV(); i = 0; foreach (DataRow row in dtb.Rows) { if (row[2].ToString() == "1") { Sex = "Nam"; } else if (row[2].ToString() == "2") { Sex = "Nữ"; } else { Sex = "Khác"; } if (row[6].ToString() == "1") { PhongBan = "Quản lý"; } else if (row[6].ToString() == "2") { PhongBan = "Kỹ Thuật"; } else { PhongBan = "Kế Toán"; } var date = DateTime.Parse(row[3].ToString()); listView4.Items.Add((i + 1).ToString()); listView4.Items[i].SubItems.Add(row[0].ToString()); listView4.Items[i].SubItems.Add(row[1].ToString()); listView4.Items[i].SubItems.Add(Sex.ToString()); listView4.Items[i].SubItems.Add(date.ToString("dd/MM/yyyy")); listView4.Items[i].SubItems.Add(row[4].ToString()); listView4.Items[i].SubItems.Add(row[5].ToString()); listView4.Items[i].SubItems.Add(PhongBan.ToString()); listView4.Items[i].SubItems.Add(row[7].ToString()); i++; } }