Exemplo n.º 1
0
 public void cargarDatos(ComprasBL comprasBL, ProveedoresBL proveedoresBL, ProductosBL productosBL)
 {
     _comprasBL = comprasBL;
     listadeComprasBindingSource.DataSource     = comprasBL.ListadeCompras;
     listadeProveedoresBindingSource.DataSource = proveedoresBL.ListadeProveedores;
     listadeProductosBindingSource.DataSource   = productosBL.listadeProductos;
 }
Exemplo n.º 2
0
        public void CargarDatos(ProveedoresBL proveedoresBL)
        {
            // var bindingSoure = new BindingSource();
            // bindingSoure.DataSource = proveedoresBL.ListadeProveedores;


            var bindingSource = new BindingSource();

            bindingSource.DataSource =
                from x in proveedoresBL.ListadeProveedores
                select new
            {
                Foto     = x.Foto,
                Id       = x.Id,
                Nombre   = x.Nombre,
                Telefono = x.Telefono,
            };

            var reporte = new ReportedeProveedores();

            reporte.SetDataSource(bindingSource);

            crystalReportViewer1.ReportSource = reporte;
            crystalReportViewer1.RefreshReport();
        }
Exemplo n.º 3
0
        public void CargarDatos(ComprasBL comprasBL, ProveedoresBL proveedoresBL)
        {
            var bindingSource = new BindingSource();

            bindingSource.DataSource =
                from o in comprasBL.ListadeCompras
                select new
            {
                Id          = o.Id,
                Fecha       = o.Fecha,
                Proveedores = proveedoresBL
                              .ListadeProveedores
                              .FirstOrDefault(r => r.Id == o.ProveedoresId)
                              .Nombre,
                Subtotal = o.Subtotal,
                Impuesto = o.Impuesto,
                Total    = o.Total,
                Activo   = o.Activo,
            };

            var reporte = new ReportedeCompras();

            reporte.SetDataSource(bindingSource);

            crystalReportViewer1.ReportSource = reporte;
            crystalReportViewer1.RefreshReport();
        }
Exemplo n.º 4
0
        public FormProveedores()
        {
            InitializeComponent();

            _proveedores = new ProveedoresBL();
            listaProveedoresBindingSource.DataSource = _proveedores.ObtenerProveedores();
        }
Exemplo n.º 5
0
 private void btnGuardar_Click(object sender, EventArgs e)
 {
     try
     {
         if (Validate())
         {
             Proveedores modifica = GetProviderFormData();
             modifica.IDProveedores = ID;
             ProveedoresBL.Update(modifica);
             dataGridView1.Update();
             FillGrid();
             ShowMessage("Proveedores Modificado Exitosamente");
             CleanUp();
             btnGuardar.Enabled  = false;
             btnEliminar.Enabled = false;
             btnAgregar.Enabled  = true;
         }
         else
         {
             ShowMessage("Debe llenar todos los Campos Requeridos", "Error");
         }
     }
     catch (Exception ex)
     {
         ShowMessage(ex.Message + " Error Al Modificar Proveedores", "Error");
     }
 }
Exemplo n.º 6
0
        public Menu()
        {
            InitializeComponent();

            _productosBL   = new ProductosBL();
            _categoriasBL  = new CategoriasBL();
            _clientesBL    = new ClientesBL();
            _proveedoresBL = new ProveedoresBL();
            _facturaBL     = new FacturaBL();
        }
Exemplo n.º 7
0
        public Proveedores()
        {
            InitializeComponent();

            _proveedores = new ProveedoresBL();
            listaProveedoresBindingSource.DataSource = _proveedores.ObtenerProveedores();

            _servicios = new ServicioBL();
            listaServiciosBindingSource.DataSource = _servicios.ObtenerServicio();
        }
Exemplo n.º 8
0
 public Menu()
 {
     InitializeComponent();
     _productosBL   = new ProductosBL();
     _categoriasBL  = new CategoriaBL();
     _clientesBL    = new ClientesBL();
     _ciudadesBL    = new CiudadBL();
     _facturaBL     = new FacturaBL();
     _comprasBL     = new ComprasBL();
     _proveedoresBL = new ProveedoresBL();
     _usuariosBL    = new UsuariosBL();
 }
Exemplo n.º 9
0
        public FormCompras()
        {
            InitializeComponent();
            _comprasBL = new ComprasBL();
            listaComprasBindingSource.DataSource = _comprasBL.ObtenerCompras();

            _proveedoresBL = new ProveedoresBL();
            listaProveedoresBindingSource.DataSource = _proveedoresBL.ObtenerProveedores();

            _productosBL = new ProductosBL();
            listaProductosBindingSource.DataSource = _productosBL.ObtenerProductos();
        }
Exemplo n.º 10
0
        public FormReporteProveedores()
        {
            InitializeComponent();
            var _proveedoresBL = new ProveedoresBL();
            var bindingSource  = new BindingSource();

            bindingSource.DataSource = _proveedoresBL.ObtenerProveedor();

            var reporte = new ReporteProveedores();

            reporte.SetDataSource(bindingSource);

            crystalReportViewer1.ReportSource = reporte;
            crystalReportViewer1.RefreshReport();
        }
Exemplo n.º 11
0
 private void btnBuscar_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtBuscar.Text.Length > 0)
         {
             dataGridView1.DataSource = ProveedoresBL.SelectById(txtBuscar.Text);
         }
         else
         {
             FillGrid();
         }
     }
     catch (Exception ex)
     {
         ShowMessage(ex.Message + "Error Al Consultar", "Error");
     }
 }
Exemplo n.º 12
0
        void ProveedoresForm_Load(object sender, EventArgs e)
        {
            AcceptButton = btnGuardar;

            contexto      = ContextoPresentacion.Instancia;
            localidadesBL = new LocalidadesBL(contexto.Negocio);
            proveedoresBL = new ProveedoresBL(contexto.Negocio, localidadesBL);

            btnGuardar.Click += BtnGuardar_Click;
            grvProveedores.SelectionChanged    += GrvClientes_SelectionChanged;
            grvProveedores.CellEnter           += GrvClientes_CellEnter;
            cboProvincias.SelectedValueChanged += CboProvincias_SelectedValueChanged;
            CargarProvincias();
            CargarProveedores();
            LimpiarFormulario();

            contexto.RegistrarEvento(Resources.ProveedoresForm_Ingreso);
        }
Exemplo n.º 13
0
        /* private void Refresh_Click(object sender, EventArgs e)
         * {
         *
         * }*/

        // Actualizar Lista de Proveedores y lista de Productos en FORMULARIO COMPRAS

        private void button3_Click(object sender, EventArgs e)
        {
            if (idTextBox.Text != "")
            {
                var CompraiD = Convert.ToInt32(idTextBox.Text);
                _comprasBL.RefrescarDatos(CompraiD);


                // _comprasBL = new ComprasBL();
                // listaComprasBindingSource.DataSource = _comprasBL.ObtenerCompras();

                _proveedorBL = new ProveedoresBL();
                listaProveedoresBindingSource.DataSource = _proveedorBL.ObtenerProveedor();
                listaProveedoresBindingSource.ResetBindings(false);
                _productosBL = new ProductosBL();
                listaProductosBindingSource.DataSource = _productosBL.ObtenerProductos();
                listaProductosBindingSource.ResetBindings(false);
            }
        }
Exemplo n.º 14
0
        public void cargarDatos(ProveedoresBL proveedoresBL)
        {
            var bindingSource = new BindingSource();

            bindingSource.DataSource =
                from pr in proveedoresBL.ListadeProveedores

                select new
            {
                Id       = pr.Id,
                Nombre   = pr.Nombre,
                Telefono = pr.Telefono,
            };

            var reporte = new ReportedeProveedores();

            reporte.SetDataSource(bindingSource);

            crystalReportViewer1.ReportSource = reporte;
            crystalReportViewer1.RefreshReport();
        }
Exemplo n.º 15
0
 private void btnEliminar_Click(object sender, EventArgs e)
 {
     try
     {
         string       Msg       = "Realmente desea eliminar el Proveedores: " + txtRazonSocial.Text + "?";
         DialogResult resultado = MessageBox.Show(Msg, "¿Desea eliminar?", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
         if (resultado == DialogResult.Yes)
         {
             ProveedoresBL.Delete(ID);
             ShowMessage("Proveedores Eliminado.");
             CleanUp();
             dataGridView1.Update();
             FillGrid();
             btnGuardar.Enabled  = false;
             btnEliminar.Enabled = false;
             btnAgregar.Enabled  = true;
         }
     }
     catch (Exception ex)
     {
         ShowMessage(ex.Message + " Error Al Eliminar", "Error");
     }
 }
Exemplo n.º 16
0
        void OrdenesPago_Load(object sender, EventArgs e)
        {
            AcceptButton = btnGuardar;

            contexto             = ContextoPresentacion.Instancia;
            localidadesBL        = new LocalidadesBL(contexto.Negocio);
            clientesBL           = new ClientesBL(contexto.Negocio, localidadesBL);
            ingredientesBL       = new IngredientesBL(contexto.Negocio);
            precioIngredientesBL = new PreciosIngredientesBL(contexto.Negocio);
            recetasBL            = new RecetasBL(contexto.Negocio, precioIngredientesBL);
            ordenesVentaBL       = new OrdenesVentaBL(contexto.Negocio, recetasBL, clientesBL);
            ordenesCompraBL      = new OrdenesCompraBL(contexto.Negocio, ordenesVentaBL, ingredientesBL);
            proveedoresBL        = new ProveedoresBL(contexto.Negocio, localidadesBL);
            ordenesPagoBL        = new OrdenesPagoBL(contexto.Negocio, proveedoresBL, ordenesCompraBL);

            btnGuardar.Click += BtnGuardar_Click;
            grvOrdenesPago.SelectionChanged += GrvOrdenesPago_SelectionChanged;
            grvOrdenesPago.CellEnter        += GrvOrdenesPago_CellEnter;
            CargarOrdenesPago();
            LimpiarFormulario();

            contexto.RegistrarEvento(Resources.OrdenesPagoForm_Ingreso);
        }
Exemplo n.º 17
0
        public void CargarDatos(ProveedoresBL proveedoresBL)
        {
            var bindingSource = new BindingSource();

            bindingSource.DataSource =
                from p in proveedoresBL.ListadeProveedor
                select new
            {
                Id       = p.Id,
                Nombre   = p.Nombre,
                CiudadId = p.CiudadId,
                Telefono = p.Telefono,
                Ciudad   = p.Ciudad.Descripcion,
                Cargo    = p.Cargo,
            };

            var reporte = new ReportedeProveedores();

            reporte.SetDataSource(bindingSource);

            crystalReportViewer1.ReportSource = reporte;
            crystalReportViewer1.RefreshReport();
        }
Exemplo n.º 18
0
 private void btnAgregar_Click(object sender, EventArgs e)
 {
     try
     {
         if (Validate())
         {
             Proveedores newProvider = GetProviderFormData();
             ProveedoresBL.Create(newProvider);
             dataGridView1.Update();
             FillGrid();
             ShowMessage("Proveedores Agregado Exitosamente");
             CleanUp();
         }
         else
         {
             ShowMessage("Debe llenar todos los Campos Requeridos", "Error");
         }
     }
     catch (Exception ex)
     {
         ShowMessage(ex.Message + " Error Al Agregar el Proveedores", "Error");
     }
 }
Exemplo n.º 19
0
 public void cargarDatos(ComprasBL comprasBL, ProveedoresBL proveedorBL, CostoBL costoBL)
 {
     listadeComprasBindingSource.DataSource   = comprasBL.ListadeCompras;
     listadeProveedorBindingSource.DataSource = proveedorBL.ListadeProveedor;
     listadeCostosBindingSource.DataSource    = costoBL.ListadeCostos;
 }
Exemplo n.º 20
0
 private void FillGrid()
 {
     dataGridView1.DataSource = ProveedoresBL.SelectAll();
 }
 public ProveedoresController()
 {
     _proveedoresBL = new ProveedoresBL();
 }
 public PedidosController()
 {
     _pedidosBL     = new PedidosBL();
     _proveedoresBL = new ProveedoresBL();
 }
Exemplo n.º 23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        int usuario_OficinaId = 0;

        InfoSessionVO infoSession;

        infoSession       = (InfoSessionVO)Session["InfoSession"];
        usuario_OficinaId = (int)infoSession.getValor(InfoSessionVO.OFICINA);

        OrdenCompraBL OCBL = new OrdenCompraBL();
        OrdenCompraVO OCVO = new OrdenCompraVO();

        OCVO.Operacion     = OrdenCompraVO.BUSCAR;
        OCVO.OrdenCompraId = Int32.Parse(Request["ordenCompraId"].ToString());
        OCVO = (OrdenCompraVO)OCBL.execute(OCVO);

        int idOficinaBusqueda = OCVO.OficinaId;

        //CALVEK DEL CENTRO - TEL OFICINA SLP
        if (idOficinaBusqueda == 2)
        {
            lblRazonSoc.Text       = "CALVEK COMPONENTES DEL CENTRO SA DE CV";
            lblrfcRazon.Text       = "CCC111122IZ5";
            lblcalleRazon.Text     = "Carretera Central KM 423 Local 7,";
            lbldireccionRazon.Text = "Don MIguel, C.P.:78395, San Luis Potosí, S. L. P.";
            lbltelRazon.Text       = "(444) 567-53-27,128-61-20";
            lblfaxRazon.Text       = "(444) 128-61-22";
        }
        //CALVEK BAJIO
        if (idOficinaBusqueda == 3)
        {
            lblRazonSoc.Text       = "CALVEK COMPONENTES BAJIO SA DE CV";
            lblrfcRazon.Text       = "CCB121019IE1";
            lblcalleRazon.Text     = "Calle San Pedro No. 70 ";
            lbldireccionRazon.Text = "Rinconada de San Pedro, C.P.:78434, Soledad De Graciano Sánchez, S. L. P.";
            //TELEFONOS QUERETARO
            if (usuario_OficinaId == 6)
            {
                lbltelRazon.Text = "(442) 298-00-31,298-02-15";
                lblfaxRazon.Text = "(442) 298-01-07";
            }
            //TELEFONOS CELAYA
            if (usuario_OficinaId == 7)
            {
                lbltelRazon.Text = "(461) 615-47-64";
                lblfaxRazon.Text = "(461) 609-09-94";
            }
            //TELEFONOS IRAPUATO
            if (usuario_OficinaId == 8)
            {
                lbltelRazon.Text = "(462) 624-50-19";
                lblfaxRazon.Text = "(462) 624-50-19";
            }
        }
        //CALVEK SA - TEL OFICINA MATRIZ
        if (idOficinaBusqueda == 1)
        {
            lblRazonSoc.Text       = "CALVEK SA";
            lblrfcRazon.Text       = "CAL980715AA3";
            lblcalleRazon.Text     = "Calle San Pedro No. 70 ";
            lbldireccionRazon.Text = "Rinconada de San Pedro, C.P.:78434, Soledad De Graciano Sánchez, S. L. P.";
            lbltelRazon.Text       = "(444) 818-38-07";
            lblfaxRazon.Text       = "(444) 818-38-07";
        }


        lblFecha.Text = OCVO.FechaAlta.ToString("d");

        lblFechaEntrega.Text          = OCVO.FechaEntrega;
        lblContacto.Text              = OCVO.Contacto;
        lblDatosTransferencia.Text    = OCVO.DatosTransferencia;
        lblInstruccionesEmbarque.Text = OCVO.InstruccionesEmbarque;
        lblTerminos.Text              = OCVO.Terminos;
        lblFob.Text         = OCVO.Fob;
        lblProyecto.Text    = OCVO.NombreProyecto;
        lblJob.Text         = OCVO.NombreJob;
        lblViaEmbarque.Text = OCVO.ViaEmbarque;
        lblMoneda.Text      = OCVO.MonedaId.ToString();
        Label6.Text         = OCVO.OrdenServicio.ToString();
        lblNombreJefe.Text  = OCVO.NombreJefe;

        lblDescuento.Text      = OCVO.PorcentajeDescuento.ToString("F2");
        lblEnvio.Text          = String.Format("{0:#,##0.00}", OCVO.CostoEnvio);       //OCVO.CostoEnvio.ToString("F2");
        lblImpuesto.Text       = OCVO.PorcentajeImpuesto.ToString("F2");
        lblImpImportacion.Text = String.Format("{0:#,##0.00}", OCVO.CostoImportacion); //OCVO.CostoImportacion.ToString("F2");

        try
        {
            if (OCVO.AccountName.Trim().Length == 0)
            {
                ((Panel)GridView1.FooterRow.FindControl("pnlBankInformation")).Visible = false;
            }
            else
            {
                ((Label)GridView1.FooterRow.FindControl("lblAccountName")).Text   = OCVO.AccountName;
                ((Label)GridView1.FooterRow.FindControl("lblNameAddress")).Text   = OCVO.Address;
                ((Label)GridView1.FooterRow.FindControl("lblBankName")).Text      = OCVO.BankName;
                ((Label)GridView1.FooterRow.FindControl("lblAccountNumber")).Text = OCVO.AccountNumber;
                ((Label)GridView1.FooterRow.FindControl("lblAba")).Text           = OCVO.Aba;
                ((Label)GridView1.FooterRow.FindControl("lblBankAddress")).Text   = OCVO.BankAddress;
            }
        }
        catch (Exception ex)
        {
            //((Panel)GridView1.FooterRow.FindControl("pnlBankInformation")).Visible = false;
        }

        lblOrdenCompraId.Text = "Q" + (OCVO.OrigenId == 1 ? "N-" + OCVO.IdNacional.ToString() : "I-" + OCVO.IdInternacional.ToString());

        ProveedoresBL BL = new ProveedoresBL();
        ProveedoresVO VO = new ProveedoresVO();

        VO.Operacion   = ProveedoresVO.BUSCAR;
        VO.ProveedorId = OCVO.ProveedorId;
        VO             = (ProveedoresVO)BL.execute(VO);

        //txtContacto.Text = VO.Representante;
        lblProveedor.Text       = VO.Nombre;
        lblNombreProveedor.Text = VO.Nombre;
        lblRFC.Text             = VO.Rfc;

        DireccionesBL DBL = new DireccionesBL();
        DireccionesVO DVO = new DireccionesVO();

        DVO.Operacion   = DireccionesVO.BUSCAR;
        DVO.DireccionId = VO.DireccionId;
        DVO             = (DireccionesVO)DBL.execute(DVO);


        lblDireccion.Text = DVO.Calle + " " + DVO.NoExterior + " " + DVO.NoInterior + ", " + DVO.Colonia + ", " + DVO.Cp + ", " + DVO.Ciudad + ", " + DVO.Estado;
        lblEMail.Text     = DVO.Email;

        lblTelefono.Text = DVO.Telefono1;
        lblFax.Text      = DVO.Fax;

        TipoCambioVO VOtipoCambio = new TipoCambioVO();
        TipoCambioBL BLtipoCambio = new TipoCambioBL();

        VOtipoCambio.MonedaId  = OCVO.MonedaId;
        VOtipoCambio.Operacion = TipoCambioVO.BUSCAR;
        VOtipoCambio           = (TipoCambioVO)BLtipoCambio.execute(VOtipoCambio);

        if (VOtipoCambio.Descripcion != null)
        {
            lblMoneda.Text = VOtipoCambio.Descripcion;
        }

        usuarioVO VOUsuario = new usuarioVO();
        UsuarioBL BLUsuario = new UsuarioBL();

        VOUsuario.Operacion = usuarioVO.BUSCAR;
        VOUsuario.Usuarioid = OCVO.UsuarioId;
        VOUsuario           = (usuarioVO)BLUsuario.execute(VOUsuario);

        lblNombreAgente.Text = VOUsuario.Usuario_nombrecompleto;

        //InfoSessionVO infoSession = (InfoSessionVO)Session["InfoSession"];
        if (Int32.Parse(infoSession.getValor(InfoSessionVO.OFICINA).ToString()) != 4)
        {
            Image1.ImageUrl = "~/Imagenes/caidaCalvek.JPG";
        }
        else
        {
            Image1.ImageUrl = "~/Imagenes/logoCalvekAutomation.jpg";
        }

        OCBL        = null;
        OCVO        = null;
        BL          = null;
        VO          = null;
        DBL         = null;
        DVO         = null;
        VOUsuario   = null;
        BLUsuario   = null;
        infoSession = null;
    }
Exemplo n.º 24
0
 internal void cargarDatos(ProveedoresBL _proveedoresBL, ProductosBL _productosBL)
 {
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //lstRazonSocial.Items.Add("OTRO");
        }

        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        ////Permiso para generar OC de otro Agente.
        //error = Utilis.validaPermisos(Session, 40);
        //if (error.Equals(""))
        //{
        //    lstAgenteOficina.Visible = true;
        //    lblUsuario.Visible = true;
        //}

        lblFecha.Text = DateTime.Now.ToString("d");

        if (Request["ordenCompraId"] != null && !IsPostBack)
        {
            //GridView1.Columns[9].Visible = true; // Folios

            OrdenCompraBL OCBL = new OrdenCompraBL();
            OrdenCompraVO OCVO = new OrdenCompraVO();
            OCVO.Operacion     = OrdenCompraVO.BUSCAR;
            OCVO.OrdenCompraId = Int32.Parse(Request["ordenCompraId"].ToString());
            OCVO = (OrdenCompraVO)OCBL.execute(OCVO);

            lblFecha.Text        = OCVO.FechaAlta.ToString("d");
            lblFechaEntrega.Text = OCVO.FechaEntrega;
            lblContacto.Text     = OCVO.Contacto;
            lblViaEmbarque.Text  = OCVO.ViaEmbarque;
            lblFob.Text          = OCVO.Fob;
            lblMoneda.Text       = OCVO.NombreMoneda; //OCVO.MonedaId.ToString();
            lblProyecto.Text     = OCVO.NombreProyecto;

            //desactivaClasificacionOC();

            if (OCVO.NombreJob.Trim().Length > 0)
            {
                lblClasificacion.Text      = "JOB";
                lblClasificacionValor.Text = OCVO.NombreJob;
            }

            if (OCVO.OrdenServicio.Trim().Length > 0)
            {
                lblClasificacion.Text      = "O.S.";
                lblClasificacionValor.Text = OCVO.OrdenServicio;
            }

            if (OCVO.OtroClasificacionOC.Trim().Length > 0)
            {
                lblClasificacion.Text      = "OTRO";
                lblClasificacionValor.Text = OCVO.OtroClasificacionOC;
            }

            lblDescuentoTex.Text         = OCVO.PorcentajeDescuento.ToString("F2");
            lblEnvio.Text                = OCVO.CostoEnvio.ToString("F2");
            lblImpuestoTex.Text          = OCVO.PorcentajeImpuesto.ToString("F2");
            lblImpuestoImportacion.Text  = OCVO.CostoImportacion.ToString("F2");
            lblDatosTransferencia.Text   = OCVO.DatosTransferencia;
            lblIntruccionesEmbarque.Text = OCVO.InstruccionesEmbarque;
            lblTerminos.Text             = OCVO.Terminos;
            lblEstatusTex.Text           = OCVO.NombreEstatusOrdenCompra;//OCVO.EstatusOrdenCompraId.ToString();
            //txtFactura.Text = OCVO.Factura;
            lblPedimento.Text      = OCVO.Pedimento;
            lblFechaPedimento.Text = OCVO.FechaPedimento;


            lblOrigen.Text = OCVO.NombreOrigen; //OCVO.OrigenId.ToString();

            if (OCVO.OrigenId == 2)             //Internacional
            {
                lblEtiRFC.Text = "TAX ID:";
                camposBancoInterVisibles(true, false);
            }

            lblAccountNameTex.Text   = OCVO.AccountName;
            lblAddressTex.Text       = OCVO.Address;
            lblAccountNumberTex.Text = OCVO.AccountNumber;
            lblBankNameTex.Text      = OCVO.BankName;
            lblBankAddressTex.Text   = OCVO.BankAddress;
            lblAbaTex.Text           = OCVO.Aba;

            lblNombreProveedor.Text = OCVO.NombreProveedor;

            lblEtiquetaOrdenCompra.Visible = true;
            lblOrdenCompra.Visible         = true;
            lblOrdenCompraOculto.Text      = Request["ordenCompraId"].ToString();
            lblOrdenCompra.Text            = (OCVO.OrigenId == 1 ? "N-" + OCVO.IdNacional.ToString() : "I-" + OCVO.IdInternacional.ToString());//Request["ordenCompraId"].ToString();
            //lblOrdenCompra2.Text = lblOrdenCompra.Text;//Request["ordenCompraId"].ToString();


            //if (OCVO.DocRecibido == 1)
            //    ckbDocRecibido.Checked = true;

            if (OCVO.PagoDeContado == 1)
            {
                ckbPagodeContado.Checked = true;
            }

            //// determinar si el usuario tiene los permisos para modificar el campo de factura y Estatus.
            //String error2 = Utilis.validaPermisos(Session, 21);
            //if (error2.Equals(""))
            //{
            //    txtFolio.Enabled = true;
            //    //btnAgregar.Enabled = true;

            //    lstEstatus.Enabled = true;
            //    lblFactura.Enabled = true;
            //    lblEstatus.Enabled = true;
            //    lblOtroDocumento.Enabled = true;
            //    txtOtroDocumento.Enabled = true;
            //    ckbDocRecibido.Enabled = true;
            //}

            //lstOrigen.Enabled = false;

            //---
            ProveedoresBL BL = new ProveedoresBL();
            ProveedoresVO VO = new ProveedoresVO();
            VO.Operacion   = ProveedoresVO.BUSCAR;
            VO.ProveedorId = OCVO.ProveedorId;
            VO             = (ProveedoresVO)BL.execute(VO);



            lblRFC.Text = VO.Rfc;


            lblDireccionId.Text = VO.DireccionId.ToString();
            DireccionesBL DBL = new DireccionesBL();
            DireccionesVO DVO = new DireccionesVO();
            DVO.Operacion   = DireccionesVO.BUSCAR;
            DVO.DireccionId = VO.DireccionId;
            DVO             = (DireccionesVO)DBL.execute(DVO);



            lblDireccion.Text = DVO.Calle;
            lblColonia.Text   = DVO.Colonia.Trim();
            lblCiudad.Text    = DVO.Ciudad;
            lblEstado.Text    = DVO.Estado;
            lblCP.Text        = DVO.Cp;
            lblEmail.Text     = DVO.Email;
            //txtEmail.Text = DVO.Email;
            lblTelefono.Text = DVO.Telefono1;
            lblFax.Text      = DVO.Fax;
            //}

            lblEmail.Visible = false;
            //btnCaida.Visible = true;
        }
        else
        {
            //Session["DetalleId"] = "";
            //Session["Cantidad"] = "";
            //Session["Descripcion"] = "";
            //Session["PrecioUnitario"] = "";
        }
    }
Exemplo n.º 26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        OrdenCompraBL OCBL = new OrdenCompraBL();
        OrdenCompraVO OCVO = new OrdenCompraVO();

        OCVO.Operacion     = OrdenCompraVO.BUSCAR;
        OCVO.OrdenCompraId = Int32.Parse(Request["ordenCompraId"].ToString());
        OCVO = (OrdenCompraVO)OCBL.execute(OCVO);

        lblFecha.Text = OCVO.FechaAlta.ToString("d");

        lblFechaEntrega.Text          = OCVO.FechaEntrega;
        lblContacto.Text              = OCVO.Contacto;
        lblDatosTransferencia.Text    = OCVO.DatosTransferencia;
        lblInstruccionesEmbarque.Text = OCVO.InstruccionesEmbarque;
        lblTerminos.Text              = OCVO.Terminos;
        lblFob.Text         = OCVO.Fob;
        lblProyecto.Text    = OCVO.NombreProyecto;
        lblJob.Text         = OCVO.NombreJob;
        lblViaEmbarque.Text = OCVO.ViaEmbarque;
        lblMoneda.Text      = OCVO.MonedaId.ToString();
        Label6.Text         = OCVO.OrdenServicio.ToString();
        lblNombreJefe.Text  = OCVO.NombreJefe;

        lblDescuento.Text      = OCVO.PorcentajeDescuento.ToString("F2");
        lblEnvio.Text          = String.Format("{0:#,##0.00}", OCVO.CostoEnvio);       //OCVO.CostoEnvio.ToString("F2");
        lblImpuesto.Text       = OCVO.PorcentajeImpuesto.ToString("F2");
        lblImpImportacion.Text = String.Format("{0:#,##0.00}", OCVO.CostoImportacion); //OCVO.CostoImportacion.ToString("F2");

        try
        {
            if (OCVO.AccountName.Trim().Length == 0)
            {
                ((Panel)GridView1.FooterRow.FindControl("pnlBankInformation")).Visible = false;
            }
            else
            {
                ((Label)GridView1.FooterRow.FindControl("lblAccountName")).Text   = OCVO.AccountName;
                ((Label)GridView1.FooterRow.FindControl("lblNameAddress")).Text   = OCVO.Address;
                ((Label)GridView1.FooterRow.FindControl("lblBankName")).Text      = OCVO.BankName;
                ((Label)GridView1.FooterRow.FindControl("lblAccountNumber")).Text = OCVO.AccountNumber;
                ((Label)GridView1.FooterRow.FindControl("lblAba")).Text           = OCVO.Aba;
                ((Label)GridView1.FooterRow.FindControl("lblBankAddress")).Text   = OCVO.BankAddress;
            }
        }
        catch (Exception ex)
        {
            //((Panel)GridView1.FooterRow.FindControl("pnlBankInformation")).Visible = false;
        }

        lblOrdenCompraId.Text = (OCVO.OrigenId == 1 ? "N-" + OCVO.IdNacional.ToString() : "I-" + OCVO.IdInternacional.ToString());

        ProveedoresBL BL = new ProveedoresBL();
        ProveedoresVO VO = new ProveedoresVO();

        VO.Operacion   = ProveedoresVO.BUSCAR;
        VO.ProveedorId = OCVO.ProveedorId;
        VO             = (ProveedoresVO)BL.execute(VO);

        //txtContacto.Text = VO.Representante;
        lblProveedor.Text       = VO.Nombre;
        lblNombreProveedor.Text = VO.Nombre;
        lblRFC.Text             = VO.Rfc;

        DireccionesBL DBL = new DireccionesBL();
        DireccionesVO DVO = new DireccionesVO();

        DVO.Operacion   = DireccionesVO.BUSCAR;
        DVO.DireccionId = VO.DireccionId;
        DVO             = (DireccionesVO)DBL.execute(DVO);


        lblDireccion.Text = DVO.Calle + " " + DVO.NoExterior + " " + DVO.NoInterior + ", " + DVO.Colonia + ", " + DVO.Cp + ", " + DVO.Ciudad + ", " + DVO.Estado;
        lblEMail.Text     = DVO.Email;

        lblTelefono.Text = DVO.Telefono1;
        lblFax.Text      = DVO.Fax;

        TipoCambioVO VOtipoCambio = new TipoCambioVO();
        TipoCambioBL BLtipoCambio = new TipoCambioBL();

        VOtipoCambio.MonedaId  = OCVO.MonedaId;
        VOtipoCambio.Operacion = TipoCambioVO.BUSCAR;
        VOtipoCambio           = (TipoCambioVO)BLtipoCambio.execute(VOtipoCambio);

        if (VOtipoCambio.Descripcion != null)
        {
            lblMoneda.Text = VOtipoCambio.Descripcion;
        }

        usuarioVO VOUsuario = new usuarioVO();
        UsuarioBL BLUsuario = new UsuarioBL();

        VOUsuario.Operacion = usuarioVO.BUSCAR;
        VOUsuario.Usuarioid = OCVO.UsuarioId;
        VOUsuario           = (usuarioVO)BLUsuario.execute(VOUsuario);

        lblNombreAgente.Text = VOUsuario.Usuario_nombrecompleto;

        InfoSessionVO infoSession = (InfoSessionVO)Session["InfoSession"];

        if (Int32.Parse(infoSession.getValor(InfoSessionVO.OFICINA).ToString()) != 4)
        {
            Image1.ImageUrl = "~/Imagenes/caidaCalvek.JPG";
        }
        else
        {
            Image1.ImageUrl = "~/Imagenes/logoCalvekAutomation.jpg";
        }

        OCBL        = null;
        OCVO        = null;
        BL          = null;
        VO          = null;
        DBL         = null;
        DVO         = null;
        VOUsuario   = null;
        BLUsuario   = null;
        infoSession = null;
    }
Exemplo n.º 27
0
 public void cargarDatos(ProveedoresBL proveedoresBL)
 {
     listadeProveedoresBindingSource.DataSource = proveedoresBL.ListadeProveedores;
 }
Exemplo n.º 28
0
 public void cargarDatos(ProveedoresBL proveedorBL, CiudadBL ciudadesBL)
 {
     listadeProveedorBindingSource.DataSource = proveedorBL.ListadeProveedor;
     listadeCiudadesBindingSource.DataSource  = ciudadesBL.ListadeCiudades;
 }