예제 #1
0
 protected override object GetDataFromDataRow(DataTable dt, int i)
 {
     ThamSoDTO tsDTO = new ThamSoDTO();
     //tsDTO.MaThamSo = int.Parse(dt.Rows[i]["MaThamSo"].ToString());
     tsDTO.TenThamSo = dt.Rows[i]["TenThamSo"].ToString();
     tsDTO.GiaTri = float.Parse(dt.Rows[i]["GiaTri"].ToString());
     //tsDTO.GhiChu = dt.Rows[i]["GhiChu"].ToString();
     return (object)tsDTO;
 }
예제 #2
0
 public ThamSoDTO[] getListThamSo()
 {
     strSQL = "Select TenThamSo ,GiaTri From THAMSO ";
     DataTable dt =  dp.ExecuteQuery(strSQL);
     ThamSoDTO[] tsDTOArr = new ThamSoDTO[dt.Rows.Count];
     for (int i = 0; i < dt.Rows.Count; i++)
     {
         object tsDTO = GetDataFromDataRow(dt, i);
         tsDTOArr[i] = (ThamSoDTO)tsDTO;
     }
     return tsDTOArr;
 }