Пример #1
0
        private void tsbNuevo_Click(object sender, EventArgs e)
        {

           PlanDesktop ud = new PlanDesktop(ApplicationForm.ModoForm.Alta);
            ud.ShowDialog();
            this.Listar();
        }
Пример #2
0
        private void tbsNuevo_Click(object sender, EventArgs e)
        {
            PlanDesktop formPlan = new PlanDesktop(ApplicationForm.ModoForm.Alta);

            formPlan.ShowDialog();
            this.Listar();
        }
Пример #3
0
 private void tsbEditar_Click(object sender, EventArgs e)
 {
     int ID = ((Entidades.Plan)this.dgvPlanes.SelectedRows[0].DataBoundItem).IdPlan;
     PlanDesktop ud = new PlanDesktop(ApplicationForm.ModoForm.Modificacion, ID);
     ud.ShowDialog();
     this.Listar();
 }
Пример #4
0
 private void tsbEditar_Click(object sender, EventArgs e)
 {
     int ID = ((Business.Entities.Plan)this.dgvPlanes.SelectedRows[0].DataBoundItem).ID;
     PlanDesktop PlanDesktop = new PlanDesktop(ID, ApplicationForm.ModoForm.Modificacion);
     PlanDesktop.ShowDialog();
     this.Listar();
 }
Пример #5
0
        private void tsbNuevo_Click(object sender, EventArgs e)
        {
            PlanDesktop iuPlanes = new PlanDesktop(ApplicationForm.ModoForm.Alta);

            iuPlanes.ShowDialog();
            listar();
        }
Пример #6
0
        private void tsNuevo_Click(object sender, EventArgs e)
        {
            PlanDesktop planDesktop = new PlanDesktop(ModoForm.Alta);

            planDesktop.ShowDialog();
            this.Listar();
        }
Пример #7
0
        private void tsEditar_Click(object sender, EventArgs e)
        {
            int         ID          = (int)this.dgvPlanes.SelectedRows[0].Cells["id_plan"].Value;
            PlanDesktop planDesktop = new PlanDesktop(ID, ApplicationForm.ModoForm.Modificacion);

            planDesktop.ShowDialog();
            this.Listar();
        }
Пример #8
0
        private void tsbEditar_Click(object sender, EventArgs e)
        {
            int         ID       = ((Business.Entities.Plan) this.dgvPlanes.SelectedRows[0].DataBoundItem).ID;
            PlanDesktop formPlan = new PlanDesktop(ID, ApplicationForm.ModoForm.Modificacion);

            formPlan.ShowDialog();
            this.Listar();
        }
Пример #9
0
        private void tsbNuevo_Click(object sender, EventArgs e)
        {
            PlanDesktop PD = new PlanDesktop(AplicationForm.ModoForm.Alta);
            PD.Text = "Alta plan";
            PD.ShowDialog();

            this.Listar();
        }
Пример #10
0
 private void tsbNuevo_Click(object sender, EventArgs e)
 {
     PlanDesktop formPlan = new PlanDesktop(ApplicationForm.ModoForm.Alta);
     formPlan.btnAceptar.Text = "Guardar";
     formPlan.txtID.Visible = false;
     formPlan.ShowDialog();
     this.Listar();
 }
Пример #11
0
 private void tsbEliminar_Click(object sender, EventArgs e)
 {
     if (this.dgvPlanes.SelectedRows.Count > 0)
     {
         PlanDesktop formPlan = new PlanDesktop(((Plan)this.dgvPlanes.SelectedRows[0].DataBoundItem).ID, ApplicationForm.ModoForm.Baja);
         formPlan.ShowDialog();
         this.Listar();
     }
 }
Пример #12
0
        private void tsbNuevo_Click(object sender, EventArgs e)
        {
            PlanDesktop PD = new PlanDesktop(AplicationForm.ModoForm.Alta);

            PD.Text = "Alta plan";
            PD.ShowDialog();

            this.Listar();
        }
Пример #13
0
 private void tsEliminar_Click(object sender, EventArgs e)
 {
     if (this.dgvPlanes.SelectedRows.Count != 0)
     {
         int         ID          = (int)this.dgvPlanes.SelectedRows[0].Cells["id_plan"].Value;
         PlanDesktop plandEsktop = new PlanDesktop(ID, ApplicationForm.ModoForm.Baja);
         plandEsktop.ShowDialog();
         this.Listar();
     }
 }
Пример #14
0
 private void tsbEliminar_Click(object sender, EventArgs e)
 {
     if (this.dgvPlanes.SelectedRows.Count != 0)
     {
         int ID = ((Business.Entities.Plan)this.dgvPlanes.SelectedRows[0].DataBoundItem).ID;
         PlanDesktop formPlan = new PlanDesktop(ID, ApplicationForm.ModoForm.Baja);
         formPlan.ShowDialog();
         this.Listar();
     }
 }
Пример #15
0
 private void tsdEliminar_Click(object sender, EventArgs e)
 {
     if (this.dgvPlanes.Rows.Count > 1)
     {
         int         ID       = ((Business.Entities.Plan) this.dgvPlanes.SelectedRows[0].DataBoundItem).ID;
         PlanDesktop formplan = new PlanDesktop(ID, ApplicationForm.ModoForm.Baja);
         formplan.ShowDialog();
         this.Listar();
     }
 }
Пример #16
0
 public override void tsbEliminar_Click(object sender, EventArgs e)
 {
     if (this.dgvPlan.SelectedRows.Count > 0)
     {
         int         ID       = Convert.ToInt32(this.dgvPlan.SelectedRows[0].Cells["ID"].Value);
         PlanDesktop formPlan = new PlanDesktop(ID, ApplicationForm.ModoForm.Baja);
         formPlan.ShowDialog();
         this.Listar();
     }
 }
Пример #17
0
        private void tsbEditar_Click(object sender, EventArgs e)
        {
            if (this.dgvPlan.SelectedRows.Count != 0)
            {
                int ID = ((Plan)this.dgvPlan.SelectedRows[0].DataBoundItem).ID;

                PlanDesktop PD = new PlanDesktop(ID, AplicationForm.ModoForm.Modificacion);
                PD.Text = "Editar plan";
                PD.ShowDialog();
                }
        }
Пример #18
0
        private void tsbEditar_Click(object sender, EventArgs e)
        {
            if (this.dgvPlan.SelectedRows.Count != 0)
            {
                int ID = ((Plan)this.dgvPlan.SelectedRows[0].DataBoundItem).ID;

                PlanDesktop PD = new PlanDesktop(ID, AplicationForm.ModoForm.Modificacion);
                PD.Text = "Editar plan";
                PD.ShowDialog();
            }
        }
Пример #19
0
        private void TsbNuevo_Click(object sender, EventArgs e)
        {
            this.Enabled = false;
            PlanDesktop formPlanDesk = new PlanDesktop();

            formPlanDesk.ShowDialog();
            this.Enabled = true;
            this.Focus();

            this.Listar();
        }
Пример #20
0
        private void tsbEditar_Click_1(object sender, EventArgs e)
        {
            if (!(this.dgvPlanes.SelectedRows.Count.Equals(0)))
            {

                int ID = ((Business.Entities.Plan)this.dgvPlanes.SelectedRows[0].DataBoundItem).ID;
                PlanDesktop formEdit = new PlanDesktop(ID,ApplicationForm.ModoForm.Modificacion);
                formEdit.ShowDialog();
                this.Listar();

            }
            else this.Notificar("No hay fila seleccionada", "Por favor, seleccione una fila", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
        }
Пример #21
0
 public override void tsbEditar_Click(object sender, EventArgs e)
 {
     if (this.dgvPlan.SelectedRows.Count > 0)
     {
         int         ID       = Convert.ToInt32(this.dgvPlan.SelectedRows[0].Cells["ID"].Value);
         PlanDesktop formPlan = new PlanDesktop(ID, ApplicationForm.ModoForm.Modificacion);
         formPlan.ShowDialog();
         this.Listar();
     }
     else
     {
         MessageBox.Show("Seleccionar una fila en la grilla para poder editar");
     }
 }
Пример #22
0
 private void tsbElminar_Click(object sender, EventArgs e)
 {
     if (dvgPlanes.SelectedRows.Count > 0)
     {
         int         ID          = ((Business.Entities.Plan) this.dvgPlanes.SelectedRows[0].DataBoundItem).ID;
         PlanDesktop planDesktop = new PlanDesktop(ID, ApplicationForm.Modoform.Baja);
         planDesktop.ShowDialog();
         this.Listar();
     }
     else
     {
         MessageBox.Show("Por favor seleccione un registro");
     }
 }
Пример #23
0
 private void tsbModificar_Click(object sender, EventArgs e)
 {
     try
     {
         int         ID = ((Business.Entities.Plan) this.dgvPlanes.SelectedRows[0].DataBoundItem).ID;
         PlanDesktop pd = new PlanDesktop(ID, ApplicationForm.ModoForm.Modificacion);
         pd.ShowDialog();
         this.Listar();
     }
     catch
     {
         MessageBox.Show("Debe seleccionar una fila", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #24
0
 private void tsbEliminar_Click(object sender, EventArgs e)
 {
     if (dgvPlanes.GetCellCount(DataGridViewElementStates.Selected) > 0)
     {
         int         idPlanSelected = ((Plan)dgvPlanes.SelectedRows[0].DataBoundItem).Id;
         PlanDesktop iuPlanes       = new PlanDesktop(idPlanSelected, ApplicationForm.ModoForm.Baja);
         iuPlanes.ShowDialog();
         listar();
     }
     else
     {
         MessageBox.Show("Debe seleccionar la fila a eliminar!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #25
0
 private void tsbEliminar_Click(object sender, EventArgs e)
 {
     if (this.dgvPlanes.SelectedRows.Count > 0)
     {
         int         ID          = Int32.Parse(((DataRowView)this.dgvPlanes.SelectedRows[0].DataBoundItem)["id_plan"].ToString());
         PlanDesktop planDesktop = new PlanDesktop(ID, ApplicationForm.ModoForm.Baja);
         planDesktop.ShowDialog();
         this.Listar();
     }
     else
     {
         MessageBox.Show("Seleccione un plan", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #26
0
 private void tsbEliminar_Click(object sender, EventArgs e)
 {
     if (this.dgvPlanes.SelectedRows.Count > 0)
     {
         int         ID       = (int)this.dgvPlanes.SelectedRows[0].Cells["ID"].Value;
         PlanDesktop formPlan = new PlanDesktop(ID, ApplicationForm.ModoForm.Baja, _context);
         formPlan.ShowDialog();
         this.Listar();
     }
     else
     {
         MessageBox.Show("Seleccionar una fila en la grilla para poder eliminar");
     }
 }
 private void tsbEliminar_Click(object sender, EventArgs e)
 {
     if (this.dgvPlanes.SelectedRows.Count != 0)
     {
         int         ID       = (int)this.dgvPlanes.SelectedRows[0].Cells["Id"].Value;
         PlanDesktop formPlan = new PlanDesktop(ID, ApplicationForm.ModoForm.Baja);
         formPlan.ShowDialog();
         this.Listar();
         dgvPlanes.ClearSelection();
     }
     else
     {
         MessageBox.Show("Debes seleccionar una fila para realizar la baja.");
     }
 }
Пример #28
0
 private void tsEliminar_Click(object sender, EventArgs e)
 {
     try
     {
         int         ID      = ((Business.Entities.Plan) this.dgvPlanes.SelectedRows[0].DataBoundItem).ID;
         PlanDesktop frmPlan = new PlanDesktop(ID, ApplicationForm.ModoForm.Baja);
         frmPlan.ShowDialog();
         this.Listar();
     }
     catch (Exception ex)
     {
         Exception ExcepcionManejada = new Exception("Error al eliminar el plan", ex);
         MessageBox.Show(ex.Message, "Error eliminando: cod: " + ex.HResult, MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Пример #29
0
 private void tsbEliminar_Click(object sender, EventArgs e)
 {
     int ID;
     if (this.dgvPlanes.SelectedRows != null && this.dgvPlanes.SelectedRows.Count == 1)
     {
         ID = ((Plan)this.dgvPlanes.SelectedRows[0].DataBoundItem).ID;
         PlanDesktop formPlan = new PlanDesktop(ID, ApplicationForm.ModoForm.Baja);
         formPlan.ShowDialog();
         this.Listar();
     }
     else
     {
         MessageBox.Show("Seleccione una fila para eliminar!", "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Пример #30
0
 private void TsbEditar_Click(object sender, EventArgs e)
 {
     try
     {
         int         ID           = (int)dgvPlanes.SelectedRows[0].Cells["ID"].Value;
         Plan        planActual   = PlanLog.GetOne(ID);
         PlanDesktop formPlanDesk = new PlanDesktop(planActual, ModoForm.Modificacion);
         formPlanDesk.ShowDialog();
         this.Listar();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #31
0
        private void tsbEliminar_Click(object sender, EventArgs e)
        {
            if (dgvPlanes.SelectedRows.Count > 0)
            {
                int ID = ((Plan)this.dgvPlanes.SelectedRows[0].DataBoundItem).ID;

                PlanDesktop formPlan = new PlanDesktop(ID, ApplicationForm.ModoForm.Baja);
                formPlan.ShowDialog();
                Listar();
            }
            else
            {
                MessageBox.Show("No hay elementos seleccionados", "Error", MessageBoxButtons.OK);
            }
        }
Пример #32
0
 private void tbsEliminar_Click(object sender, EventArgs e)
 {
     try
     {
         if (!(this.dgvPlanes.SelectedRows == null))
         {
             int         ID       = ((Business.Entities.Plan) this.dgvPlanes.SelectedRows[0].DataBoundItem).ID;
             PlanDesktop formPlan = new PlanDesktop(ID, ApplicationForm.ModoForm.Baja);
             formPlan.ShowDialog();
             this.Listar();
         }
     }
     catch (ArgumentOutOfRangeException ef)
     {
         MessageBox.Show("No existen registros a eliminar.", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #33
0
        private void tsbEliminar_Click(object sender, EventArgs e)
        {
            int  ID  = ((Plan)this.dgvPlanes.SelectedRows[0].DataBoundItem).IdPlan;
            bool hab = ((Plan)this.dgvPlanes.SelectedRows[0].DataBoundItem).Habilitado;

            PlanDesktop formPlan;

            if (hab == true)
            {
                formPlan = new PlanDesktop(ID, ApplicationForm.ModoForm.Baja);
            }
            else
            {
                formPlan = new PlanDesktop(ID, ApplicationForm.ModoForm.CancelaBaja);
            }

            formPlan.ShowDialog();
            this.Listar();
        }
Пример #34
0
 private void tsbNuevo_Click(object sender, EventArgs e)
 {
     PlanDesktop pd = new PlanDesktop();
     pd.Show();
 }
Пример #35
0
        private void altaPlanes_Click(object sender, EventArgs e)
        {
            PlanDesktop formPlan = new PlanDesktop(ApplicationForm.ModoForm.Alta);

            formPlan.ShowDialog();
        }
Пример #36
0
        private void PlanToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PlanDesktop planDesktop = new PlanDesktop();

            planDesktop.ShowDialog();
        }
Пример #37
0
        private void tsbNuevo_Click(object sender, EventArgs e)
        {
            PlanDesktop pd = new PlanDesktop();

            pd.Show();
        }