Ejemplo n.º 1
0
 private void ubNuevoServicio_Click(object sender, EventArgs e)
 {
     FrmCotizaciondeServicio AgregarServicio = new FrmCotizaciondeServicio();
     ItemCotizacionServicio item = AgregarServicio.ObtenerServicio(Cotizacion, ItemCotizacion);
     if (item != null)
     {
         UltraGridRow Row = ugServicios.DisplayLayout.Bands[0].AddNew();
         Row.Tag = item;
         Row.Cells[colTipoAMM].Activate();
         ugServicios.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode);
         ItemCotizacion.Servicios.Add(item);
         MostrarTotalAMM(ItemCotizacion);
         MostrarAAM(Row);
     }
 }
Ejemplo n.º 2
0
 private void ModificarServicio()
 {
     if (ugServicios.ActiveRow != null)
     {
         ItemCotizacionServicio itemCotizacionServicio = (ItemCotizacionServicio)ugServicios.ActiveRow.Tag;
         FrmCotizaciondeServicio AgregarServicio = new FrmCotizaciondeServicio(Cotizacion, itemCotizacionServicio, ItemCotizacion);
         ItemCotizacionServicio item = AgregarServicio.ObtenerServicio(Cotizacion, ItemCotizacion);
         if (item != null)
         {
             ugServicios.ActiveRow.Tag = item;
             ugServicios.ActiveRow.Cells[colTipoAMM].Activate();
             MostrarAAM(ugServicios.ActiveRow);
         }
     }
     else
     {
         Exception ex = new Exception("Debe seleccionar un servicio para poder modificar");
         Soft.Exceptions.SoftException.ShowException(ex);
     }
 }