Exemple #1
0
 public void SetEnt(BuGPSLog ent, IDataReader dr)
 {
     ent.GPSLogId = MyConvert.ToInt(dr["GPSLogId"]);
     ent.SynchronizationStatus = MyConvert.ToString(dr["SynchronizationStatus"]);
     ent.SynchronizationDate   = MyConvert.ToDateTime(dr["SynchronizationDate"]);
     ent.SynchronizationInfo   = MyConvert.ToString(dr["SynchronizationInfo"]);
 }
Exemple #2
0
        /// <summary>
        /// 得到列表
        /// </summary>
        /// <param name="ent"></param>
        /// <returns></returns>
        public List <BuGPSLog> GetBuGPSLogList(string Where)
        {
            List <BuGPSLog> list = new List <BuGPSLog>();

            using (DbDataReader reader = DataBaseManage.ExecuteReader(DalSql + Where))
            {
                while (reader.Read())
                {
                    BuGPSLog ent = new BuGPSLog();
                    SetEnt(ent, reader);
                    list.Add(ent);
                }
            }
            return(list);
        }
Exemple #3
0
        /// <summary>
        /// 根据GPSLogId得到 BuGPSLog 实体
        /// </summary>
        /// <param name="ent"></param>
        /// <returns></returns>
        public BuGPSLog GetBuGPSLog(int GPSLogId)
        {
            BuGPSLog ent = null;
            string   sql = DalSql;

            sql = sql + " And  GPSLogId";
            MySqlParameter[] paras = new MySqlParameter[]
            {
                new MySqlParameter("GPSLogId", GPSLogId)
            };
            using (DbDataReader reader = DataBaseManage.ExecuteReader(sql, paras))
            {
                if (reader.Read())
                {
                    ent = new BuGPSLog();
                    SetEnt(ent, reader);
                }
            }
            return(ent);
        }