public RefundDialog(InscriptionDatesDto limites)
 {
     InitializeComponent();
     this.limites            = limites;
     Limite.DisplayDateEnd   = limites.FechaFin;
     Limite.DisplayDateStart = limites.FechaInicio;
     CloseButton.Visibility  = Visibility.Collapsed;
 }
 private void BtPlazo_Click(object sender, RoutedEventArgs e)
 {
     if (PreinscriptionIsChecked())
     {
         if (Plazos_list.Items.Count == 0)
         {
             try {
                 var plazos = new InscriptionDatesDto {
                     FechaInicio = (DateTime)InicioPlazo.SelectedDate,
                     FechaFin    = (DateTime)FinPlazo.SelectedDate,
                     precio      = 0
                 };
                 Plazos_list.SelectionMode = SelectionMode.Single;
                 Plazos_list.Items.Add(plazos);
                 FinPlazo.IsEnabled    = false;
                 InicioPlazo.IsEnabled = false;
                 BtPlazo.IsEnabled     = false;
             }
             catch (Exception) { }
         }
     }
     else
     {
         if (Plazos_list.SelectedItem == null)
         {
             try {
                 var plazos = new InscriptionDatesDto {
                     FechaInicio = (DateTime)InicioPlazo.SelectedDate,
                     FechaFin    = (DateTime)FinPlazo.SelectedDate
                 };
                 if (PrecioInscripcion.Text == "")
                 {
                     plazos.precio = 0;
                 }
                 else
                 {
                     plazos.precio = double.Parse(PrecioInscripcion.Text);
                 }
                 Plazos_list.SelectionMode = SelectionMode.Single;
                 Plazos_list.Items.Add(plazos);
                 FinPlazo.SelectedDate        = null;
                 InicioPlazo.SelectedDate     = plazos.FechaFin.AddDays(1);
                 InicioPlazo.DisplayDateStart = plazos.FechaFin;
                 PrecioInscripcion.Text       = null;
                 InicioPlazo.IsEnabled        = false;
                 FinPlazo.DisplayDateStart    = InicioPlazo.SelectedDate;
             }
             catch (Exception) { }
         }
     }
 }
 private void BtRefund_Click(object sender, RoutedEventArgs e)
 {
     if (Plazos_list.Items.Count > 0 && FechaCompeticion.SelectedDate != null)
     {
         var nuevo = new InscriptionDatesDto();
         nuevo          = (InscriptionDatesDto)Plazos_list.Items.GetItemAt(0);
         nuevo.FechaFin = (DateTime)FechaCompeticion.SelectedDate;
         var refunds = new RefundDialog(nuevo);
         refunds.ShowDialog();
         refundsList = refunds.refunds;
     }
     else
     {
         MessageBox.Show("Por favor, introduzca primero los plazos de inscripción y la fecha de competición");
     }
 }
 public EnrollDatesCompetition(ref DBConnection conn, long competitionID, InscriptionDatesDto date)
 {
     _competition = competitionID;
     _date        = date;
     _conn        = conn;
 }
 public AddInscriptionDates(ref DBConnection conn, InscriptionDatesDto plazo, CompetitionDto competition)
 {
     _plazo       = plazo;
     _conn        = conn;
     _competition = competition;
 }
示例#6
0
        public void AddInscriptionDate(InscriptionDatesDto plazo, CompetitionDto competition)
        {
            var add = new AddInscriptionDates(ref _conn, plazo, competition);

            add.Execute();
        }
示例#7
0
        public void EnrollCompetitionDates(long id, InscriptionDatesDto date)
        {
            var enroll = new EnrollDatesCompetition(ref _conn, id, date);

            enroll.Execute();
        }