/// <summary> /// 得到列表 /// </summary> /// <param name="ent"></param> /// <returns></returns> public List <BuScheduleApply> GetBuScheduleApplyList(string Where) { List <BuScheduleApply> list = new List <BuScheduleApply>(); using (DbDataReader reader = DataBaseManage.ExecuteReader(DalSql + Where)) { while (reader.Read()) { BuScheduleApply ent = new BuScheduleApply(); SetEnt(ent, reader); list.Add(ent); } } return(list); }
/// <summary> /// 根据ApplyId得到 BuScheduleApply 实体 /// </summary> /// <param name="ent"></param> /// <returns></returns> public BuScheduleApply GetBuScheduleApply(string ApplyId) { BuScheduleApply ent = null; string sql = DalSql; sql = sql + " And ApplyId"; MySqlParameter[] paras = new MySqlParameter[] { new MySqlParameter("ApplyId", ApplyId) }; using (DbDataReader reader = DataBaseManage.ExecuteReader(sql, paras)) { if (reader.Read()) { ent = new BuScheduleApply(); SetEnt(ent, reader); } } return(ent); }
public void SetEnt(BuScheduleApply ent, IDataReader dr) { ent.ApplyId = MyConvert.ToString(dr["ApplyId"]); ent.ApplyMan = MyConvert.ToString(dr["ApplyMan"]); ent.ApplyDate = MyConvert.ToDateTime(dr["ApplyDate"]); }