public LSH GetLSH(DataRow i) { LSH ls = new LSH(); foreach (DataRow item in CSDL.Instance.DTLSH.Rows) { if (item == i) { ls.ID_Lop = (int)item["ID_Lop"]; ls.NameLop = item["NameLop"].ToString(); } } return(ls); }
public List <LSH> GetAllLSH() { if (ListLSH != null) { ListLSH.Clear(); } else { ListLSH = new List <LSH>(); } foreach (DataRow item in CSDL.Instance.DTLSH.Rows) { LSH ls = new LSH(); ls.ID_Lop = (int)item["ID_Lop"]; ls.NameLop = item["NameLop"].ToString(); ListLSH.Add(ls); } return(ListLSH); }