Пример #1
0
 public void MostrarServicios(ItemSolicitudCotizacion ItemSolicitud)
 {
     base.ClearAllRows(ref ugServicios);
     foreach (ItemSolicitudCotizacionServicio Item in ItemSolicitud.Servicios)
     {
         UltraGridRow Row = ugServicios.DisplayLayout.Bands[0].AddNew();
         Row.Tag = Item;
         MostrarServicio(Row);
     }
 }
        public override void  Start()
        {
            try
            {
                Plantilla           Plantilla = (Plantilla)base.m_ObjectFlow;
                SolicitudCotizacion Solicitud = new SolicitudCotizacion();
                Solicitud.Cantidad        = 1;
                Solicitud.Descripcion     = Plantilla.Nombre;
                Solicitud.TipoDocumento   = (TipoSolicitudCotizacion)HelperNHibernate.GetEntityByID("TipoSolicitudCotizacion", "B8AA5B25-9180-44A6-B750-F96D1EA17147");
                Solicitud.Observacion     = "";
                Solicitud.LineaProduccion = Plantilla.LineaProduccion;
                foreach (ItemPlantilla Item in Plantilla.Items)
                {
                    ItemSolicitudCotizacion ItemSolicitud = Solicitud.AddItem();
                    ItemSolicitud.Nombre = Item.Nombre;

                    if (Item.TipoUnidad != null)
                    {
                        ItemSolicitud.TipoUnidad = Item.TipoUnidad.Nombre;
                    }
                    ItemSolicitud.Operacion           = Item.Operacion;
                    ItemSolicitud.Material            = Item.Material;
                    ItemSolicitud.m_FiltroMaquina     = Item.ObtenerFiltroMaquinas();
                    ItemSolicitud.TieneMedidaAbierta  = Item.TieneMedidaAbierta;
                    ItemSolicitud.TieneMedidaCerrada  = Item.TieneMedidaCerrada;
                    ItemSolicitud.TieneTiraRetira     = Item.TieneTiraRetira;
                    ItemSolicitud.TieneGraficos       = Item.TieneGraficos;
                    ItemSolicitud.TieneMaquina        = Item.TieneMaquina;
                    ItemSolicitud.TieneMaterial       = Item.TieneMaterial;
                    ItemSolicitud.TieneTipoUnidad     = Item.TieneTipoUnidad;
                    ItemSolicitud.UnidadMedidaAbierta = Item.UnidadMedidaAbierta;
                    ItemSolicitud.TieneFondo          = Item.TieneFondo;

                    foreach (ItemPlantillaServicio ItemServicio in Item.Servicios)
                    {
                        ItemSolicitudCotizacionServicio ItemSolicitudSerivcio = ItemSolicitud.AddServicio();
                        ItemSolicitudSerivcio.Servicio        = ItemServicio.Servicio;
                        ItemSolicitudSerivcio.Unidad          = ItemServicio.Unidad;
                        ItemSolicitudSerivcio.CantidadInicial = ItemServicio.Cantidad;
                        ItemSolicitudSerivcio.CantidadFinal   = ItemServicio.Cantidad;
                    }
                }
                base.m_ObjectFlow    = Solicitud;
                base.m_EntidadSF     = (EntidadSF)HelperNHibernate.GetEntityByID("EntidadSF", "1DEDB5BA-376B-41CE-9923-29B6CF61B9E6");
                base.m_ResultProcess = EnumResult.SUCESS;
            }
            catch (Exception)
            {
                base.m_ResultProcess = EnumResult.ERROR;
            }
            base.Start();
        }
Пример #3
0
 private void btnCopiarElemento_Click(object sender, EventArgs e)
 {
     try
     {
         if (ItemSolicitudCotizacion == null)
         {
             return;
         }
         ItemSolicitudCotizacion ItemCopia = ItemSolicitudCotizacion.Copiar();
         SolicitudCotizacion.Items.Add(ItemCopia);
         MostrarItems();
     }
     catch (Exception ex)
     {
         SoftException.Control(ex);
     }
 }
Пример #4
0
 private void utSolicitudCotizacion_AfterSelect(object sender, Infragistics.Win.UltraWinTree.SelectEventArgs e)
 {
     try
     {
         UltraTreeNode Node = utSolicitudCotizacion.ActiveNode;
         if (Node != null)
         {
             ItemSolicitudCotizacion       = (ItemSolicitudCotizacion)Node.Tag;
             utcItemSolicitid.Tabs[0].Text = Node.Text;
             txtNombre.Text = Node.Text;
             MostrarItem(ItemSolicitudCotizacion);
         }
     }
     catch (Exception ex)
     {
         SoftException.Control(ex);
     }
 }
Пример #5
0
        public void MostrarItem(ItemSolicitudCotizacion Item)
        {
            ActualizandoIU             = true;
            GrupoMedidaAbierta.Visible = Item.TieneMedidaAbierta;
            GrupoMedidaCerrada.Visible = Item.TieneMedidaCerrada;
            GruposTiras.Visible        = Item.TieneTiraRetira;

            if (Item.TieneTipoUnidad)
            {
                GrupoMedidaAbierta.Text = "Medida de " + Item.TipoUnidad;
            }
            else
            {
                GrupoMedidaAbierta.Text = "Medida Abierta";
            }


            ssMaquina.Visible   = Item.TieneMaquina;
            lblMaquina.Visible  = Item.TieneMaquina;
            ssMaterial.Visible  = Item.TieneMaterial;
            lblMaterial.Visible = Item.TieneMaterial;

            lblTipoUnidad.Visible   = Item.TieneTipoUnidad;
            txtCantidadItem.Visible = Item.TieneTipoUnidad;

            chkTieneTipoUnidad.Checked = Item.TieneTipoUnidad;
            comboMedida.Text           = Item.UnidadMedidaAbierta;

            txtMedidaAnchoCaja.Visible = Item.TieneFondo;
            labelFondo.Visible         = Item.TieneFondo;

            ssOperacion.Text        = (Item.Operacion != null) ? Item.Operacion.Nombre : "";
            ssMaquina.Text          = (Item.Maquina != null) ? Item.Maquina.Nombre : "";
            ssMaterial.Text         = (Item.Material != null) ? Item.Material.Descripcion : "";
            lblTipoUnidad.Text      = Item.TipoUnidad;
            txtObservacionItem.Text = Item.Observacion;

            txtMedidaAnchoCaja.Value = ItemSolicitudCotizacion.MedidaAnchoCaja;

            if (Item.TipoUnidad != null)
            {
                if (Item.TieneTipoUnidad)
                {
                    txtCantidadItem.Value   = Item.CantidadUnidad;
                    txtCantidadItem.Visible = true;
                }
            }
            else
            {
                txtCantidadItem.Value   = 0;
                txtCantidadItem.Visible = false;
            }

            txtCantidadItemProduccion.Value = Item.CantidadItem;

            txtMedidaAbiertoLargo.Value = Item.MedidaAbiertaLargo;
            txtMedidaAbiertoAlto.Value  = Item.MedidaAbiertaAlto;
            txtMedidaCerradaLargo.Value = Item.MedidaCerradaLargo;
            txtMedidaCerradaAlto.Value  = Item.MedidaCerradaAlto;
            txtImpresoTiraColor.Value   = Item.ImpresoTiraColor;
            txtImpresoRetiraColor.Value = Item.ImpresoRetiraColor;
            //txtNombre.Text = Item.Nombre;
            chkTieneMedidaAbierta.Checked  = Item.TieneMedidaAbierta;
            chkTieneMedidadCerrada.Checked = Item.TieneMedidaCerrada;
            chkTieneTiraRetira.Checked     = Item.TieneTiraRetira;
            chkTieneGraficos.Checked       = Item.TieneGraficos;
            chkTieneMaquina.Checked        = Item.TieneMaquina;
            chkTieneMaterial.Checked       = Item.TieneMaterial;
            CheckTieneFondo.Checked        = Item.TieneFondo;
            MostrarServicios(Item);
            ActualizandoIU = false;
        }