private void btnLOGSave_Click(object sender, EventArgs e) { try { DB.LOG_Update(); } catch (Exception ex) { Debug.Write(ex.ToString()); } }
private void btnLOGAddRow_Click(object sender, EventArgs e) { try { System.DateTime date = DateTime.UtcNow; DataRow row = DB.log_ds.Tables["LOG"].NewRow(); row["No"] = DB.log_ds.Tables["LOG"].Rows.Count + 1; row["Date"] = date.Date.ToShortDateString(); row["Time"] = date.ToUniversalTime().ToShortTimeString(); if (MainForm.udLOGMyNR.Value > 0) { row["MyNR"] = MainForm.udLOGMyNR.Value; } double freq = Math.Round(MainForm.VFOA * 1000, 1); string mode = MainForm.OpModeVFOA.ToString(); if (MainForm.TXSplit) { freq = Math.Round(MainForm.VFOB * 1000, 1); mode = MainForm.OpModeVFOB.ToString(); } string f = freq.ToString(); f = f.Replace(',', '.'); row["Freq"] = f; row["Mode"] = mode; row["Band"] = MainForm.CurrentBand.ToString().Replace("B", ""); DB.log_ds.Tables["LOG"].Rows.Add(row); DB.LOG_Update(); if (MainForm.udLOGMyNR.Value > 0) { MainForm.udLOGMyNR.Value++; } LOGStatistic(); } catch (Exception ex) { Debug.Write(ex.ToString()); } }
private void btnLOGEraseRow_Click(object sender, EventArgs e) { try { dataGridQSOLog.Rows.RemoveAt(dataGridQSOLog.SelectedRows[0].Index); DB.LOG_Update(); if (MainForm.udLOGMyNR.Value > 0) { MainForm.udLOGMyNR.Value = DB.log_ds.Tables["LOG"].Rows.Count + 1; } LOGStatistic(); } catch (Exception ex) { Debug.Write(ex.ToString()); } }