/// <summary> /// Work /// </summary> protected override void DoWork() { _summary = new StringBuilder(); // Get Schemata if (_modelLocal.GetC_AcctSchema_ID() == 0) { _ass = MAcctSchema.GetClientAcctSchema(GetCtx(), _modelLocal.GetAD_Client_ID()); } else // only specific accounting schema { _ass = new MAcctSchema[] { new MAcctSchema(GetCtx(), _modelLocal.GetC_AcctSchema_ID(), null) }; } // PostSession(); MCost.Create(_clientLocal); // int no = _modelLocal.DeleteLog(); _summary.Append("Logs deleted=").Append(no); // MAcctProcessorLog pLog = new MAcctProcessorLog(_modelLocal, _summary.ToString()); pLog.SetReference("#" + Utility.Util.GetValueOfString(_runCount) // String.valueOf(p_runCount) + " - " + TimeUtil.FormatElapsed(_startWork)); //new DateTime(_startWork))); pLog.Save(); }
/// <summary> /// Accounting Processor /// </summary> /// <param name="model">model </param> public AcctProcessor(MAcctProcessor model) : base(model, 30) // 30 seconds delay { _modelLocal = model; _clientLocal = MClient.Get(model.GetCtx(), model.GetAD_Client_ID()); }