Ejemplo n.º 1
0
        private void ucGe_Menu_Mantenimiento_x_usuario_event_btnAnular_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                InfoOC = (com_ordencompra_local_Info)gridViewOrdenCompra.GetFocusedRow();
                if (InfoOC != null)
                {
                    frm         = new FrmCom_GeneracionOrdenCompra_x_Cotizacion_Mantenimiento();
                    frm.InfoCab = InfoOC;

                    frm.set_Accion(Cl_Enumeradores.eTipo_action.Anular); frm.MdiParent = this.MdiParent;
                    frm.Show();
                    frm.MdiParent = this.MdiParent;
                    // frm.event_frmCom_OrdenCompra_Mant_FormClosing += frm_event_frmCom_OrdenCompra_Mant_FormClosing;
                    frm.event_frmCom_OrdenCompra_x_Cotizacion_Mant_FormClosing += frm_event_frmCom_OrdenCompra_x_Cotizacion_Mant_FormClosing;
                }
                else
                {
                    MessageBox.Show("Seleccione un Registro a Mostrar", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return;
                }
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
            }
        }
Ejemplo n.º 2
0
 private void ucGe_Menu_Mantenimiento_x_usuario_event_btnNuevo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         frm = new FrmCom_GeneracionOrdenCompra_x_Cotizacion_Mantenimiento();
         frm.set_Accion(Cl_Enumeradores.eTipo_action.grabar);
         frm.Text = frm.Text + " ***NUEVO REGISTRO***";
         frm.Show(); frm.MdiParent = this.MdiParent;
         // frm.event_frmCom_OrdenCompra_Mant_FormClosing += frm_event_frmCom_OrdenCompra_Mant_FormClosing;
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
     }
 }
Ejemplo n.º 3
0
        private void ucGe_Menu_Mantenimiento_x_usuario_event_btnModificar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                InfoOC = (com_ordencompra_local_Info)gridViewOrdenCompra.GetFocusedRow();
                if (InfoOC != null)
                {
                    in_Ing_Egr_Inven_det_Bus         bus_IngEgr  = new in_Ing_Egr_Inven_det_Bus();
                    List <in_Ing_Egr_Inven_det_Info> list_IngEgr = new List <in_Ing_Egr_Inven_det_Info>();
                    list_IngEgr = bus_IngEgr.Get_List_Ing_Egr_Inven_det_x_OrdenCompra(InfoOC.IdEmpresa, InfoOC.IdSucursal, InfoOC.IdOrdenCompra);

                    if (InfoOC.Estado == "I")
                    {
                        MessageBox.Show("No se puede modificar Orden de Compra Anulada ");
                    }
                    else
                    {
                        if (list_IngEgr.Count != 0)
                        {
                            MessageBox.Show("La Orden de compra Nº " + InfoOC.oc_NumDocumento +
                                            " tiene Ingresos a Bodega. No se puede modificar.");
                        }
                        else
                        {
                            frm         = new FrmCom_GeneracionOrdenCompra_x_Cotizacion_Mantenimiento();
                            frm.InfoCab = InfoOC;
                            frm.set_Accion(Cl_Enumeradores.eTipo_action.actualizar);
                            frm.Text = frm.Text + " ***MODIFICAR***";
                            frm.Show(); frm.MdiParent = this.MdiParent;
                            frm.event_frmCom_OrdenCompra_x_Cotizacion_Mant_FormClosing += frm_event_frmCom_OrdenCompra_x_Cotizacion_Mant_FormClosing;
                        }
                    }
                }
                else
                {
                    MessageBox.Show("Seleccione un Registro a Modificar", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return;
                }
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
            }
        }