Example #1
0
 public void LogQso(QsoModel qso)
 {
     using (MySqlCommand cmd = m_Connection.CreateCommand())
     {
         cmd.CommandText = "INSERT INTO qsos (session, date, band, mode, callsign, rsttx, rstrx) VALUES (?session, ?date, ?band, ?mode, ?callsign, ?rsttx, ?rstrx);";
         cmd.Parameters.AddWithValue("?session", 0);
         cmd.Parameters.AddWithValue("?date", DateTime.Parse(qso.Date));
         cmd.Parameters.AddWithValue("?band", qso.Band);
         cmd.Parameters.AddWithValue("?mode", qso.Mode);
         cmd.Parameters.AddWithValue("?callsign", qso.Callsign);
         cmd.Parameters.AddWithValue("?rsttx", qso.RstTx);
         cmd.Parameters.AddWithValue("?rstrx", qso.RstRx);
         cmd.ExecuteNonQuery();
     }
 }
Example #2
0
 public ActionResult AddQso(QsoModel qso)
 {
     new DataStore().LogQso(qso);
     return Json(qso);
 }