Пример #1
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            PlanesDesktop pd = new PlanesDesktop(ApplicationForm.ModoForm.Alta);

            pd.ShowDialog();
            Listar();
        }
Пример #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();
        }
Пример #3
0
        private void BotonAgregar_Click(object sender, EventArgs e)
        {
            PlanesDesktop planesDesktop = new PlanesDesktop(PlanesDesktop.ModoForm.Alta);

            planesDesktop.ShowDialog();
            this.Listar();
        }
Пример #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();
        }
Пример #5
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            PlanesDesktop frmPlanesDesktop = new PlanesDesktop(ApplicationForm.ModoForm.Alta);

            frmPlanesDesktop.ShowDialog();
            frmPlanesDesktop.Dispose();
        }
Пример #6
0
        private void tsbNuevo_Click(object sender, EventArgs e)
        {
            PlanesDesktop FormPlan = new PlanesDesktop(Abm.ModoForm.Alta);

            FormPlan.ShowDialog();
            this.Listar();
        }
Пример #7
0
        private void tscNuevo_Click(object sender, EventArgs e)
        {
            PlanesDesktop formPlan = new PlanesDesktop(ApplicationForm.ModoForm.Alta);

            formPlan.ShowDialog();
            this.Listar();
        }
Пример #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();
        }
Пример #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();
        }
Пример #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();
        }
Пример #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();
        }
Пример #12
0
 public static PlanesDesktop GetInstance()
 {
     if (singleton == null)
     {
         singleton = new PlanesDesktop();
     }
     return(singleton);
 }
Пример #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();
 }
Пример #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();
     }
 }
Пример #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();
     }
 }
Пример #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();
            }
        }
Пример #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();
 }
Пример #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
     {
     }
 }
Пример #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();
     }
 }
Пример #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);
     }
 }
Пример #21
0
        private void tsbNuevo_Click(object sender, EventArgs e)
        {
            PlanesDesktop pform = new PlanesDesktop(ApplicationForm.ModoForm.Alta);

            pform.ShowDialog();
        }