public BE_Json DeleteOptionGeneral(int optionId) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Option bL_Option = new BL_Option(AppConfig.DbConnection); //bL_Option.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(bL_Option.DeleteOptionGeneral(optionId)); 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 GetProgramationDetailByDateAndFeedingTimeId(DateTime date, int feedingTime) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Programation bL_Programation = new BL_Programation(); bL_Programation.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(bL_Programation.GetProgramationDetailByDateAndFeedingTimeId(date, feedingTime)); 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 GetInvoiceExpByCompany(string companyCode, string searchField) { //BL_Invoice _blInvoice = new BL_Invoice(); //_blInvoice.connectionString = AppConfig.DbConnection; //return _blInvoice.GetInvoiceById(_invoiceId); BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Invoice _blInvoice = new BL_Invoice(); _blInvoice.connectionString = AppConfig.DbConnection; List <VE_Invoice> a = new List <VE_Invoice>(); VE_Invoice b = new VE_Invoice(); a.Add(b); objListaAux = JsonConvert.SerializeObject(a); 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 GetProductByTypeId(string productTypeIdList) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Product bL_Product = new BL_Product(); bL_Product.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(bL_Product.GetProductByTypeId(productTypeIdList)); 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 AddInvoiceItem([FromBody] BE_InvoiceItem _beInvoiceItem) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Invoice _blInvoice = new BL_Invoice(); _blInvoice.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(_blInvoice.AddInvoiceItem(_beInvoiceItem)); 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 ValidatedNextWorkFlowStep(int workflowId, string username, int invoiceId) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_WorkFlow _blWorkFlow = new BL_WorkFlow(); _blWorkFlow.connectionString = AppConfig.DbConnection; bool bOk = _blWorkFlow.ValidatedNextWorkFlowStep(workflowId, invoiceId, username); objListaAux = JsonConvert.SerializeObject(bOk); 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 CreateProductCategory([FromBody] BE_ProductCategory bE_ProductCategory) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_ProductCategory bL_ProductCategory = new BL_ProductCategory(); bL_ProductCategory.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(bL_ProductCategory.CreateProductCategory(bE_ProductCategory)); objJson = new BE_Json(); objJson.data = (objListaAux == "null") ? "No se pudo crear" : objListaAux; objJson.status = (objListaAux == "null") ? CManager.RESULTADO_WCF.ERROR : 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; } finally { objListaAux = null; } return(objJson); }
public BE_Json DeleteBankAccount([FromBody] VE_BankAccount _VeBankAccount) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Bank _blBank = new BL_Bank(); _blBank.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(_blBank.DeleteBankAccount(_VeBankAccount)); 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 UpdateUserGeneral([FromBody] CreateUserGeneralViewModel viewModel) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Usuario _blUsuario = new BL_Usuario(); _blUsuario.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(_blUsuario.UpdateUserGeneral(viewModel.user, viewModel.CompanyCodeList, viewModel.RoleIdList, viewModel.authorize)); 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 GetUserRoleId() { //BL_Usuario _blUsuario = new BL_Usuario(); //_blUsuario.connectionString = AppConfig.DbConnection; //return _blUsuario.GetUserRoleId(); BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Usuario _blUsuario = new BL_Usuario(); _blUsuario.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(_blUsuario.GetUserRoleId()); 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 LoginValidation(string userName, string passwordHash, int LoginType = 0) { //BL_Usuario _blUsuario = new BL_Usuario(); //_blUsuario.connectionString = AppConfig.DbConnection; //return _blUsuario.LoginValidation(userName, passwordHash); BE_Json objJson = null; var objListaAux = string.Empty; BE_LoginType bE_LoginType = (BE_LoginType)LoginType; try { BL_Usuario _blUsuario = new BL_Usuario(); _blUsuario.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(_blUsuario.LoginValidation(userName, passwordHash, bE_LoginType)); 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 GetFeedingTimeByName(string name) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_FeedingTime bL_FeedingTime = new BL_FeedingTime(); bL_FeedingTime.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(bL_FeedingTime.GetFeedingTimeByName(name)); 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 GetProgramationByFilters(int month, int headquartersId, int dietId) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Programation bL_Programation = new BL_Programation(); bL_Programation.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(bL_Programation.GetProgramationByFilters(month, headquartersId, dietId)); 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 GetCostCenterGeneral([FromBody] BE_CostCenter bE_CostCenter) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_CostCenter bL_CostCenter = new BL_CostCenter(); bL_CostCenter.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(bL_CostCenter.GetCostCenterGeneral(bE_CostCenter.costCenterId)); 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 Get(string idDocumentType, string CompanyCode, string programationId, string DocumentId, int InvoiceStatudId) { //BL_Usuario _blUsuario = new BL_Usuario(); //_blUsuario.connectionString = AppConfig.DbConnection; //return _blUsuario.GetUserRoleId(); BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Schedule _blSchedule = new BL_Schedule(); _blSchedule.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(_blSchedule.GetScheduleGeneral(new BE_Schedule() { })); 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 AddDetractionToInvoice([FromBody] AddDetractionToInvoiceViewModel ViewModel) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_CostCenter bL_CostCenter = new BL_CostCenter(); bL_CostCenter.connectionString = AppConfig.DbConnection; string mensaje = string.Empty; bool bOk = bL_CostCenter.AddDetractionToInvoice(ref mensaje, ViewModel.AmountDetraction, ViewModel.invoiceId, ViewModel.Username); bL_CostCenter.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(mensaje); objJson = new BE_Json(); objJson.data = objListaAux; objJson.status = (bOk) ? 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 GetParameterDetailByIdParameterDetail(int idParameterDetail) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Parameter bL_Parameter = new BL_Parameter(); bL_Parameter.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(bL_Parameter.GetParameterDetailById(idParameterDetail)); 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 GetBankAccountById(int bankAccountId) { //BL_Bank _blBank = new BL_Bank(); //_blBank.connectionString = AppConfig.DbConnection; //return _blBank.GetBankAccountById(bankAccountId); BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Bank _blBank = new BL_Bank(); _blBank.connectionString = AppConfig.DbConnection; //return _blBank.GetCompanyBankBalance(companyCode); objListaAux = JsonConvert.SerializeObject(_blBank.GetBankAccountById(bankAccountId)); 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 CreateProduct([FromBody] BE_Product bE_Product) { logger.Debug("Ingresando CreateProduct step 1 : " + JsonConvert.SerializeObject(bE_Product)); BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Product bL_Product = new BL_Product(); bL_Product.connectionString = AppConfig.DbConnection; logger.Debug("CreateProduct step 2"); objListaAux = JsonConvert.SerializeObject(bL_Product.CreateProduct(bE_Product)); logger.Debug("CreateProduct step 3"); objJson = new BE_Json(); objJson.data = (objListaAux == "null") ? "No de pudo crear el producto: El código ya existe" : objListaAux; objJson.status = (objListaAux == "null")?CManager.RESULTADO_WCF.ERROR:CManager.RESULTADO_WCF.OK; logger.Debug("CreateProduct step 4"); } catch (Exception ex) { logger.Fatal(ex, "CreateProduct " + ex.Message); objJson = new BE_Json(); objJson.data = "Hubo en error en servidor:" + ex.Message + ";" + ex.StackTrace + ";" + ex.ToString(); objJson.status = CManager.RESULTADO_WCF.ERROR; } finally { objListaAux = null; } logger.Debug("CreateProduct step 5"); return(objJson); }
public BE_Json Refuse(string username, int invoiceId, string comment) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_WorkFlow _blWorkFlow = new BL_WorkFlow(); _blWorkFlow.connectionString = AppConfig.DbConnection; string mensaje = string.Empty; bool bOk = _blWorkFlow.NextWorkFlowStep(ref mensaje, 5, invoiceId, username, true, comment); _blWorkFlow.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(mensaje); objJson = new BE_Json(); objJson.data = objListaAux; objJson.status = (bOk) ? 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 UpdateProduct([FromBody] BE_Product bE_Product) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Product bL_Product = new BL_Product(); bL_Product.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(bL_Product.UpdateProduct(bE_Product)); objJson = new BE_Json(); objJson.data = (objListaAux == "null") ? "No se pudo editar el producto: El código ya existe" : objListaAux; objJson.status = (objListaAux == "null") ? CManager.RESULTADO_WCF.ERROR : 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 GetUnpaidCompanyInvoicesResumeDetail(string companyCode) { //BL_Invoice _blInvoice = new BL_Invoice(); //_blInvoice.connectionString = AppConfig.DbConnection; //return _blInvoice.GetUnpaidCompanyInvoicesResumeDetail(companyCode); BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Invoice _blInvoice = new BL_Invoice(); _blInvoice.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(_blInvoice.GetUnpaidCompanyInvoicesResumeDetail(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 GetOptionMenuByUserName(string userName, bool?isMenu) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Option bL_Option = new BL_Option(AppConfig.DbConnection); //bL_Option.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(bL_Option.GetOptionMenuByUserName(userName, (isMenu == null)? false: (bool)isMenu)); 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 PruebaMail([FromBody] MailContent mailContent) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Mail bL_Mail = new BL_Mail(); bL_Mail.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(bL_Mail.PruebaMail(mailContent)); 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 void TestMethod1() { var controller = new InvoiceController(); BEInvoiceFilter bEInvoiceFilter = new BEInvoiceFilter(); bEInvoiceFilter.invoiceIdList = "1"; bEInvoiceFilter.statusList = "P"; var result = controller.GetInvoiceGeneral(bEInvoiceFilter); BE_Json a = new BE_Json(); Assert.AreEqual("", ""); }
public BE_Json GetInvoiceByCompanyCodeAndType(string companyCode, string invoiceType, string invoiceStatusId) { BE_Json objJson = null; var objListaAux = string.Empty; try { BL_Invoice _blInvoice = new BL_Invoice(); _blInvoice.connectionString = AppConfig.DbConnection; List <VE_Invoice> result = null; if (invoiceType.ToUpper() == "O") { result = _blInvoice.GetInvoiceGeneral(new BEInvoiceFilter() { CompanyCodeTarget = companyCode, invoiceType = invoiceType, invoiceStatusId = 0 }); } else { result = _blInvoice.GetInvoiceByCompanyCodeAndType(companyCode, invoiceType, int.Parse(invoiceStatusId)); } objListaAux = JsonConvert.SerializeObject(result); 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 UpdateInvoiceGeneral([FromBody] VE_Invoice _VeInvoice) { BE_Json objJson = null; var objListaAux = string.Empty; if (_VeInvoice == null) { return(objJson); } try { BL_Invoice _blInvoice = new BL_Invoice(); _blInvoice.connectionString = AppConfig.DbConnection; objListaAux = JsonConvert.SerializeObject(_blInvoice.updateInvoiceGeneral(_VeInvoice)); objJson = new BE_Json(); objJson.data = objListaAux; objJson.status = CManager.RESULTADO_WCF.OK; } catch (ApplicationException ex) { objJson = new BE_Json(); objJson.data = ex.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 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); }