public void EnviarLoteContabil() { LoteContabil lote = null; using (var loteContabilWS = new LoteContabilWS()) { loteContabilWS.UrlWsLoteContabil = this.UrlWsLoteContabil; loteContabilWS.TimeoutWS = this.TimeoutWS; lock (this.ObjectLock) lote = this.LoteContabilRepository.BuscarLoteContabil(); while (lote != null) { var retornoWS = loteContabilWS.EnviarLoteContabil(this.ConverterLoteContabil(lote)); if (retornoWS != null) { lock (this.ObjectLock) this.LoteContabilRepository.InserirNumeroLote(lote, retornoWS.erroExecucao, retornoWS.numLot); } lock (this.ObjectLock) lote = this.LoteContabilRepository.BuscarLoteContabil(); } } }
private void IndexarFormulario(LoteContabil loteAnt) { lookUpMatriz1.FindSetMatriz(loteAnt.Matriz); txtDescricao.Text = loteAnt.DescricaoLote; dtInicial.DateTime = loteAnt.DataInicial; dtFinal.DateTime = loteAnt.DataFinal.Value; }
//adição public XFrmAddLancamentoContabil(Usuario _currentUser, LoteContabil _lote = null) : this() { this._currentUser = _currentUser; this._lote = _lote; this.partidas = new List <PartidaContabil>(); if (_lote != null) { lookUpMatriz1.FindSetMatriz(_lote.Matriz); } refreshGrid(); }
private gerarlotectbGerar2In ConverterLoteContabil(LoteContabil lote) { return(new gerarlotectbGerar2In() { codEmp = lote.CODEMP, codFil = lote.CODFIL, oriLot = lote.ORILCT, desLot = lote.DESLOT, totLot = lote.TOTINFS, datLot = lote.DATLOT, tipLot = "MAN", codEmpSpecified = true, codFilSpecified = true, totLotSpecified = true }); }
public bool Update(LoteContabil novo) { try { using (var ctx = new BalcaoContext()) { var current = ctx.LoteContabilDao.Find(novo.IdLote); current.Update(novo); return(ctx.LoteContabilDao.Update(current)); } } catch (Exception ex) { XMessageIts.ExceptionMessageDetails(ex, "Ocorreu um erro ao salvar o lote.", "Erro"); return(false); } }
public void InserirNumeroLote(LoteContabil lote, string erroExecucao, int?numLot) { if (lote != null) { this.Connection.Execute( Queries.INSERIR_NUMERO_LOTE, new { erroExecucao = erroExecucao, numLot = numLot?.ToString(), chave = lote.CHAVE.ToString(), empresa = lote.CODEMP, filial = lote.CODFIL, dataLote = lote.DATLOT, numeroLoteCRK = lote.NNUMLOTCRK }, commandType: CommandType.StoredProcedure); } }
public bool SaveLote(LoteContabil lote) { try { using (var ctx = new BalcaoContext()) { lote.Matriz = null; lote.newGuidID(); lote.NumeroLote = GetNewLoteNumber(); return(ctx.LoteContabilDao.Save(lote)); } } catch (Exception ex) { XMessageIts.ExceptionMessageDetails(ex, "Ocorreu um erro ao salvar o lote.", "Erro"); return(false); } }
private LoteContabil IndexarLote() { var descricao = txtDescricao.Text; var dtInicio = dtInicial.DateTime; var dtFim = dtFinal.DateTime; var matriz = lookUpMatriz1.Matriz; var l = new LoteContabil() { IdMatriz = matriz.IdMatriz, Matriz = matriz, DataInicial = dtInicio, DataFinal = dtFim, DescricaoLote = descricao, IdUsuario = _currentUser.IdUsuario, DataCriacao = DateTime.Now }; return(l); }
public XFrmAddLoteContabil(LoteContabil loteAnt, Usuario user) : this() { this._loteAnterior = loteAnt; this._currentUser = user; IndexarFormulario(loteAnt); }
public XFrmLancamentosContabeisView(Usuario currentUser, LoteContabil lote) : this() { this._currentUser = currentUser; this._lote = lote; this.Text = "Lançamentos contábeis: " + "- Lote: " + lote.NumeroLote + " - " + lote.DescricaoLote; }