/// <summary> /// 得到列表 /// </summary> /// <param name="ent"></param> /// <returns></returns> public List <BuWFRelationshipLog> GetBuWFRelationshipLogList(string Where) { List <BuWFRelationshipLog> list = new List <BuWFRelationshipLog>(); using (DbDataReader reader = DataBaseManage.ExecuteReader(DalSql + Where)) { while (reader.Read()) { BuWFRelationshipLog ent = new BuWFRelationshipLog(); SetEnt(ent, reader); list.Add(ent); } } return(list); }
/// <summary> /// 根据LogId得到 BuWFRelationshipLog 实体 /// </summary> /// <param name="ent"></param> /// <returns></returns> public BuWFRelationshipLog GetBuWFRelationshipLog(int LogId) { BuWFRelationshipLog ent = null; string sql = DalSql; sql = sql + " And LogId"; MySqlParameter[] paras = new MySqlParameter[] { new MySqlParameter("LogId", LogId) }; using (DbDataReader reader = DataBaseManage.ExecuteReader(sql, paras)) { if (reader.Read()) { ent = new BuWFRelationshipLog(); SetEnt(ent, reader); } } return(ent); }
public void SetEnt(BuWFRelationshipLog ent, IDataReader dr) { ent.LogId = MyConvert.ToInt(dr["LogId"]); ent.RelationshipId = MyConvert.ToInt(dr["RelationshipId"]); ent.Status = MyConvert.ToInt(dr["Status"]); }