void ucGe_Menu_Mantenimiento_x_usuario_event_btnModificar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { InfoObra = (prd_Obra_Info)gridViewObras.GetFocusedRow(); if (InfoObra == null) { MessageBox.Show("Selecciones una fila", "sistemas", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { FrmPrd_ObraMantemiento frm = new FrmPrd_ObraMantemiento(); frm.set_Acccion(Cl_Enumeradores.eTipo_action.actualizar); frm.set_Info(InfoObra); frm.Text = frm.Text + " ***MODIFICAR REGISTRO***"; frm.MdiParent = this.MdiParent; frm.Show(); frm.event_FrmPrd_ObraMantemiento_FormClosing += frm_event_FrmPrd_ObraMantemiento_FormClosing; } } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.InnerException.ToString()); } }
private void btn_anular_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { if (InfoObra == null) { MessageBox.Show("Selecciones una fila", "sistemas", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else if (InfoObra.Estado == "I") { MessageBox.Show("La Obra: " + InfoObra.Descripcion + " ya fue anulada", "Sistema", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { FrmPrd_ObraMantemiento frm = new FrmPrd_ObraMantemiento(); frm.set_Accion(Cl_Enumeradores.eTipo_action.borrar); frm.Text = frm.Text + " ***ANULAR REGISTRO***"; frm.Show(); frm.setObra(InfoObra); frm.event_FrmPrd_ObraMantemiento_FormClosing += frm_event_FrmPrd_ObraMantemiento_FormClosing; } } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.InnerException.ToString()); } }
void ucGe_Menu_Mantenimiento_x_usuario_event_btnNuevo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { FrmPrd_ObraMantemiento frm = new FrmPrd_ObraMantemiento(); frm.set_Acccion(Cl_Enumeradores.eTipo_action.grabar); frm.Text = frm.Text + " ***NUEVO REGISTRO***"; frm.MdiParent = this.MdiParent; frm.Show(); frm.event_FrmPrd_ObraMantemiento_FormClosing += frm_event_FrmPrd_ObraMantemiento_FormClosing; } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.InnerException.ToString()); } }
private void btn_consultar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { if (InfoObra == null || InfoObra.CodObra == null) { MessageBox.Show("Selecciones una fila", "sistemas", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { FrmPrd_ObraMantemiento frm = new FrmPrd_ObraMantemiento(); frm.set_Accion(Cl_Enumeradores.eTipo_action.consultar); frm.MdiParent = this.MdiParent; frm.setObra(InfoObra); frm.Text = frm.Text + " ***CONSULTAR REGISTRO***"; frm.Show(); } } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.InnerException.ToString()); } }