//Записать результат комманды в SubHistory private void EndSubLogCommand() { if (SubHistory != null) { try { if (SubHistory.HasRows()) { SubHistory.MoveLast(); SubHistory.Put("Status", CommandSubLog.Status); SubHistory.Put("ProcessLength", CommandSubLog.FromStart); SubHistory.Update(); } } catch (Exception ex) { AddErrorAboutHistory(ex); } } }
//Запись комманды в SubHistory private void BeginSubLogCommand() { if (SubHistory != null) { try { SubHistory.AddNew(); SubHistory.Put("Command", CommandSubLog.Name); SubHistory.Put("Time", CommandSubLog.StartTime); SubHistory.Put("Status", CommandSubLog.Status); SubHistory.Put("PeriodBegin", CommandSubLog.PeriodBegin); SubHistory.Put("PeriodEnd", CommandSubLog.PeriodEnd); SubHistory.Put("Mode", CommandSubLog.Mode); SubHistory.Put("CalcName", CommandSubLog.CalcName); SubHistoryId = SubHistory.GetInt("SubHistoryId"); SubHistory.Update(); } catch (Exception ex) { AddErrorAboutHistory(ex); } } }