コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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
            });
        }
コード例 #4
0
        public JsonResult ShowAllBank()
        {
            BL_Bank db = new BL_Bank();

            return(new JsonResult {
                Data = db.SelectAllBank(), JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
コード例 #5
0
        public JsonResult EditBank(int BankID)
        {
            KeystoneProject.Buisness_Logic.MasterFinacialAccounts.BL_Bank objDBService = new BL_Bank();
            Bank        ServiceModl = new Bank();
            List <Bank> SearchList  = new List <Bank>();


            DataSet ds = objDBService.SelectAllServicesbyID(BankID);

            if (ds.Tables[0].Rows.Count > 0)
            {
                ServiceModl.BankID = ds.Tables[0].Rows[0]["BankID"].ToString();

                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    SearchList.Add(new Bank
                    {
                        BankID        = dr["BankID"].ToString(),
                        BankAccountID = dr["BankAccountID"].ToString(),
                        AccountName   = dr["AccountName"].ToString(),
                        AccountNumber = dr["BankAccountNo"].ToString(),
                        Address       = dr["Address"].ToString(),
                        CityID        = dr["CityID"].ToString(),
                        StateID       = dr["StateID"].ToString(),
                        CountryID     = dr["CountryID"].ToString(),
                        PhoneNo       = dr["PhoneNO"].ToString(),
                        MobileNo      = dr["MobileNo"].ToString(),
                        Fax           = dr["Fax"].ToString(),
                        EmailID       = dr["EmailID"].ToString(),
                        Pincode       = dr["PinCode"].ToString(),
                        ReferenceCode = dr["ReferenceCode"].ToString(),
                        City          = dr["CityName"].ToString(),
                        State         = dr["StateName"].ToString(),
                        Country       = dr["CountryName"].ToString(),
                        BankName      = dr["BankName"].ToString(),
                    });
                }
            }


            return(new JsonResult {
                Data = SearchList, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
コード例 #6
0
        public ActionResult AjaxMethod(string City)
        {
            KeystoneProject.Buisness_Logic.MasterFinacialAccounts.BL_Bank BL_obj = new BL_Bank();
            KeystoneProject.Models.MasterFinacialAccounts.Bank            obj    = new Bank();
            List <string> searchList = new List <string>();

            DataTable td = new DataTable();
            DataSet   ds = objbl.GetCity(City, "%");

            td = objbl.GetCountryStateID(Convert.ToInt16(ds.Tables[0].Rows[0]["CityID"].ToString()));

            obj.State     = td.Rows[0]["StateName"].ToString();
            obj.Country   = td.Rows[0]["CountryName"].ToString();
            obj.StateID   = td.Rows[0]["StateID"].ToString();
            obj.CountryID = td.Rows[0]["CountryID"].ToString();


            searchList.Add(obj.State);
            searchList.Add(obj.Country);
            searchList.Add(obj.StateID);
            searchList.Add(obj.CountryID);

            return(Json(searchList));
        }