public CoQuan(string tenfile) { StreamReader f = new StreamReader(tenfile); while (true) { string st = f.ReadLine(); if (string.IsNullOrEmpty(st)) { break; } string [] ds = st.Split(';'); CanBo cb = new CanBo(ds[0], ds[1], bool.Parse(ds[2]), ds[3], DateTime.Parse(ds[4]), double.Parse(ds[5]), ds[6]); dsCanBo.Add(cb); } }
public void Them(string ma, string hoten, bool gioitinh, string diachi, DateTime ngaysinh, double hesoluong, string tendonvi) { CanBo cb = new CanBo(ma, hoten, gioitinh, diachi, ngaysinh, hesoluong, tendonvi); dsCanBo.Add(cb); }