Esempio n. 1
0
 public static string GenerateInsertSql(this FileRecord2G stat, string tableName)
 {
     return("INSERT INTO [" + tableName
            + "] ( [rasterNum],[testTime],[lon],[lat],[refPN],[EcIo],[rxAGC],[txAGC],[txPower],[txGain]) VALUES("
            + stat.RasterNum
            + ",'" + stat.TestTimeString
            + "'," + stat.Longtitute
            + "," + stat.Lattitute
            + "," + (stat.Pn == null ? "NULL" : stat.Pn.ToString())
            + "," + (stat.Ecio == null ? "NULL" : stat.Ecio.ToString())
            + "," + (stat.RxAgc == null ? "NULL" : stat.RxAgc.ToString())
            + "," + (stat.TxAgc == null ? "NULL" : stat.TxAgc.ToString())
            + "," + (stat.TxPower == null ? "NULL" : stat.TxPower.ToString())
            + "," + (stat.TxGain == null ? "NULL" : stat.TxGain.ToString()) + ")");
 }
Esempio n. 2
0
 public void Test_FileRecordCoverage2G()
 {
     var record = new FileRecord2G
     {
         Ecio = null,
         Lattitute = 112.3344,
         Longtitute = null,
         RxAgc = 1.2,
         TxPower = null
     };
     var view = record.MapTo<FileRecordCoverage2G>();
     view.Ecio.ShouldBe(0);
     view.Longtitute.ShouldBe(0);
     view.Lattitute.ShouldBe(112.3344);
     view.RxAgc.ShouldBe(1.2);
     view.TxPower.ShouldBe(0);
 }