- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
//запись в журнал расчетов
try
{
ompDataSet.OMP_History.AddOMP_HistoryRow(DateTime.Now, row["N"].ToString(), Convert.ToInt32(row["M"]), PS1I??0, PS1U??0, PS2I??0, PS2U??0, I1 / 1000, U1 / 1000, I2 / 1000, U2 / 1000, KZ, (Zone1.EditValue != null) ? Convert.ToDouble(Zone1.EditValue) : 0, (Zone2.EditValue != null) ? Convert.ToDouble(Zone2.EditValue) : 0, "", PS1_DeviceA.SelectedIndex, PS2_DeviceA.SelectedIndex, (Branch.Count > 0) ? true : false, "", "", "Время откл.: " + OffDT.DateTime.ToString("dd.MM.yyyy HH:mm") + "\n" + Lkz.ToolTip.Replace("\n", ";"));
omp_HistoryTableAdapter.Update(ompDataSet);
ompDataSet.OMP_History.AcceptChanges();
}
catch
{
XtraMessageBox.Show("Не удалось сохранить данные в журнал расчётов!", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
try
{
ompDataSet.Result.Clear();
ompDataSet.Result.AddResultRow(((KeyValuePair<string, int>)NumberVL.EditValue).Key, ((KeyValuePair<string, int>)NumberVL.EditValue).Value, PS1I ?? 0, PS1U ?? 0, PS1I ?? 0, PS2U ?? 0, Convert.ToDouble(I0_A.EditValue), Convert.ToDouble(U0_A.EditValue), Convert.ToDouble(I0_B.EditValue), Convert.ToDouble(U0_B.EditValue), Convert.ToDouble(I0_A_Eval.EditValue), Convert.ToDouble(U0_A_Eval.EditValue), Convert.ToDouble(I0_B_Eval.EditValue), Convert.ToDouble(U0_B_Eval.EditValue), Convert.ToDouble(Lkz.EditValue), Convert.ToDouble(Zone1.EditValue), Convert.ToDouble(Zone2.EditValue), (PS1_DeviceA.SelectedIndex == 0) ? "ЛИФП" : "ИМФ", (PS2_DeviceA.SelectedIndex == 0) ? "ЛИФП" : "ИМФ", GetCurrentUserName(), DateTime.Now, Branch.Count, PS1.Text, PS2.Text, Convert.ToDouble(LengthVL.EditValue), UsingForEval[0], UsingForEval[1], UsingForEval[2], UsingForEval[3], OffDT.DateTime);
ompDataSet.Result.AcceptChanges();
}
catch
{}