public BE_Json DeleteBank([FromBody] VE_Bank _VeBank) { //BL_Bank _blBank = new BL_Bank(); //_blBank.connectionString = AppConfig.DbConnection; //return _blBank.DeleteBank(_VeBank); 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.DeleteBank(_VeBank)); 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 JsonResult DeleteBank(int BankID) { string _Del = null; try { KeystoneProject.Buisness_Logic.MasterFinacialAccounts.BL_Bank objdb = new BL_Bank(); Accounts objSG = new Models.MasterFinacialAccounts.Accounts(); int DependaincyName = objdb.DeleteBank(BankID); if (DependaincyName == 1) { _Del = "Bank Deleted Successfully"; } else { _Del = "Can not Delete"; } } catch (Exception ex) { throw ex; } return(new JsonResult { Data = _Del, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }