Example #1
0
 /// <summary>
 /// 拷贝对象内容
 /// </summary>
 /// <param name="Oject"></param>
 protected void DeepCopy(EtAntennalnfo Oject)
 {
     try
     {
         if (Oject != null)
         {
             this._AntennaID        = Oject.AntennaID;
             this._CELLID           = Oject.CELLID;
             this._AntennaType      = Oject.AntennaType;
             this._Lng              = Oject.Lng;
             this._Lat              = Oject.Lat;
             this._Direction        = Oject.Direction;
             this._DownTilt         = Oject.DownTilt;
             this._Height           = Oject.Height;
             this._CarrierID        = Oject.CarrierID;
             this._RsPower          = Oject.RsPower;
             this._Burthen          = Oject.Burthen;
             this._ModelType        = Oject.ModelType;
             this._RadiusKm         = Oject.RadiusKm;
             this._ResolutionMetres = Oject.ResolutionMetres;
         }
     }
     catch (Exception ex)
     {
         JLog.Instance.MethodName = MethodBase.GetCurrentMethod().Name;
         JLog.Instance.Error(ex.Message);
     }
 }
Example #2
0
        /****1个主键***/
        /// <summary>
        /// 根据主键获取对象
        /// </summary>
        /// <param name="id"></param>
        internal EtAntennalnfo(int id)
        {
            using (SqlConnection conn = new SqlConnection(SQLDBHelper.ConnectionString))
            {
                EtAntennalnfo Relse = null;
                /****1个主键***/
                string sql = "SELECT * FROM [Antennalnfo] WHERE AntennaID = '" + id.ToString() + "'";

                using (var cnn = new SqlConnection(SQLDBHelper.ConnectionString))
                {
                    cnn.Open();
                    Relse = cnn.Query <EtAntennalnfo>(sql, null).Single();
                    cnn.Close();
                    if (Relse != null)
                    {
                        DeepCopy(Relse);
                    }
                }
            }
        }