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(); }
private void tsbNuevo_Click(object sender, EventArgs e) { PlanDesktop ud = new PlanDesktop(ApplicationForm.ModoForm.Alta); ud.ShowDialog(); this.Listar(); }
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(); }
private void tsbNuevo_Click(object sender, EventArgs e) { PlanDesktop PD = new PlanDesktop(AplicationForm.ModoForm.Alta); PD.Text = "Alta plan"; PD.ShowDialog(); this.Listar(); }
private void tsbModificar_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.Modificacion); formPlan.ShowDialog(); Listar(); } }
private void tsbEliminar_Click(object sender, EventArgs e) { if (this.dvgPlanes.SelectedRows.Count == 1) { int ID = ((Business.Entities.Plan) this.dvgPlanes.SelectedRows[0].DataBoundItem).ID; PlanDesktop formPlan = new PlanDesktop(ID, ApplicationForm.ModoForm.Baja); formPlan.ShowDialog(); this.Listar(); } }
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(); } }
private void tsbEditar_Click(object sender, EventArgs e) { if (this.dgvPlanes.SelectedRows.Count > 0) { int ID = ((Plan)this.dgvPlanes.SelectedRows[0].DataBoundItem).IdPlan; PlanDesktop formPlan = new PlanDesktop(ID, ApplicationForm.ModoForm.Modificacion); formPlan.ShowDialog(); this.Listar(); } }
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(); } }
private void TsbNuevo_Click(object sender, EventArgs e) { this.Enabled = false; PlanDesktop formPlanDesk = new PlanDesktop(); formPlanDesk.ShowDialog(); this.Enabled = true; this.Focus(); this.Listar(); }
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(); } }
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(); } }
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); }
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"); } }
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); } }
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"); } }
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); } }
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); } }
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 (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); } }
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); } }
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); } }
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); } }
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."); } }
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); } }
private void PlanToolStripMenuItem_Click(object sender, EventArgs e) { PlanDesktop planDesktop = new PlanDesktop(); planDesktop.ShowDialog(); }
private void altaPlanes_Click(object sender, EventArgs e) { PlanDesktop formPlan = new PlanDesktop(ApplicationForm.ModoForm.Alta); formPlan.ShowDialog(); }
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(); }