protected override void EditarPrecioAction()
        {
            if (Datos_PrecioTrayecto.Current == null)
            {
                return;
            }

            PrecioTrayecto     precio = (PrecioTrayecto)Datos_PrecioTrayecto.Current;
            PrecioTrayectoForm form   = new PrecioTrayectoForm(precio);

            form.ShowDialog(this);
        }
示例#2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="IsModal"></param>
 /// <param name="precio">Si es null, se creara un precio nuevo</param>
 public PrecioTrayectoForm(bool IsModal, PrecioTrayecto precio)
     : base(IsModal)
 {
     InitializeComponent();
     if (precio == null)
     {
         _entity   = PrecioTrayecto.NewChild();
         this.Text = Resources.Labels.PRECIO_NEW_TITLE;
     }
     else
     {
         _entity   = precio;
         this.Text = Resources.Labels.PRECIO_EDIT_TITLE;
     }
     SetFormData();
 }
        protected override void EliminarPrecioAction()
        {
            if (Datos_PrecioTrayecto.Current == null)
            {
                return;
            }

            PrecioTrayecto precio = (PrecioTrayecto)Datos_PrecioTrayecto.Current;

            if (MessageBox.Show(moleQule.Face.Resources.Messages.DELETE_CONFIRM,
                                moleQule.Face.Resources.Labels.ADVISE_TITLE,
                                MessageBoxButtons.YesNo,
                                MessageBoxIcon.Question) == DialogResult.Yes)
            {
                _entity.PrecioTrayectos.Remove(precio);
            }
        }
示例#4
0
 /// <summary>
 /// Constructo para editar un precio
 /// </summary>
 /// <param name="precio">Precio a editar</param>
 public PrecioTrayectoForm(PrecioTrayecto precio)
     : this(true, precio)
 {
 }