Example #1
0
        public void ProcessRegistration(DateTime _dateRegistration)
        {
            try
            {
                DateTime dtRegistroLocal = Convert.ToDateTime(_dtParam.ConsultaDtParametro());

                _objectToQuery.DtRegistro = _dateRegistration;

                if (String.IsNullOrEmpty(dtRegistroLocal.ToString()))
                {
                    _dtParam.InsertDtRegistro(_objectToQuery);
                }
                else
                {
                    _dtParam.UpdateDtRegistro(_objectToQuery);
                }
                _LogReg.InsertLogProcessamento(_objectToQuery);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Example #2
0
        private static void CallGetDataJIRA()
        {
            try
            {
                _JIRA.GetDataJIRA();
                _JIRA.ProcessRegistration(DateTime.Now); //Alterar para a tabela dbo.Parametro
            }
            catch (Exception e)
            {
                string erro  = e.Message.ToString();
                string etapa = e.StackTrace.ToString();

                LogProcessamento logModel = new LogProcessamento
                {
                    dscErroProcessamento = erro,
                    etapaProcessamento   = etapa,
                    flgErroProcessamento = true,
                    dtProcessamento      = DateTime.Now
                };

                LogProcessamentoRepository _LogReg = new LogProcessamentoRepository();
                _LogReg.InsertLogProcessamento(logModel);
            }
        }