Example #1
0
 private void ubNuevoItemTransporte_Click(object sender, EventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(SalidaCaja.IDListaPreciosTransporte))
         {
             throw new Exception("Debe de seleccionar una lista de precios de transporte...");
         }
         else
         {
             FrmSeleccionarDireccion FrmSeleccionar = new FrmSeleccionarDireccion();
             ItemSalidaCaja          itemSalidaCaja = SalidaCaja.AddItem();
             itemSalidaCaja.Cantidad         = 1;
             itemSalidaCaja.EsTipoTransporte = true;
             FrmSeleccionar.ObtenerItemSalidaCaja(ref itemSalidaCaja);
             CalcularPrecio(itemSalidaCaja);
             UltraGridRow RowNuevo = ugItems.DisplayLayout.Bands[0].AddNew();
             RowNuevo.Tag = itemSalidaCaja;
             Mostrar();
         }
     }
     catch (Exception ex)
     {
         SoftException.Control(ex);
     }
 }
Example #2
0
 private void ubNuevoItem_Click(object sender, EventArgs e)
 {
     try
     {
         UltraGridRow   RowNuevo = ugItems.DisplayLayout.Bands[0].AddNew();
         ItemSalidaCaja item     = SalidaCaja.AddItem();
         item.Cantidad = 1;
         RowNuevo.Tag  = item;
     }
     catch (Exception ex)
     {
         SoftException.Control(ex);
     }
 }