示例#1
0
 public PhongInfo Phong_GetItem(int PhongID)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@PhongID", PhongID);
      SqlDataReader rd = SQLDB.executereader("sp_Phong_GetItem", CommandType.StoredProcedure);
      PhongInfo item = null;
     while (rd.Read())
     {
         item = new PhongInfo();
         item.PhongID = int.Parse(rd["PhongID"].ToString());
         item.PhongName = rd["PhongName"].ToString();
         item.LoaiPhongID = int.Parse(rd["LoaiPhongID"].ToString());
         item.TienNghiID = int.Parse(rd["TienNghiID"].ToString());
         item.SoGiuong = int.Parse(rd["SoGiuong"].ToString());
         item.SoNguoi = int.Parse(rd["SoNguoi"].ToString());
         item.TienNghiName = rd["TienNghiName"].ToString();
     }
     return item;
 }
示例#2
0
 public List<PhongInfo> Phong_GetItems([Optional,DefaultParameterValue(0)] int PhongID)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@PhongID", PhongID);
     SqlDataReader rd = SQLDB.executereader("sp_Phong_GetItems", CommandType.StoredProcedure);
     List<PhongInfo> list = new List<PhongInfo>();
     PhongInfo item = null;
     while (rd.Read())
     {
         item = new PhongInfo();
         item.PhongID = int.Parse(rd["PhongID"].ToString());
         item.PhongName = rd["PhongName"].ToString();
         item.LoaiPhongID = int.Parse(rd["LoaiPhongID"].ToString());
         item.LoaiPhongName = rd["LoaiPhongName"].ToString();
         item.SoGiuong = int.Parse(rd["SoGiuong"].ToString());
         item.SoNguoi = int.Parse(rd["SoNguoi"].ToString());
         item.TienNghiName = rd["TienNghiName"].ToString();
         list.Add(item);
     }
     return list;
 }
示例#3
0
 public List<PhongInfo> Phong_GetItemsOnService()
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SqlDataReader rd = SQLDB.executereader("sp_Phong_GetItemsOnService", CommandType.StoredProcedure);
     List<PhongInfo> list = new List<PhongInfo>();
     PhongInfo item = null;
     while (rd.Read())
     {
         item = new PhongInfo();
         item.PhongID = int.Parse(rd["PhongID"].ToString());
         item.PhongName = rd["PhongName"].ToString();
         list.Add(item);
     }
     return list;
 }