public BE_Json getPaymentsAuthByCompanyCode(string companyCode) { //BL_Payment _blPayment = new BL_Payment(); //_blPayment.connectionString = AppConfig.DbConnection; //return _blPayment.getPaymentsAuthByCompanyCode(companyCode); BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Payment _blPayment = new BL_Payment(); _blPayment.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(_blPayment.getPaymentsAuthByCompanyCode(companyCode)); objJson = new BE_Json(); objJson.data = objListaAux; objJson.status = CManager.RESULTADO_WCF.OK; } catch (Exception ex) { objJson = new BE_Json(); objJson.data = "Hubo en error en servidor:" + ex.Message + ";" + ex.StackTrace + ";" + ex.ToString(); objJson.status = CManager.RESULTADO_WCF.ERROR; objJson.status = CManager.RESULTADO_WCF.ERROR; } finally { objListaAux = null; } return(objJson); }
public BE_Json CreatePayment(BE_Payment bePayment) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Payment _blPayment = new BL_Payment(); _blPayment.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(_blPayment.createPaymentGeneral(bePayment)); objJson = new BE_Json(); objJson.data = objListaAux; objJson.status = (!String.IsNullOrEmpty(objListaAux)) ? CManager.RESULTADO_WCF.OK : CManager.RESULTADO_WCF.ERROR; } catch (Exception ex) { objJson = new BE_Json(); objJson.data = "Hubo en error en servidor:" + ex.Message + ";" + ex.StackTrace + ";" + ex.ToString(); objJson.status = CManager.RESULTADO_WCF.ERROR; objJson.status = CManager.RESULTADO_WCF.ERROR; } finally { objListaAux = null; } return(objJson); }
public BE_Json updateUserAuth([FromBody] BE_PaymentAuth _paymentAuth) { //BL_Payment _blPayment = new BL_Payment(); //_blPayment.connectionString = AppConfig.DbConnection; //return _blPayment.updateUserAuth(_paymentAuth, _paymentAuth.userName); BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Payment _blPayment = new BL_Payment(); _blPayment.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(_blPayment.updateUserAuth(_paymentAuth, _paymentAuth.userName)); objJson = new BE_Json(); objJson.data = objListaAux; objJson.status = CManager.RESULTADO_WCF.OK; } catch (Exception ex) { objJson = new BE_Json(); objJson.data = "Hubo en error en servidor:" + ex.Message + ";" + ex.StackTrace + ";" + ex.ToString(); objJson.status = CManager.RESULTADO_WCF.ERROR; objJson.status = CManager.RESULTADO_WCF.ERROR; } finally { objListaAux = null; } return(objJson); }
public BE_Json GetPaymentGeneral([FromBody] BEPaymentFilter _bEPaymentFilter) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Payment _bL_Payment = new BL_Payment(); _bL_Payment.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(_bL_Payment.GetPaymentGeneral(_bEPaymentFilter)); objJson = new BE_Json(); objJson.data = objListaAux; objJson.status = CManager.RESULTADO_WCF.OK; } catch (Exception ex) { objJson = new BE_Json(); objJson.data = "Hubo en error en servidor:" + ex.Message + ";" + ex.StackTrace + ";" + ex.ToString(); objJson.status = CManager.RESULTADO_WCF.ERROR; objJson.status = CManager.RESULTADO_WCF.ERROR; } finally { objListaAux = null; } return(objJson); }
public BE_Json ClientPayment(BE_Payment bePayment) { //BL_Payment _blPayment = new BL_Payment(); //_blPayment.connectionString = AppConfig.DbConnection; //return _blPayment.reversePayment(bePaymentAuth, bePaymentAuth.userName); BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Payment _blPayment = new BL_Payment(); _blPayment.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(_blPayment.RegisterClientPayment(bePayment)); objJson = new BE_Json(); objJson.data = objListaAux; objJson.status = (!String.IsNullOrEmpty(objListaAux))? CManager.RESULTADO_WCF.OK: CManager.RESULTADO_WCF.ERROR; } catch (ApplicationException ae) { objJson = new BE_Json(); objJson.data = "\"" + ae.Message + "\""; objJson.status = CManager.RESULTADO_WCF.ERROR; } catch (Exception ex) { objJson = new BE_Json(); objJson.data = "Hubo en error en servidor:" + ex.Message + ";" + ex.StackTrace + ";" + ex.ToString(); objJson.status = CManager.RESULTADO_WCF.ERROR; objJson.status = CManager.RESULTADO_WCF.ERROR; } finally { objListaAux = null; } return(objJson); }
public HttpResponseMessage getTxtBank(int paymentAuthId, int bankAccountId) { BL_Payment _blPayment = new BL_Payment(); _blPayment.connectionString = AppConfig.DbConnection; //return _blPayment.getTxtPaymentAuth(paymentAuthId, bankAccountId); string _filename = string.Empty; Stream _filecontent = _blPayment.getTxtPaymentAuth(paymentAuthId, bankAccountId, ref _filename); //String headerInfo = "attachment; filename=" + _filename + ".txt"; //System.ServiceModel.Web.WebOperationContext.Current.OutgoingResponse.Headers["Content-Disposition"] = headerInfo; //System.ServiceModel.Web.WebOperationContext.Current.OutgoingResponse.ContentType = "application/octet-stream"; HttpResponseMessage response = new HttpResponseMessage(); response.StatusCode = HttpStatusCode.OK; response.Content = new StreamContent(_filecontent); response.Content.Headers.ContentDisposition = new System.Net.Http.Headers.ContentDispositionHeaderValue("attachment") { FileName = _filename + ".txt" }; return(response); }