public AdminPowerInfo getDataByID(int ap_id) { AdminPowerInfo info = new AdminPowerInfo(); IDataReader reader = db.GetDataByID(ap_id).CreateDataReader(); while (reader.Read()) { info = AdminPowerInfo.Populate(reader); } return(info); }
public IList <AdminPowerInfo> getDataByaId(int aId) { List <AdminPowerInfo> infos = new List <AdminPowerInfo>(); IDataReader reader = db.GetDataByaId(aId).CreateDataReader(); while (reader.Read()) { infos.Add(AdminPowerInfo.Populate(reader)); } return(infos); }
public AdminPowerInfo getAllaIdNo1No2(int a_id, int fi_no1, int fi_no2) { AdminPowerInfo info = new AdminPowerInfo(); IDataReader reader = db.GetDataByaIdNo1No2(a_id, fi_no1, fi_no2).CreateDataReader(); while (reader.Read()) { info = AdminPowerInfo.Populate(reader); } return(info); }