protected void btnBuscarCliente_Click(object sender, EventArgs e) { string filtroBusqueda = txtCliente.Text; gvClientes.DataSource = ClienteManager.GetClienteByRazonSocialOrCuil(filtroBusqueda); gvClientes.DataBind(); }
public ActionResult AgregarCarrito() { ClienteManager cm = new ClienteManager(); ViewBag.dni_clientes = new SelectList(cm.List(), "dni_clientes", "apenom_cli"); return(View()); }
public override void EmiteNotadeCredito(string facturaNo) { ClienteManager Cm = new ClienteManager(); totales = new TotalapagarView(); totales.cliente = Cm.GetCliente(facturaNo); Cliente cliente = totales.cliente; TicketDetalleManager TDMNgr = new TicketDetalleManager(); lista = TDMNgr.GetList(facturaNo); string NumeroSerial = new string(' ', 15); int iRetorno = BemaFI32.Bematech_FI_NumeroSerie(ref NumeroSerial); DateTime cDate = DateTime.Now; var cDia = cDate.Day.ToString("D2"); var cMes = cDate.Month.ToString("D2"); var cAno = cDate.Year.ToString().Substring(2, 2); var cHora = cDate.Hour.ToString("D2"); var cMinuto = cDate.Minute.ToString("D2"); var cSegundo = cDate.Second.ToString("D2"); var cCOO = facturaNo; iRetorno = BemaFI32.Bematech_FI_AbreNotaDeCredito(cliente.Nombre, NumeroSerial, cliente.Identificacion, cDia, cMes, cAno, cHora, cMinuto, cSegundo, cCOO); VendeProductos(); Descuento(); iRetorno = BemaFI32.Bematech_FI_FinalizarCierreCupon("Gracias, vuelva siempre !!!"); }
public void createDetalleInversionVista(string cuenta) { DetalleIV = new ObservableCollection<DetalleInversionVistaItemsViewModel>(); _cliente = (Application.Current as App).cliente; this._cuenta = cuenta; this._cliente.llenarListaCuentas(DetalleIV,cuenta); }
public ConsultaDeSaldosViewModel(System.Windows.Threading.Dispatcher dispatcher) : base(dispatcher) { this._saldosItems = new ObservableCollection<SaldosItemsViewModel>(); this._saldosItemsDolares = new ObservableCollection<SaldosItemsDolaresViewModel>(); _clienteManager = (Application.Current as App).cliente; }
// GET: Admin/Cliente public ActionResult Index(bool estado = true) { ViewBag.estado = estado; var data = new ClienteManager().GetAll(estado); return(View(data)); }
public bool createDRInversion3de3ViewModel() { ResInversionVista responseInversion = new ResInversionVista(); _cliente = (Application.Current as App).cliente; responseInversion = _cliente.resultadoTransaccionInversion(); if (responseInversion != null) { if (responseInversion.dto.opcion.Equals("1")) { this._cuentaOrigen = responseInversion.dto.cuentadestino; this._cuentaDestino = responseInversion.dto.cuenta2; } else { this._cuentaOrigen = responseInversion.dto.cuenta2; this._cuentaDestino = responseInversion.dto.cuentadestino; } this._fechaOperacion = responseInversion.dto.fecha; this._horaOperacion = responseInversion.dto.hora; this._noReferencia = responseInversion.dto.referencia; this._importe = responseInversion.dto.importe; return true; } else { return false; } }
public void reqMovimientosTarjetaCreditoViewModel(string cuenta) { //DateTime _date = DateTime.Parse((Application.Current as App).fechaActual.fecha, new System.Globalization.CultureInfo("es-MX")); DateTime _date = !string.IsNullOrEmpty((Application.Current as App).fechaActual.fecha) ? Global.ConvertToDatetime((Application.Current as App).fechaActual.fecha).Value : DateTime.Now; _movimientosTDC = new ObservableCollection<MovimientosTDCItemsViewModel>(); _cliente = (Application.Current as App).cliente; _cliente.llenarListaCuentas(MovimientosTDC, cuenta); _TDCtemp = _cliente.getDatosTarjeta(cuenta); _reqUltMvtosTarjetas.cuenta = cuenta; _reqUltMvtosTarjetas.fechaHistorica = _date.AddMonths(-3).AddDays(1).ToString(Formato.Fecha, new System.Globalization.CultureInfo("es-MX")).Replace(".", ""); _reqUltMvtosTarjetas.fecha = (Application.Current as App).fechaActual.fecha; _reqUltMvtosTarjetas.despliega = UltMtvosParam.tdespliega; _reqUltMvtosTarjetas.extracto = UltMtvosParam.textracto; _reqUltMvtosTarjetas.tipoOperacion = UltMtvosParam.ttipoOperacion; #if OFFLINE _TDCtemp = new SaldoTDC(); _TDCtemp.tipoProducto = "Temporal"; _TDCtemp.tasaAnualizada = "0"; #endif _reqUltMvtosTarjetas.tipoProducto = _TDCtemp.tipoProducto; _reqUltMvtosTarjetas.tasaAnualizada = _TDCtemp.tasaAnualizada; _cliente.clienteEventHandler += new ClienteManager.ClienteRequestCompleted(_cliente_clienteEventHandler); Movimientos = new ObservableCollection<UltMvtosTDCItemsViewModel>(); #if OFFLINE _cliente.consultasMovimientosSinSuperMovil(_reqUltMvtosTarjetas); this.ClienteEventHandler(); #else _cliente.consultaUltimosMovimientos(_reqUltMvtosTarjetas); #endif }
private void Carga_Busqueda() { Search_Params Sp = new Search_Params(); ClienteManager cm = new ClienteManager(); Sp.data = cm.GetClientes(); Sp.palabra = ""; Sp.parametros = new List <string>(); Sp.parametros.Add("Nombre"); Sp.parametros.Add("Identificación"); Sp.parametros.Add("Teléfonos"); BusquedaFrm BF = new BusquedaFrm(Sp); BF.ShowDialog(); var seleccion = BF.GetValue(); if (seleccion > -1) { Currentindex = seleccion; currentcliente = cli.GetClienteDTO(Currentindex); DespliegaCampos(); Console.WriteLine(Currentindex); } }
public NuevaRenta() { InitializeComponent(); _rentaManager = new RentaManager(); _prodManager = new ProductoManager(); _clienteManager = new ClienteManager(); _drManager = new DetalleRentaManager(); }
// GET api/cliente public IHttpActionResult Get() { apiResp = new ApiResponse(); var mng = new ClienteManager(); apiResp.Data = mng.RetrieveAll(); return(Ok(apiResp)); }
public ConsultaBitacoraOperacionesViewModel(System.Windows.Threading.Dispatcher dispatcher) : base(dispatcher) { this._cliente = (Application.Current as App).cliente; if (this._cliente != null) clienteExist = true; else clienteExist = false; }
public ActionResult Modificar(Cliente obj) { if (ModelState.IsValid) { int rpta = new ClienteManager().Update(obj); return(RedirectToAction("Index")); } else { return(View("Formulario", obj)); } }
//private ObservableCollection<ConsultaPorDiaItemsViewModel> _criteriosConsultaL; //public ObservableCollection<ConsultaPorDiaItemsViewModel> CriteriosConsultaL //{ // get { return _criteriosConsultaL; } // set{ // _criteriosConsultaL = value; // base.NotifyPropertyChanged("CriteriosConsulta"); // } //} public ConsultaPorDiaViewModel(System.Windows.Threading.Dispatcher dispatcher) : base(dispatcher) { //_criteriosConsultaL = new ObservableCollection<ConsultaPorDiaItemsViewModel>(); _cliente = (Application.Current as App).cliente; //for (int i = 0; i < 5; ++i) //{ // CriteriosConsultaL.Add(new ConsultaPorDiaItemsViewModel() { Consulta = getCriterioConsulta(i) }); //} #if OFFLINE _servicioC = ServicioConsultado.ConsultaMovimientos; #endif }
public void recargaLista(string noCuenta) { if (this._detalleIv != null) { this._detalleIv.Clear(); } else { DetalleIV = new ObservableCollection<DetalleInversionVistaItemsViewModel>(); this._cuenta = noCuenta; } _cliente = (Application.Current as App).cliente; this._cliente.clienteEventHandler += new ClienteManager.ClienteRequestCompleted(_cliente_clienteEventHandler); this._cliente.consultas(ClienteManager.TipoConsulta.InversionVista); }
private void Cmd_Gravar_Click(object sender, EventArgs e) { ClienteManager ObjClienteManager = new ClienteManager(@"Data Source=WD082BG2WM\Sql2000;Initial Catalog=Northwind;Integrated Security=true"); Cliente ObjCliente = new Cliente(); ObjCliente.Nome = Txt_Nome.Text; ObjClienteManager.IncluirCliente(ObjCliente); Clientes ObjClientes = ObjClienteManager.ListarClientes(); Dtg_Clientes.DataSource = ObjClientes; }
static void Main(string[] args) { var valida = new Valida(); var cadastro = new Cadastro(); var clienteManager = new ClienteManager(cadastro, valida); var cliente1 = new Cliente { Cpf = "343434", Nome = "Jessica" }; clienteManager.Processar(cliente1); }
public JsonResult ChangeEstadoCotizacion(ORDEN orden) { var clientM = new ClienteManager(); var cambiaEstadoC = clientM.ChangeEstadoCotizacionAceptarORechazar(orden); var Neworden = new ORDEN { IDORDEN = cambiaEstadoC.IDORDEN, FECHA = cambiaEstadoC.FECHA, CLIENTE_RUTCLIENTE = cambiaEstadoC.CLIENTE_RUTCLIENTE, ESTADO = cambiaEstadoC.ESTADO }; return(Json(Neworden)); }
public JsonResult EnviarCotizacion(decimal id) { var ventaM = new VentaManager(); var ordenM = new ClienteManager(); var ordenid = collection.GetOrdenIdByProcedoId(id); var productosOr = ventaM.GetProductByOrden(ordenid); var listaProducto = ventaM.GetProductsWithCantidadAndPrecioToResumenVenta(productosOr); var cliente = collection.GetclienteByOrdenId(ordenid); var costoTotal = ventaM.GetCostoTotalProductsOrdesToCotizacion(ordenid); var estado = ordenM.ChangeEstadoCotizacionSent(ordenid); string productos = string.Empty; string paraPortal = "Favor de ACEPTAR o RECHAZAR esta cotizacion por medio de su portal en nuestra pagina"; foreach (var item in listaProducto) { productos = productos + "<br/><hr/>" + "<table><tr><td>Producto:</td><td>" + " " + item.DESCRIPCION + "</td></tr>" + "<tr><td>Cantidad Solicitada:</td><td>" + " " + item.CANTIDAD.ToString() + "</td></tr>" + "<tr><td>Precio:</td><td>" + " " + "$" + item.PRECIO.ToString() + "</td></tr></table>"; } string body = "<p>Estimado(a)" + " " + cliente.NOMBRE + " " + "hacemos envio de la cotizacion de su orden de compra numero" + " " + ordenid.ToString() + ":" + " </p>" + productos + " " + "<br/>" + "<table><tr><td><strong>Costo Total:</strong></td><td>" + " " + "<strong>$</strong>" + "<strong>" + costoTotal.ToString() + "</strong>" + "</td></tr></table>" + "<br/><p><strong>" + paraPortal + "</strong></p>"; MailMessage correo = new MailMessage(); correo.From = new MailAddress("*****@*****.**"); correo.To.Add(cliente.CORREO); correo.Subject = "Cotizacion de Orden de Compra"; correo.Body = body; correo.IsBodyHtml = true; correo.Priority = MailPriority.Normal; SmtpClient smtp = new SmtpClient(); smtp.Host = "smtp.gmail.com"; smtp.Port = 25; smtp.EnableSsl = true; smtp.UseDefaultCredentials = true; string mycorreo = "*****@*****.**"; string password = "******"; smtp.Credentials = new System.Net.NetworkCredential(mycorreo, password); smtp.Send(correo); return(Json(id)); }
public JsonResult EditEstadoOrden(ORDEN orden) { var estado = new ClienteManager(); var updateEstado = estado.UpdateEstadoOrden(orden); var updateNoDisposable = new ORDEN { IDORDEN = updateEstado.IDORDEN, CANTIDAD = updateEstado.CANTIDAD, FECHA = updateEstado.FECHA, CLIENTE_RUTCLIENTE = updateEstado.CLIENTE_RUTCLIENTE, ESTADO = updateEstado.ESTADO }; return(Json(updateNoDisposable)); }
private void WorkerObject_DoWork(object sender, DoWorkEventArgs e) { ClienteManager Cmngr = new ClienteManager(); var cliente = Cmngr.existeCedula((string)this.TotalesPago.cliente.Identificacion); if (cliente != null) { this.TotalesPago.cliente = cliente; TotalesPago.cliente = cliente; e.Result = true; } else { e.Result = false; } }
static void Main(string[] args) { var irrf = new IRRF(); var cadastro = new Cadastro(); var clienteManager = new ClienteManager(irrf, cadastro); var cliente = new Cliente() { Cpf = "08598003697", Nome = "Renato" }; clienteManager.Processar(cliente); Console.ReadKey(); }
public void MostrarDatosCliente(int IdCliente) { if (IdCliente > 0) { nCliente = ClienteManager.BuscarPorID(IdCliente); txtNombre.Text = nCliente.sNombre; txtApellidos.Text = nCliente.sApellidos; txtTelefono.Text = nCliente.sTelefono; txtEmail.Text = nCliente.sEmail; DesactivarControlesDeCliente(true); } else { DesactivarControlesDeCliente(false); nCliente = null; } }
private void btnSave_Click(object sender, EventArgs e) { if (!_updatingData) { if (string.IsNullOrEmpty(txtUsername.Text)) { throw new Exception("El nombre de usuario es obligatorio!"); } if (string.IsNullOrEmpty(txtPassword.Text)) { throw new Exception("El password es obligatorio!"); } if (txtPassword.Text != txtConfirmPassword.Text) { throw new Exception("Los passwords no coinciden!"); } } User user = null; if (Profile == Profile.Cliente) { _cliente = ((ClienteUserControl)clienteUserControl).GetCliente(); _cliente.UserName = txtUsername.Text; var manager = new ClienteManager(); manager.GuardarCliente(_cliente, txtPassword.Text); user = _cliente; } else { _proveedor = ((ProveedorUserControl)proveedorUserControl).GetProveedor(); _proveedor.UserName = txtUsername.Text; var manager = new ProveedorManager(); manager.GuardarProveedor(_proveedor, txtPassword.Text); user = _proveedor; } if (OnUserSaved != null) { OnUserSaved(this, new UserSavedEventArgs() { Username = this.txtUsername.Text, Password = this.txtPassword.Text, User = user }); this.Close(); } }
private async void btn1_click(object sender, EventArgs e) { try { ClienteManager manager = new ClienteManager(); var res = await manager.getUsuarios(); if (res != null) { listaUsuarios.ItemsSource = res; } } catch (Exception e1) { } }
// DELETE public IHttpActionResult Delete(Cliente cliente) { try { var mng = new ClienteManager(); mng.Delete(cliente); apiResp = new ApiResponse(); apiResp.Message = "Action was executed."; return(Ok(apiResp)); } catch (BusinessException bex) { return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message))); } }
// POST public IHttpActionResult Post(Cliente cliente) { try { var mng = new ClienteManager(); String response = mng.Create(cliente); apiResp = new ApiResponse(); apiResp.Message = response; return(Ok(apiResp)); } catch (BusinessException bex) { return(Content(HttpStatusCode.BadRequest, bex)); } }
// PUT public IHttpActionResult Put(Cliente cliente) { try { var mng = new ClienteManager(); String response = mng.Update(cliente); apiResp = new ApiResponse(); apiResp.Message = response; return(Ok(apiResp)); } catch (BusinessException bex) { return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message))); } }
public JsonResult AddOrder(List <PRODUCTO> productos) { var productsSeleted = new List <PRODUCTO>(); if (ModelState.IsValid) { productsSeleted = collection.GetProductsSelected(productos); var cliente = new ClienteManager(); var usuario = (USUARIO)Session["usuario"]; cliente.InsertNewProductoToOrder(productsSeleted, usuario); } else { return(Json(null)); } return(Json(productsSeleted)); }
public ActionResult UploadCliente(IFormFile file) { if (file.Length > 0) { var fileExt = System.IO.Path.GetExtension(file.FileName).Substring(1); if (!fileExt.Equals("txt")) { return(BadRequest("Formato invalido!")); } using (var stream = new StreamReader(file.OpenReadStream())) { var clienteManager = new ClienteManager(_clienteRepository); clienteManager.ProcessaArquivo(stream); } } return(RedirectToAction("Index", "Cliente")); }
// GET api/cliente/buscar public IHttpActionResult Get(string code) { try { var mng = new ClienteManager(); var cliente = new Cliente { identificacion = code }; cliente = mng.RetrieveById(cliente); apiResp = new ApiResponse(); apiResp.Data = cliente; return(Ok(apiResp)); } catch (BusinessException bex) { return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message))); } }
public void reqMovimientosCuentasViewModel(string cuenta) { _reqUltMvtosCheques.cuenta = cuenta; _reqUltMvtosCheques.fechaDia = UltMtvosParam.cfechaDia; _reqUltMvtosCheques.fechaHistorica = UltMtvosParam.cfechaHistorica; _reqUltMvtosCheques.importe = UltMtvosParam.cimporte; _reqUltMvtosCheques.tipoConsulta = UltMtvosParam.ctipoConsulta; _reqUltMvtosCheques.tipoCuenta = UltMtvosParam.ctipoCuenta; _reqUltMvtosCheques.tipoMovimiento = UltMtvosParam.ctipoMovimiento; _reqUltMvtosCheques.numMov = UltMtvosParam.cnumMov; _cliente = (Application.Current as App).cliente; _cliente.clienteEventHandler += new ClienteManager.ClienteRequestCompleted(_cliente_clienteEventHandler); #if OFFLINE _cliente.consultasMovimientosSinSuperMovil(_reqUltMvtosCheques); this.ClienteEventHandler(); #else _cliente.consultaUltimosMovimientos(_reqUltMvtosCheques); #endif }
public ClienteAppService(ClienteManager clienteManager, PedidoManager pedido) { this._clienteManager = clienteManager; this.servicePedido = pedido; }
public DRInversion2de3ViewModel() { _cliente = (Application.Current as App).cliente; }
public DetalleTarjetaViewModel(string noTarjeta,System.Windows.Threading.Dispatcher dispatcher) : base(dispatcher) { _cliente = (Application.Current as App).cliente; _cliente.detalleTarjeta(noTarjeta,ref _tipoProducto,ref _alias,ref _saldoCorte,ref _saldo,ref _saldoActualLE,ref _pagoMinimo,ref _pagoFijo,ref _fechaLimitePago,ref _pagoTotalMes); }
public DetalleCuentaViewModel(string noCuenta, System.Windows.Threading.Dispatcher dispatcher) : base(dispatcher) { _cliente = (Application.Current as App).cliente; _cliente.detalleCuenta(noCuenta, ref _cuentaClabe, ref _alias, ref _saldo, ref _tipoProducto, ref _participacion, ref _cuentaMovil, ref _prefijo, ref _nombreCompania); }
public bool loadClient() { ClienteSaveParameters clientTemp = new ClienteSaveParameters(); LoginSaveParameters login = new LoginSaveParameters(); string reSessionId = String.Empty; try { if (IsolatedStorageSettings.ApplicationSettings.TryGetValue("sessionId", out reSessionId)) { if (IsolatedStorageSettings.ApplicationSettings.TryGetValue("clienteSetting", out clientTemp)) { if (IsolatedStorageSettings.ApplicationSettings.TryGetValue("loginSetting", out login)) { //ResLogin resLogin = new ResLogin() { dto = new DtoLogin() }; //resLogin.dto.nombre = login.nombre; //resLogin.dto.horaUltimoAcceso = login.horaUltimoAcceso; //resLogin.dto.numProductos = login.numProductos; //resLogin.dto.fechaUltimoAcceso = login.fechaUltimoAcceso; //resLogin.dto.estatusToken = login.estatusToken; //resLogin.dto.duracionSesion = login.duracionSesion; ResLoginRSA resLogin = new ResLoginRSA() { dto = new DtoLoginRSA() }; resLogin.dto.nombre = login.nombre; resLogin.dto.horaUltimoAcceso = login.horaUltimoAcceso; resLogin.dto.numProductos = login.numProductos; resLogin.dto.fechaUltimoAcceso = login.fechaUltimoAcceso; resLogin.dto.estatusToken = login.estatusToken; resLogin.dto.estatusST = login.estatusST; resLogin.dto.duracionSesion = login.duracionSesion; ResGetFechaActual fechaActual = new ResGetFechaActual(); DtoGetFechaActual fecha = new DtoGetFechaActual(); #if OFFLINE IsolatedStorageSettings.ApplicationSettings.TryGetValue("fechaActual", out fecha); fechaActual.dto = fecha; #endif ClienteManager newClienteManager = new ClienteManager(clientTemp.TipoCliente, resLogin, null); newClienteManager.setCliente(clientTemp.cliente); newClienteManager.reloadProductos(clientTemp); newClienteManager.FechaActual = fechaActual; (Application.Current as App).SessionId = reSessionId; (Application.Current as App).dtoLogin = resLogin.dto; (Application.Current as App).cliente = newClienteManager; //reload = true; } } } return true; } catch (IsolatedStorageException) { System.Diagnostics.Debug.WriteLine("Error al cargar"); return false; } }
private async Task <IEntityManager> GetManager(string tela) { IEntityManager manager = null; try { switch (tela) { case ServerCommands.UnidadeMedida: manager = new UnidadeMedidaManager(); break; case ServerCommands.TipoServico: manager = new TipoServicoManager(); break; case ServerCommands.TipoOS: manager = new TipoOSManager(); break; case ServerCommands.CondicaoPagamento: manager = new CondicaoPagamentoManager(); break; case ServerCommands.CentroCustoSintetico: manager = new CentroCustoSinteticoManager(); break; case ServerCommands.Servico: manager = new ServicoManager(); break; case ServerCommands.TabelaCusto: manager = new TabelaCustoManager(); break; case ServerCommands.Funcionario: manager = new FuncionarioManager(); break; case ServerCommands.Fornecedor: manager = new FornecedorManager(); break; case ServerCommands.Cliente: manager = new ClienteManager(); break; case ServerCommands.Estoque: manager = new EstoqueManager(); break; case ServerCommands.TipoEntrada: manager = new TipoEntradaManager(); break; case ServerCommands.FuncionarioEstoque: manager = new FuncionarioEstoqueManager(); break; case ServerCommands.Planta: manager = new PlantaManager(); break; case ServerCommands.CompraManual: manager = new CompraManualManager(); break; case ServerCommands.MovimentoEstoque: manager = new MovimentoEstoqueManager(); break; case ServerCommands.UserPlanta: manager = new UserPlantaManager(); break; default: manager = null; break; } } catch (Exception e) { ConsoleEx.WriteError(e); } return(manager); }
public DRInversion1de3ViewModel(System.Windows.Threading.Dispatcher dispatcher):base(dispatcher) { CuentasInversion = new ObservableCollection<InversionVistaItemsViewModel>(); this._cliente = (Application.Current as App).cliente; }
public ActionResult Eliminar(int id) { int rpta = new ClienteManager().Delete(id); return(RedirectToAction("Index")); }
public ClienteController() { ClienteManagers = new ClienteManager(); ProductManagers = Factory.Factory.CreateProducManager(); ListProductManagers = Factory.Factory.CreateListProducManager(); }
}//Constructor //*******Metodos********// private void tipoCliente() { //Obtenemos los valores del Login para establecer el tipo e cliente de acuerdo a los productos que maneja #region [responseLogin] ResLoginRSA loginRes = new ResLoginRSA(); #if OFFLINE ParserTemporal parserTemporal = new ParserTemporal(App.Current.Resources["jsonLogin"] as string); loginRes = parserTemporal.reslogin; (Application.Current as App).dtoLogin = loginRes.dto; #else loginRes.dto = (Application.Current as App).dtoLogin; #endif #endregion if (loginRes.dto != null) { //Verificamos si cuenta con producto Cuentas y Chequeras en pesos o dolares, //dependiendo de esto manejaremos un cliente tipo uniproducto o multiproducto #region [EstableciendoTipoDeCliente] if (loginRes.dto.numProductos.cuentasPesos.Equals(NumCuentasCliente.numCuentasPesos) && loginRes.dto.numProductos.cuentasDolares.Equals(NumCuentasCliente.numCuentasDolares)) { clientManager = new ClienteManager(Tipo.uniproducto, loginRes, this._dispatcher); clientManager.ProductoActual = ClienteManager.TipoConsulta.TarjetasCredito; #if OFFLINE clientManager.consultasSinSuperMovil(clientManager.ProductoActual, _despliegueMax); #else clientManager.consultas(clientManager.ProductoActual, _despliegueMax); #endif } else { clientManager = new ClienteManager(Tipo.multiproducto, loginRes, this._dispatcher); clientManager.ProductoActual = ClienteManager.TipoConsulta.CuentasCheques; #if OFFLINE clientManager.consultasSinSuperMovil(clientManager.ProductoActual, _despliegueMax); #else clientManager.consultas(clientManager.ProductoActual, _despliegueMax); #endif } (Application.Current as App).cliente = clientManager; #if OFFLINE this.clienteEventTemp(); #else this.clienteManager.clienteEventHandler += new ClienteManager.ClienteRequestCompleted(clienteManager_clienteEventHandler); #endif #endregion }//Tipo de Cliente }
//***Propiedades***// #endregion public SaldosCuentasViewModel(System.Windows.Threading.Dispatcher dispatcher, bool sesionIniciada) : base(dispatcher) { this._saldosItems = new ObservableCollection<SaldosItemsViewModel>(); this._saldosItemsDolares = new ObservableCollection<SaldosItemsDolaresViewModel>(); this.clientManager = new ClienteManager(dispatcher); this._getFechaFlag = true; actualizaCliente(); }
public ClientesController() { clientesManager = new ClienteManager(); }
public ConsultaCarteraViewModel(System.Windows.Threading.Dispatcher dispatcher) : base(dispatcher) { this.cliente = (Application.Current as App).cliente; _cartera = new ObservableCollection<ConsultaCarteraItemsViewModel>(); }
private void txtApellidos_TextChanged(object sender, EventArgs e) { this.grdDatos.DataSource = ClienteManager .BuscarPorApellidos(txtApellidos.Text); }
public bool saveClient(string sessionId, ClienteManager cliente, DtoLoginRSA dtoLogin) { LoginSaveParameters loginS = new LoginSaveParameters(); ClienteSaveParameters clienteS = new ClienteSaveParameters(); bool saveSuccess = true; try { clienteS.TipoCliente = cliente.TipoCliente; clienteS.cliente = cliente.cliente; clienteS.productoActualIndex = cliente.ProductoActualIndex; #if OFFLINE clienteS.fechaActual = cliente.FechaActual.dto; #endif } catch (NullReferenceException) { System.Diagnostics.Debug.WriteLine("Error de tipo cliente,cliente y producto actual"); saveSuccess = false; } try { clienteS.ctasCheques = cliente.cliente.getCheques().dto; } catch (NullReferenceException) { System.Diagnostics.Debug.WriteLine("Error ctas cheques"); } try { clienteS.ctasTarjetasCredito = cliente.cliente.getTarjetas().dto; } catch (NullReferenceException) { System.Diagnostics.Debug.WriteLine("Error tarjetas"); } try { clienteS.fondosInversion = cliente.cliente.getFondosInv().dto; } catch (NullReferenceException) { System.Diagnostics.Debug.WriteLine("fondos inv"); } try { clienteS.inversionVista = cliente.cliente.getInversionV().dto; } catch (NullReferenceException) { System.Diagnostics.Debug.WriteLine("Error inv vista"); } try { clienteS.inversionPlazo = cliente.cliente.getInversionP().dto; } catch (NullReferenceException) { System.Diagnostics.Debug.WriteLine("Error inv plazo"); } try { clienteS.creditos = cliente.cliente.getCreditos().dto; } catch (NullReferenceException) { System.Diagnostics.Debug.WriteLine("Error credito"); } try { loginS.numProductos = dtoLogin.numProductos; } catch (NullReferenceException) { System.Diagnostics.Debug.WriteLine("Error Num productos"); saveSuccess = false; } try { loginS.nombre = dtoLogin.nombre; loginS.horaUltimoAcceso = dtoLogin.horaUltimoAcceso; loginS.fechaUltimoAcceso = dtoLogin.fechaUltimoAcceso; loginS.estatusToken = dtoLogin.estatusToken; loginS.estatusST = dtoLogin.estatusST; loginS.duracionSesion = dtoLogin.duracionSesion; } catch (NullReferenceException) { System.Diagnostics.Debug.WriteLine("Error Login Dto"); saveSuccess = false; } try { if (IsolatedStorageSettings.ApplicationSettings.Contains("clienteSetting")) { IsolatedStorageSettings.ApplicationSettings["clienteSetting"] = clienteS; IsolatedStorageSettings.ApplicationSettings["loginSetting"] = loginS; IsolatedStorageSettings.ApplicationSettings["sessionId"] = sessionId; #if OFFLINE IsolatedStorageSettings.ApplicationSettings["fechaActual"] = clienteS.fechaActual; #endif //IsolatedStorageSettings.ApplicationSettings["cheques"] = clienteS.ctasCheques; //IsolatedStorageSettings.ApplicationSettings["tarjetas"] = clienteS.ctasTarjetasCredito; //IsolatedStorageSettings.ApplicationSettings["fondosInversion"] = clienteS.fondosInversion; //IsolatedStorageSettings.ApplicationSettings["inversionVista"] = clienteS.inversionVista; //IsolatedStorageSettings.ApplicationSettings["inversionPlazo"] = clienteS.inversionPlazo; //IsolatedStorageSettings.ApplicationSettings["creditos"] = clienteS.creditos; //IsolatedStorageSettings.ApplicationSettings["ultMvtosCheques"] = clienteS.ultMvtosCheques; //IsolatedStorageSettings.ApplicationSettings["ultMvtosTarjeta"] = clienteS.ultMvtosTarjetas; //IsolatedStorageSettings.ApplicationSettings["transaccionInv"] = clienteS.transaccionVist; } else { IsolatedStorageSettings.ApplicationSettings.Add("clienteSetting", clienteS); IsolatedStorageSettings.ApplicationSettings.Add("loginSetting", loginS); IsolatedStorageSettings.ApplicationSettings.Add("sessionId", sessionId); #if OFFLINE IsolatedStorageSettings.ApplicationSettings.Add("fechaActual", clienteS.fechaActual); #endif //IsolatedStorageSettings.ApplicationSettings.Add("cheques", clienteS.ctasCheques); //IsolatedStorageSettings.ApplicationSettings.Add("tarjetas", clienteS.ctasTarjetasCredito); //IsolatedStorageSettings.ApplicationSettings.Add("fondosInversion", clienteS.fondosInversion); //IsolatedStorageSettings.ApplicationSettings.Add("inversionVista", clienteS.inversionVista); //IsolatedStorageSettings.ApplicationSettings.Add("inversionPlazo", clienteS.inversionPlazo); //IsolatedStorageSettings.ApplicationSettings.Add("creditos", clienteS.creditos); //IsolatedStorageSettings.ApplicationSettings.Add("ultMvtosCheques",clienteS.ultMvtosCheques); //IsolatedStorageSettings.ApplicationSettings.Add("ultMvtosTarjeta", clienteS.ultMvtosTarjetas); //IsolatedStorageSettings.ApplicationSettings.Add("transaccionInv", clienteS.transaccionVist); } // IsolatedStorageSettings.ApplicationSettings.Save(); saveSuccess = true; return saveSuccess; } catch (IsolatedStorageException) { System.Diagnostics.Debug.WriteLine("Error al salvar"); saveSuccess = false; return saveSuccess; } }