public override bool authenticate( ) { Registry("authenticate exec_pos_desfazVendaEmpresarialSITEF "); /// USER [ authenticate ] // ## Buscar terminal T_Loja loja = new T_Loja(this); var_codResp = "0606"; //alterado if (!loja.select_rows_loja(input_cont_pe.get_st_terminal().Substring(1).TrimStart('0'))) { output_st_msg = "Erro aplicativo1"; return(false); } if (!loja.fetch()) { output_st_msg = "Erro aplicativo2"; return(false); } // ## Buscar transação pelo terminal e pelo valor l_tr = new LOG_Transacoes(this); if (!l_tr.select_rows_loj_vr(loja.get_identity(), input_cont_pe.get_vr_valor(), input_cont_pe.get_st_nsuOrigemSITEF())) { output_st_msg = "Erro aplicativo3"; return(false); } l_tr.SetReversedFetch(); if (!l_tr.fetch()) { output_st_msg = "Erro aplicativo4"; return(false); } // ## Conferir se status já desfeito if (l_tr.get_tg_confirmada() == TipoConfirmacao.Desfeita) { var_codResp = "N3N3"; output_st_msg = "Trans. já desfeita"; return(false); } // ## Conferir se status dif de pendente if (l_tr.get_tg_confirmada() != TipoConfirmacao.Pendente) { output_st_msg = "Erro aplicativo5"; return(false); } term = new T_Terminal(this); if (!term.selectIdentity(l_tr.get_fk_terminal())) { output_st_msg = "Erro aplicativo6"; return(false); } var_codResp = "0000"; /// USER [ authenticate ] END Registry("authenticate done exec_pos_desfazVendaEmpresarialSITEF "); return(true); }
public override bool authenticate( ) { Registry("authenticate exec_pos_desfazVendaEmpresarial "); /// USER [ authenticate ] // ## Buscar terminal term = new T_Terminal(this); var_codResp = "0606"; if (!term.select_rows_terminal(input_cont_pe.get_st_terminal())) { output_st_msg = "Erro aplicativo"; return(false); } if (!term.fetch()) { output_st_msg = "Erro aplicativo"; return(false); } // ## Buscar transação pelo terminal e pelo valor l_tr = new LOG_Transacoes(this); if (!l_tr.select_rows_term_vr(term.get_identity(), input_cont_pe.get_vr_valor())) { output_st_msg = "Erro aplicativo"; return(false); } l_tr.SetReversedFetch(); if (!l_tr.fetch()) { output_st_msg = "Erro aplicativo"; return(false); } // ## Conferir se status já desfeito if (l_tr.get_tg_confirmada() == TipoConfirmacao.Desfeita) { var_codResp = "N3N3"; output_st_msg = "Trans. já desfeita"; return(false); } // ## Conferir se status dif de pendente if (l_tr.get_tg_confirmada() != TipoConfirmacao.Pendente) { output_st_msg = "Erro aplicativo"; return(false); } var_codResp = "0000"; /// USER [ authenticate ] END Registry("authenticate done exec_pos_desfazVendaEmpresarial "); return(true); }