Ejemplo n.º 1
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            PlanesDesktop pd = new PlanesDesktop(ApplicationForm.ModoForm.Alta);

            pd.ShowDialog();
            Listar();
        }
Ejemplo n.º 2
0
        private void tsbEliminar_Click(object sender, EventArgs e)
        {
            int           ID    = ((Business.Entities.Plan) this.dgvPlanes.SelectedRows[0].DataBoundItem).ID;
            PlanesDesktop pform = new PlanesDesktop(ApplicationForm.ModoForm.Baja, ID);

            pform.ShowDialog();
        }
Ejemplo n.º 3
0
        private void BotonAgregar_Click(object sender, EventArgs e)
        {
            PlanesDesktop planesDesktop = new PlanesDesktop(PlanesDesktop.ModoForm.Alta);

            planesDesktop.ShowDialog();
            this.Listar();
        }
Ejemplo n.º 4
0
        private void tsbEliminar_Click(object sender, EventArgs e)
        {
            PlanesDesktop pldesk = new PlanesDesktop(((Plan)dataGridViewPlanes.SelectedRows[0].DataBoundItem).ID, ApplicationForm.ModoForm.Baja);

            pldesk.ShowDialog();
            Listar();
        }
Ejemplo n.º 5
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            PlanesDesktop frmPlanesDesktop = new PlanesDesktop(ApplicationForm.ModoForm.Alta);

            frmPlanesDesktop.ShowDialog();
            frmPlanesDesktop.Dispose();
        }
Ejemplo n.º 6
0
        private void tsbNuevo_Click(object sender, EventArgs e)
        {
            PlanesDesktop FormPlan = new PlanesDesktop(Abm.ModoForm.Alta);

            FormPlan.ShowDialog();
            this.Listar();
        }
Ejemplo n.º 7
0
        private void tscNuevo_Click(object sender, EventArgs e)
        {
            PlanesDesktop formPlan = new PlanesDesktop(ApplicationForm.ModoForm.Alta);

            formPlan.ShowDialog();
            this.Listar();
        }
Ejemplo n.º 8
0
        private void tsb_Editar_Click(object sender, EventArgs e)
        {
            int           ID         = ((Business.Entities.Plan) this.dgv_planes.SelectedRows[0].DataBoundItem).ID;
            PlanesDesktop formPlanes = new PlanesDesktop(ID, ApplicationForm.ModoForm.Modificacion);

            formPlanes.ShowDialog();
            this.Listar();
        }
Ejemplo n.º 9
0
        private void tsbEditar_Click(object sender, EventArgs e)
        {
            int           ID       = Convert.ToInt32(((DataRowView)this.dgvPlanes.SelectedRows[0].DataBoundItem)["id_plan"].ToString());
            PlanesDesktop formPlan = new PlanesDesktop(ID, ApplicationForm.ModoForm.Modificacion);

            formPlan.ShowDialog();
            this.Listar();
        }
Ejemplo n.º 10
0
        private void tsbEliminar_Click(object sender, EventArgs e)
        {
            int           ID  = ((Entidades.Planes) this.dgvPlanes.SelectedRows[0].DataBoundItem).Id;
            PlanesDesktop pld = new PlanesDesktop(ID, ApplicationForm.ModoForm.Baja);

            pld.ShowDialog();
            this.Listar();
        }
Ejemplo n.º 11
0
        private void tsbEliminar_Click(object sender, EventArgs e)
        {
            int           ID       = ((Business.Entities.Plan) this.dgvPlan.SelectedRows[0].DataBoundItem).ID;
            PlanesDesktop FormPlan = new PlanesDesktop(ID, Abm.ModoForm.Baja);

            FormPlan.ShowDialog();
            this.Listar();
        }
Ejemplo n.º 12
0
 public static PlanesDesktop GetInstance()
 {
     if (singleton == null)
     {
         singleton = new PlanesDesktop();
     }
     return(singleton);
 }
Ejemplo n.º 13
0
 private void tsEliminar_Click(object sender, EventArgs e)
 {
     if (this.dgvPlanes.SelectedRows.Count != 0)
     {
         int           ID       = ((Business.Entities.Plan) this.dgvPlanes.SelectedRows[0].DataBoundItem).ID;
         PlanesDesktop formPlan = new PlanesDesktop(ID, ApplicationForm.ModoForm.Baja);
         formPlan.ShowDialog();
     }
     this.Listar();
 }
Ejemplo n.º 14
0
 private void btnEditar_Click(object sender, EventArgs e)
 {
     if (dgvPlanes.SelectedRows != null && dgvPlanes.MultiSelect == false && dgvPlanes.SelectionMode == DataGridViewSelectionMode.FullRowSelect)
     {
         int           ID = ((Plan)dgvPlanes.SelectedRows[0].DataBoundItem).ID;
         PlanesDesktop pd = new PlanesDesktop(ID, ApplicationForm.ModoForm.Modificacion);
         pd.ShowDialog();
         Listar();
     }
 }
Ejemplo n.º 15
0
 private void btnEliminar_Click(object sender, EventArgs e)
 {
     if (ValidarDGV(dgvPlanes))
     {
         int           ID = ((Business.Entities.Plan) this.dgvPlanes.SelectedRows[0].DataBoundItem).Id;
         PlanesDesktop frmPlanesDesktop = new PlanesDesktop(ID, ModoForm.Baja);
         frmPlanesDesktop.ShowDialog();
         frmPlanesDesktop.Dispose();
     }
 }
Ejemplo n.º 16
0
        private void tsbEliminar_Click(object sender, EventArgs e)
        {
            var rta = MessageBox.Show("¿Desea eliminar el Plan?", "Advertencia", MessageBoxButtons.YesNo);

            if (rta == DialogResult.Yes)
            {
                int           ID       = Convert.ToInt32(((DataRowView)this.dgvPlanes.SelectedRows[0].DataBoundItem)["id_plan"].ToString());
                PlanesDesktop formPlan = new PlanesDesktop(ID, ApplicationForm.ModoForm.Baja);
                formPlan.ShowDialog();
                this.Listar();
            }
        }
Ejemplo n.º 17
0
 private void BotonBorrar_Click(object sender, EventArgs e)
 {
     if (this.DataGridViewPlanes.SelectedRows is null)
     {
     }
     else
     {
         int           id            = ((Business.Entities.Plan) this.DataGridViewPlanes.SelectedRows[0].DataBoundItem).ID;
         PlanesDesktop planesDesktop = new PlanesDesktop(id, PlanesDesktop.ModoForm.Baja);
         planesDesktop.ShowDialog();
     }
     this.Listar();
 }
Ejemplo n.º 18
0
 private void tsbEditar_Click(object sender, EventArgs e)
 {
     try
     {
         int           ID       = ((Business.Entities.Plan) this.dgvPlanes.SelectedRows[0].DataBoundItem).ID;
         PlanesDesktop formPlan = new PlanesDesktop(ID, FormPrincipal.ModoForm.Modificacion);
         formPlan.ShowDialog();
         this.Listar();
     }
     catch
     {
     }
 }
Ejemplo n.º 19
0
 private void tsbNuevo_Click(object sender, EventArgs e)
 {
     try
     {
         PlanesDesktop pd = new PlanesDesktop(ApplicationForm.ModoForm.Alta);
         pd.ShowDialog();
     }
     catch (Exception Error)
     {
         NotificarError(Error);
     }
     finally
     {
         Listar();
     }
 }
Ejemplo n.º 20
0
 private void tsbEditar_Click(object sender, EventArgs e)
 {
     if (dgvPlanes.SelectedRows != null)
     {
         int id = ((Business.Entities.Planes)dgvPlanes.SelectedRows[0].DataBoundItem).ID;
         try
         {
             PlanesDesktop pd = new PlanesDesktop(ApplicationForm.ModoForm.Modificacion, id);
             pd.ShowDialog();
         }
         catch (Exception Error)
         {
             NotificarError(Error);
         }
         finally
         {
             Listar();
         }
     }
     else if (dgvPlanes.SelectedRows == null)
     {
         MessageBox.Show("Error", "Seleccione un Usuario\n para edirar", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Ejemplo n.º 21
0
        private void tsbNuevo_Click(object sender, EventArgs e)
        {
            PlanesDesktop pform = new PlanesDesktop(ApplicationForm.ModoForm.Alta);

            pform.ShowDialog();
        }