예제 #1
0
파일: BuAddress.cs 프로젝트: qq5013/JXNG
 /// <summary>
 /// 得到列表
 /// </summary>
 /// <param name="ent"></param>
 /// <returns></returns>
 public List<BuAddress> GetBuAddressList(string Where)
 {
     List<BuAddress> list = new List<BuAddress>();
     using(DbDataReader reader = DataBaseManage.ExecuteReader(DalSql+Where))
     {
         while (reader.Read())
         {
            BuAddress ent = new BuAddress();
             SetEnt(ent, reader);
             list.Add(ent);
         }
     }
     return list;
 }
예제 #2
0
        /// <summary>
        /// 得到列表
        /// </summary>
        /// <param name="ent"></param>
        /// <returns></returns>
        public List <BuAddress> GetBuAddressList(string Where)
        {
            List <BuAddress> list = new List <BuAddress>();

            using (DbDataReader reader = DataBaseManage.ExecuteReader(DalSql + Where))
            {
                while (reader.Read())
                {
                    BuAddress ent = new BuAddress();
                    SetEnt(ent, reader);
                    list.Add(ent);
                }
            }
            return(list);
        }
예제 #3
0
파일: BuAddress.cs 프로젝트: qq5013/JXNG
 /// <summary>
 /// 根据Id得到 BuAddress 实体
 /// </summary>
 /// <param name="ent"></param>
 /// <returns></returns>
 public BuAddress GetBuAddress(int Id)
 {
     BuAddress ent = null;
     string sql = DalSql;
     sql = sql + " And  Id";
     MySqlParameter[] paras = new MySqlParameter[]
     {
         new MySqlParameter("Id",Id)
     };
     using(DbDataReader reader = DataBaseManage.ExecuteReader(sql, paras))
     {
         if (reader.Read())
         {
             ent = new BuAddress();
             SetEnt(ent, reader);
         }
        		}
     return ent;
 }
예제 #4
0
        /// <summary>
        /// 根据Id得到 BuAddress 实体
        /// </summary>
        /// <param name="ent"></param>
        /// <returns></returns>
        public BuAddress GetBuAddress(int Id)
        {
            BuAddress ent = null;
            string    sql = DalSql;

            sql = sql + " And  Id";
            MySqlParameter[] paras = new MySqlParameter[]
            {
                new MySqlParameter("Id", Id)
            };
            using (DbDataReader reader = DataBaseManage.ExecuteReader(sql, paras))
            {
                if (reader.Read())
                {
                    ent = new BuAddress();
                    SetEnt(ent, reader);
                }
            }
            return(ent);
        }
예제 #5
0
 public void SetEnt(BuAddress ent, IDataReader dr)
 {
     ent.Id          = MyConvert.ToInt(dr["Id"]);
     ent.AddressName = MyConvert.ToString(dr["AddressName"]);
 }
예제 #6
0
파일: BuAddress.cs 프로젝트: qq5013/JXNG
 public void SetEnt(BuAddress ent, IDataReader dr)
 {
     ent.Id = MyConvert.ToInt(dr["Id"]);
     ent.AddressName = MyConvert.ToString(dr["AddressName"]);
 }