private void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                this.dateInterval = new ScheduleDTO();
                AgregarModificarIntervaloFecha ventana = new AgregarModificarIntervaloFecha();
                this.dgvDateInterval.Add(ventana, this.dateInterval);
                iController.AddSchedule(this.dateInterval);
                this.CargarDateDataGrid();
            }
            catch (Exception)
            {

                throw;
            }
        }
Beispiel #2
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         using (var controller = this.iFactory.GetController <ManageScheduleHandler>())
         {
             ScheduleDTO dateInterval = new ScheduleDTO();
             AgregarModificarIntervaloFecha ventana = new AgregarModificarIntervaloFecha(this.iFactory);
             if (this.dgvDateInterval.Add(ventana, dateInterval))
             {
                 controller.AddSchedule(dateInterval);
                 this.CargarDateDataGrid();
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #3
0
 private void dgvDateInterval_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         using (var controller = this.iFactory.GetController <ManageScheduleHandler>())
         {
             DataGridViewRow row                    = dgvDateInterval.CurrentRow;
             ScheduleDTO     dateInterval           = dgvDateInterval.GetItem(row.Index);
             AgregarModificarIntervaloFecha ventana = new AgregarModificarIntervaloFecha(this.iFactory);
             if (this.dgvDateInterval.Modify(ventana, dateInterval))
             {
                 controller.ModifySchedule(dateInterval);
                 this.CargarDateDataGrid();
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
        private void dgvDateInterval_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                DataGridViewRow row = dgvDateInterval.CurrentRow;
                this.dateInterval = dgvDateInterval.GetItem(row.Index);
                AgregarModificarIntervaloFecha ventana = new AgregarModificarIntervaloFecha();
                this.dgvDateInterval.Modify(ventana, this.dateInterval);
                iController.ModifySchedule(this.dateInterval);
            }
            catch (Exception)
            {

                throw;
            }

        }