private void cmbImagen_Click(object sender, EventArgs e) { try { if (splashScreenManager1.IsSplashFormVisible) { splashScreenManager1.CloseWaitForm(); } com_OrdenPedido_Info row = (com_OrdenPedido_Info)gv_Consulta.GetFocusedRow(); if (row != null) { splashScreenManager1.ShowWaitForm(); FrmCom_SeguimientoEntregaSolicitante frm = new FrmCom_SeguimientoEntregaSolicitante(); frm.IdOrdenPedido = row.IdOrdenPedido; frm.MdiParent = this.MdiParent; splashScreenManager1.CloseWaitForm(); frm.Show(); } } catch (Exception ex) { if (splashScreenManager1.IsSplashFormVisible) { splashScreenManager1.CloseWaitForm(); } MessageBox.Show(ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void LlamarFormulario(Cl_Enumeradores.eTipo_action Accion) { try { com_OrdenPedido_Info row = (com_OrdenPedido_Info)gv_Consulta.GetFocusedRow(); if (Accion != Cl_Enumeradores.eTipo_action.grabar && row == null) { MessageBox.Show("Seleccione un registro", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } if (Accion != Cl_Enumeradores.eTipo_action.grabar && Accion != Cl_Enumeradores.eTipo_action.consultar && Accion != Cl_Enumeradores.eTipo_action.duplicar) { var orden = bus_Orden.GetInfo(row.IdEmpresa, row.IdOrdenPedido); if (orden.IdCatalogoEstado != Cl_Enumeradores.eCatalogoEstadoSolicitudPedido.EST_OP_ABI.ToString()) { MessageBox.Show("La solicitud de pedido #" + row.IdOrdenPedido.ToString() + " no puede ser " + (Accion == Cl_Enumeradores.eTipo_action.actualizar ? "modificada" : "anulada") , param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } } frmCom_OrdenPedidoMantenimiento frm = new frmCom_OrdenPedidoMantenimiento(); frm.SetInfo(row ?? new com_OrdenPedido_Info(), Accion); frm.MdiParent = this.MdiParent; frm.event_delegate_frmCom_OrdenPedidoMantenimiento_FormClosing += frm_event_delegate_frmCom_OrdenPedidoMantenimiento_FormClosing; frm.Show(); } catch (Exception) { throw; } }
private void gv_Consulta_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e) { try { com_OrdenPedido_Info row = (com_OrdenPedido_Info)gv_Consulta.GetRow(e.RowHandle); if (row != null) { if (row.IdCatalogoEstado == "EST_OP_CER") { e.Appearance.ForeColor = Color.Green; } else if (row.IdCatalogoEstado == "EST_OP_PRO") { e.Appearance.ForeColor = Color.Navy; } if (!row.Estado || row.IdCatalogoEstado == "EST_OP_REC") { e.Appearance.ForeColor = Color.Red; } } } catch (Exception) { throw; } }
public void GetInfo() { try { txt_codigo.Focus(); gv_detalle.MoveNext(); info_pedido = new com_OrdenPedido_Info { IdEmpresa = param.IdEmpresa, IdOrdenPedidoReg = Convert.ToDecimal(txt_IdOrdenPedido.Text), IdDepartamento = Convert.ToInt32(cmb_Departamento.EditValue), IdSolicitante = IdSolicitante, IdUsuarioCreacion = param.IdUsuario, op_Codigo = txt_codigo.Text, op_Fecha = de_Fecha.DateTime.Date, op_Observacion = txt_Observacion.Text, EsCompraUrgente = chk_EsCompraUrgente.Checked, IdPunto_cargo = cmb_PuntoCargoCab.EditValue == null ? null : (int?)cmb_PuntoCargoCab.EditValue, ListaDetalle = new List <com_OrdenPedidoDet_Info>(blst_det.Where(q => q.A == true).ToList()), IdOrdenPedido = 0 }; } catch (Exception) { } }
private void SetInfoInControls() { try { info_pedido = bus_orden.GetInfo(info_pedido.IdEmpresa, info_pedido.IdOrdenPedido); if (info_pedido != null) { txt_IdOrdenPedido.Text = info_pedido.IdOrdenPedido.ToString(); txt_ObservacionGA.Text = info_pedido.ObservacionGA; IdSolicitante = info_pedido.IdSolicitante; txt_Observacion.Text = info_pedido.op_Observacion; cmb_Departamento.EditValue = info_pedido.IdDepartamento; de_Fecha.DateTime = Accion != Cl_Enumeradores.eTipo_action.duplicar ? info_pedido.op_Fecha.Date : DateTime.Now.Date; txt_codigo.Text = info_pedido.op_Codigo; chk_EsCompraUrgente.Checked = info_pedido.EsCompraUrgente; cmb_PuntoCargoCab.EditValue = info_pedido.IdPunto_cargo; blst_det = new BindingList <com_OrdenPedidoDet_Info>(bus_detalle.GetListRegularizacion(info_pedido.IdEmpresa, info_pedido.IdOrdenPedido)); foreach (var item in blst_det) { item.opd_EstadoProceso = "A"; //item.opd_CantidadApro = 0; item.Adjunto = false; item.NombreArchivo = null; } gc_detalle.DataSource = blst_det; } } catch (Exception) { throw; } }
public bool AnularDB(com_OrdenPedido_Info info) { try { return(odata.AnularDB(info)); } catch (Exception) { throw; } }
public void SetInfo(com_OrdenPedido_Info _info, Cl_Enumeradores.eTipo_action _Accion) { try { info_pedido = _info; Accion = _Accion; } catch (Exception) { throw; } }
private void txtEstadoProceso_DoubleClick(object sender, EventArgs e) { try { com_OrdenPedido_Info row = (com_OrdenPedido_Info)gv_Consulta.GetFocusedRow(); if (row != null) { bus_Orden.ValidarProceso(param.IdEmpresa, row.IdOrdenPedido); Buscar(); } } catch (Exception) { throw; } }
private void txtIdOrdenPedido_DoubleClick(object sender, EventArgs e) { try { com_OrdenPedido_Info row = (com_OrdenPedido_Info)gv_Consulta.GetFocusedRow(); if (row != null) { FrmCom_OrdenPedidoCompradorFamilia frm = new FrmCom_OrdenPedidoCompradorFamilia(); frm.IdOrdenPedido = row.IdOrdenPedido; frm.ShowDialog(); } } catch (Exception) { } }
private void ucGe_Menu_Mantenimiento_x_usuario1_event_btnconsultar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { com_OrdenPedido_Info row = (com_OrdenPedido_Info)gv_Consulta.GetFocusedRow(); if (row == null) { MessageBox.Show("Seleccione un registro", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } FrmCom_CotizacionAprobacionGAMant frm = new FrmCom_CotizacionAprobacionGAMant(); frm.IdOrdenPedido = row.IdOrdenPedido; frm.MdiParent = this.MdiParent; frm.event_delegate_FrmCom_CotizacionAprobacionGAMant_FormClosing += frm_event_delegate_FrmCom_CotizacionAprobacionGAMant_FormClosing; frm.Show(); } catch (Exception) { } }
private void ucGe_Menu_Mantenimiento_x_usuario1_event_btnconsultar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { com_OrdenPedido_Info row = (com_OrdenPedido_Info)gv_Consulta.GetFocusedRow(); if (row == null) { MessageBox.Show("Seleccione un registro", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } frmCom_OrdenPedidoRegularizacionMant frm = new frmCom_OrdenPedidoRegularizacionMant(); frm.SetInfo(row ?? new com_OrdenPedido_Info(), Info.General.Cl_Enumeradores.eTipo_action.consultar); frm.event_delegate_frmCom_OrdenPedidoRegularizacionMant_FormClosing += frm_event_delegate_frmCom_OrdenPedidoRegularizacionMant_FormClosing; frm.MdiParent = this.MdiParent; frm.Show(); } catch (Exception) { throw; } }
private void limpiar() { try { info_pedido = new com_OrdenPedido_Info(); txt_IdOrdenPedido.Text = string.Empty; txt_Observacion.Text = string.Empty; cmb_Departamento.EditValue = null; de_Fecha.DateTime = DateTime.Now.Date; Accion = Cl_Enumeradores.eTipo_action.grabar; txt_codigo.Text = string.Empty; blst_det = new BindingList <com_OrdenPedidoDet_Info>(); gc_detalle.DataSource = blst_det; chk_EsCompraUrgente.Checked = false; cmb_PuntoCargoCab.EditValue = null; SetAccionInControls(); } catch (Exception) { } }
private void gv_Consulta_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { try { com_OrdenPedido_Info row = (com_OrdenPedido_Info)gv_Consulta.GetRow(e.FocusedRowHandle); if (row != null) { if (row.IdCatalogoEstado == "EST_OP_CER") { gv_Consulta.Appearance.FocusedRow.ForeColor = Color.Green; gv_Consulta.Appearance.FocusedCell.ForeColor = Color.Green; } else if (row.IdCatalogoEstado == "EST_OP_PRO") { gv_Consulta.Appearance.FocusedRow.ForeColor = Color.Navy; gv_Consulta.Appearance.FocusedCell.ForeColor = Color.Navy; } else if (!row.Estado || row.IdCatalogoEstado == "EST_OP_REC") { gv_Consulta.Appearance.FocusedRow.ForeColor = Color.Red; gv_Consulta.Appearance.FocusedCell.ForeColor = Color.Red; } else if (!row.Estado || row.IdCatalogoEstado == "EST_OP_ABI") { gv_Consulta.Appearance.FocusedRow.ForeColor = Color.Black; gv_Consulta.Appearance.FocusedCell.ForeColor = Color.Black; } } } catch (Exception) { throw; } }
public void GetInfo() { try { txt_codigo.Focus(); info_pedido = new com_OrdenPedido_Info { IdEmpresa = param.IdEmpresa, IdOrdenPedido = Accion == Cl_Enumeradores.eTipo_action.grabar ? 0 : Convert.ToDecimal(txt_IdOrdenPedido.Text), IdDepartamento = Convert.ToInt32(cmb_Departamento.EditValue), IdSolicitante = param.IdSolicitante, IdUsuarioCreacion = param.IdUsuario, op_Codigo = txt_codigo.Text, op_Fecha = de_Fecha.DateTime.Date, op_Observacion = txt_Observacion.Text, EsCompraUrgente = chk_EsCompraUrgente.Checked, IdPunto_cargo = cmb_PuntoCargoCab.EditValue == null ? null : (int?)cmb_PuntoCargoCab.EditValue, ListaDetalle = new List <com_OrdenPedidoDet_Info>(blst_det) }; } catch (Exception) { } }