Example #1
0
 public List<DTO.DTOTHIETBI> TimkiemTHIETBI(string Keyword)
 {
     List<DTO.DTOTHIETBI> list = new List<DTO.DTOTHIETBI>();
     DataTable dt = thietbi.TimkiemTHIETBI(Keyword);
     foreach(DataRow row in dt.Rows)
     {
         DTO.DTOTHIETBI e =new DTO.DTOTHIETBI();
         e.MATHIETBI=Int32.Parse(row["MATHIETBI"].ToString());
         e.TENTHIETBI=row["TENTHIETBI"].ToString();
         e.SOLUONG=Int32.Parse(row["SOLUONG"].ToString());
         list.Add(e);
     }
     return list;
 }
Example #2
0
 public List<DTO.DTOTHIETBI> LayTheoMaTHIETBI(int MATHIETBI)
 {
     List<DTO.DTOTHIETBI> list = new List<DTO.DTOTHIETBI>();
     DataTable dt = thietbi.LayTheoMaTHIETBI(MATHIETBI);
     foreach(DataRow row in dt.Rows)
     {
         DTO.DTOTHIETBI e =new DTO.DTOTHIETBI();
         e.MATHIETBI=Int32.Parse(row["MATHIETBI"].ToString());
         e.TENTHIETBI=row["TENTHIETBI"].ToString();
         e.SOLUONG=Int32.Parse(row["SOLUONG"].ToString());
         list.Add(e);
     }
     return list;
 }