Exemplo n.º 1
0
 private void ModificarServicio()
 {
     if (ugServicios.ActiveRow != null)
     {
         ItemOrdenProduccionServicio itemOrdenProduccionServicio = (ItemOrdenProduccionServicio)ugServicios.ActiveRow.Tag;
         FrmOrdenProducciondeServiciobak AgregarServicio = new FrmOrdenProducciondeServiciobak(OrdenProduccion, itemOrdenProduccionServicio, ItemOrdenProduccion);
         ItemOrdenProduccionServicio item = AgregarServicio.ObtenerServicio(OrdenProduccion, ItemOrdenProduccion);
         if (item != null)
         {
             ugServicios.ActiveRow.Tag = item;
             ugServicios.ActiveRow.Cells[colServicio].Activate();
             MostrarServicio(ugServicios.ActiveRow);
         }
     }
     else
     {
         Exception ex = new Exception("Debe seleccionar un servicio para poder modificar");
         Soft.Exceptions.SoftException.ShowException(ex);
     }
 }
Exemplo n.º 2
0
        private void ubNuevoServicio_Click(object sender, EventArgs e)
        {
            if (ItemOrdenProduccion == null) { return; }
            if (ActualizandoIU) { return; }
            try
            {
                FrmOrdenProducciondeServiciobak AgregarServicio = new FrmOrdenProducciondeServiciobak();
                ItemOrdenProduccionServicio item = AgregarServicio.ObtenerServicio(OrdenProduccion, ItemOrdenProduccion);
                if (item != null)
                {
                    UltraGridRow Row = ugServicios.DisplayLayout.Bands[0].AddNew();
                    Row.Tag = item;
                    Row.Cells[colServicio].Activate();
                    ugServicios.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode);
                    ItemOrdenProduccion.Servicios.Add(item);
                    //MostrarTotalServicio(ItemCotizacion);
                    MostrarServicio(Row);
                }

            }
            catch (Exception ex)
            {
                SoftException.Control(ex);
            }

            
        }