public void GetMaLoaiDGFromLoaiDG(TheDocGiaDTO tdgDTO, QDLoaiDocGiaDTO ldgDTO) { Dictionary <string, string> temp = new Dictionary <string, string>(); DataTable data = ldgDAL.LoadBangLoaiDG(); for (int i = 0; i < data.Rows.Count; ++i) { // key: Ten loai doc gia - value: Ma loai doc gia temp.Add(data.Rows[i][1].ToString(), data.Rows[i][0].ToString()); } if (temp.ContainsKey(ldgDTO.Loaidg)) { tdgDTO.Maloaidg = temp[ldgDTO.Loaidg]; } }
public DataTable LoadBangLoaiDG() { return(ldgDAL.LoadBangLoaiDG()); }