public JsonResult RegistrarPersNatural(ClienteViewModel oClienteViewModel)
 {
     PersonaNatLN oPersNatLN = new PersonaNatLN();
     int resultado;
     resultado = oPersNatLN.RegistrarActualizarPersNatural(oClienteViewModel.PersNat);
     return Json(resultado);
 }
        /// <summary>
        /// Metodo para obtener los datos del cliente por tipo
        /// </summary>
        /// <param name="nPersId">Codigo del cliente</param>
        /// <param name="cTipo">Tipo de cliente</param>
        /// <returns></returns>
        public JsonResult CargoDatosCliente(int nPersId, string cTipo)
        {
            object cliente = null;

            if (cTipo == "N")
            {
                PersonaNatLN oPersNatLN = new PersonaNatLN();
                PersonaNat oPersNat = new PersonaNat();
                oPersNat = oPersNatLN.CargarDatosClienteNatural(nPersId);
                cliente = oPersNat;
            }
            else if (cTipo == "J")
            {
                PersonaJurLN oPersJurLN = new PersonaJurLN();
                PersonaJur oPersJur = new PersonaJur();
                oPersJur = oPersJurLN.CargarDatosClienteJuridico(nPersId);
                cliente = oPersJur;
            }

            return Json(JsonConvert.SerializeObject(cliente));
        }