public FormClientes(usuario u)
 {
     InitializeComponent();
     managerClientes = Tools.FabricManager.ClienteManager();
     managerLog      = Tools.FabricManager.LogManager();
     user            = u;
 }
示例#2
0
 public ControlClientes()
 {
     InitializeComponent();
     manager = FabricManager.Clientes(@"C:\GestorCyF");
     dtg     = new DataGrid();
     CargarDatosIniciales();
 }
示例#3
0
 public FormAgregarFactura(usuario u, string evento, int id)
 {
     InitializeComponent();
     managerCliente = Tools.FabricManager.ClienteManager();
     user           = u;
     accion         = evento;
     idFactura      = id;
 }
 public FormAgregarCliente(usuario u, string evento, int id)
 {
     InitializeComponent();
     managerCliente = Tools.FabricManager.ClienteManager();
     managerLog     = Tools.FabricManager.LogManager();
     accion         = evento;
     idAEditar      = id;
     user           = u;
 }
示例#5
0
 public FormRutas(usuario u)
 {
     InitializeComponent();
     managerRuta = Tools.FabricManager.RutaManager();
     //managerTipoDeUnidades = Tools.FabricManager.TipoDeUnidadesManager();
     managerCliente = Tools.FabricManager.ClienteManager();
     managerLog     = Tools.FabricManager.LogManager();
     user           = u;
 }
        public ClientesControllerTest()
        {
            manager    = Substitute.For <IClienteManager>();
            logger     = Substitute.For <ILogger <ClientesController> >();
            controller = new ClientesController(manager, logger);

            clienteView      = new ClienteViewFaker().Generate();
            listaClienteView = new ClienteViewFaker().Generate(10);
            novoCliente      = new NovoClienteFaker().Generate();
        }
 public FormAgregarRutas(usuario u, string evento, int id)
 {
     InitializeComponent();
     managerTipoDeUnidades = Tools.FabricManager.TipoDeUnidadesManager();
     managerRutas          = Tools.FabricManager.RutaManager();
     managerLog            = Tools.FabricManager.LogManager();
     managerCliente        = Tools.FabricManager.ClienteManager();
     accion    = evento;
     idAEditar = id;
     user      = u;
 }
        public ClienteManagerTest()
        {
            repository         = Substitute.For <IClienteRepository>();
            logger             = Substitute.For <ILogger <ClienteManager> >();
            mapper             = new MapperConfiguration(p => p.AddProfile <NovoClienteMappingProfile>()).CreateMapper();
            manager            = new ClienteManager(repository, mapper, logger);
            ClienteFaker       = new ClienteFaker();
            NovoClienteFaker   = new NovoClienteFaker();
            AlteraClienteFaker = new AlteraClienteFaker();

            Cliente       = ClienteFaker.Generate();
            NovoCliente   = NovoClienteFaker.Generate();
            AlteraCliente = AlteraClienteFaker.Generate();
        }
示例#9
0
        public VentasModal(FactoryManager factoryManager, string operacion, Venta venta = null)
        {
            _operacion              = operacion;
            _venta                  = venta;
            _factoryManager         = factoryManager;
            _ventaManager           = factoryManager.CrearVentaManager;
            _clienteManager         = factoryManager.CrearClienteManager;
            _cuentaPorCobrarManager = factoryManager.CrearCuentaPorCobrarManager;
            InitializeComponent();
            cmbTipo.ItemsSource          = _tipoVenta;
            dtpFechaEmision.SelectedDate = DateTime.Now;
            if (_operacion == "Read")
            {
                chkCredito.IsChecked            = venta.Credito;
                txtSerieDocumento.Text          = venta.SerieDocumento;
                txtNumeroDocumento.Text         = venta.NumeroDocumento;
                txtNombreApellidoProveedor.Text = venta.NombreProveedor;
                txtRazonSocialProveedor.Text    = venta.RazonSocialProveedor;
                txtDniProveedor.Text            = venta.Dni;
                txtRucProveedor.Text            = venta.Ruc;
                txtNumeroDocumento.Text         = venta.NumeroDocumento;
                Productos            = venta.Productos;
                cmbTipo.SelectedItem = venta.TipoVenta;
                var nfi = new NumberFormatInfo {
                    NumberDecimalSeparator = ".", NumberGroupSeparator = ","
                };
                txbSubTotal.Text   = Productos.Sum(x => x.Total).ToString("#,##0.00", nfi);
                txbTotal.Text      = txbSubTotal.Text;
                txtExternalId.Text = venta.ExternalId;

                btnSave.IsEnabled                     = false;
                chkCredito.IsEnabled                  = false;
                btnSelectProdcuto.IsEnabled           = false;
                btnSelectProveedor.IsEnabled          = false;
                btnDeleteProducto.IsEnabled           = false;
                txtNombreApellidoProveedor.IsReadOnly = true;
                txtRazonSocialProveedor.IsReadOnly    = true;
                txtDniProveedor.IsReadOnly            = true;
                txtRucProveedor.IsReadOnly            = true;
                txtNumeroDocumento.IsReadOnly         = true;
                cmbTipo.IsReadOnly                    = true;
            }
            else if (_operacion == "NotaVenta")
            {
                cmbTipo.SelectedItem = TipoVenta.NotaDeVenta;
            }

            dtgProductos.ItemsSource = Productos;
        }
示例#10
0
 public SeleccionarClienteModal(FactoryManager factoryManager)
 {
     _clienteManager = factoryManager.CrearClienteManager;
     InitializeComponent();
     ltbClientes.ItemsSource = _clienteManager.ObtenerTodo;
     if (_clienteManager.ObtenerTodo.Count() > 0)
     {
         ltbClientes.Visibility = Visibility.Visible;
         brdListItem.Visibility = Visibility.Collapsed;
     }
     else
     {
         ltbClientes.Visibility = Visibility.Collapsed;
         brdListItem.Visibility = Visibility.Visible;
     }
 }
示例#11
0
        public FormViajes(usuario u)
        {
            InitializeComponent();
            managerViajes            = Tools.FabricManager.ViajeManager();
            managerStatus            = Tools.FabricManager.StatusViajeManager();
            managerRuta              = Tools.FabricManager.RutaManager();
            managerCliente           = Tools.FabricManager.ClienteManager();
            managerUnidades          = Tools.FabricManager.UnidadManager();
            managerGasto             = Tools.FabricManager.GastoManager();
            managerCortes            = Tools.FabricManager.CortesOperadorManager();
            managerLog               = Tools.FabricManager.LogManager();
            managerOperadorEnViaje   = Tools.FabricManager.OperadoresEnViajeManager();
            managerOperador          = Tools.FabricManager.OperadorManager();
            managerCobrosAdicionales = Tools.FabricManager.CobrosAdicionalManager();

            user = u;
        }
示例#12
0
 public ClientesModal(FactoryManager factoryManager, string operacion, Cliente cliente = null)
 {
     _factoryManager = factoryManager;
     _operacion      = operacion;
     _cliente        = cliente;
     _clienteManager = _factoryManager.CrearClienteManager;
     InitializeComponent();
     cmbTipoCliente.ItemsSource = _tipoCliente;
     if (_operacion == "Edit" || _operacion == "Read")
     {
         cmbTipoCliente.SelectedItem = cliente.TipoCliente;
         txtNombres.Text             = cliente.Nombres;
         txtApellidos.Text           = cliente.Apellidos;
         txtRazonSocial.Text         = cliente.RazonSocial;
         txtRepresentanteLegal.Text  = cliente.RepresentanteLegal;
         txtDireccion.Text           = cliente.Direccion;
         txtEmail.Text   = cliente.Email;
         txtRUC.Text     = cliente.Ruc;
         txtDNI.Text     = cliente.Dni;
         txtCelular.Text = cliente.Celular.ToString();
     }
     if (_operacion == "Read")
     {
         btnSave.IsEnabled                = false;
         cmbTipoCliente.IsEnabled         = false;
         txtNombres.IsReadOnly            = true;
         txtApellidos.IsReadOnly          = true;
         txtRazonSocial.IsReadOnly        = true;
         txtRepresentanteLegal.IsReadOnly = true;
         txtDireccion.IsReadOnly          = true;
         txtEmail.IsReadOnly              = true;
         txtRUC.IsReadOnly                = true;
         txtDNI.IsReadOnly                = true;
         txtCelular.IsReadOnly            = true;
     }
 }
示例#13
0
 public ClienteAppService(IClienteManager clienteManager, IPedidoManager _pedidoManager)
 {
     _clienteManager = clienteManager;
     pedidoManager   = _pedidoManager;
 }
 public ClientesController(IClienteManager clienteManager)
 {
     this.clienteManager = clienteManager;
 }
示例#15
0
 public ClienteAppService(IClienteManager clienteManager)
 {
     _clienteManager = clienteManager;
 }
示例#16
0
 public ClientesController(IClienteManager clienteManager, ILogger <ClientesController> logger)
 {
     this.clienteManager = clienteManager;
     this.logger         = logger;
 }