private void Buscar() { try { string value = txtTRAN_Codigo.Text; if (txtTRAN_Codigo.Text != "") { if (decimal.Parse(value) > 2147483647) { txtTRAN_Codigo.Text = "2147483647"; } } if (!String.IsNullOrEmpty(txtTRAN_Codigo.Text)) { Presenter.F_TRAN_Codigo = int.Parse(txtTRAN_Codigo.Text); } else { Presenter.F_TRAN_Codigo = null; } Presenter.F_FecIni = dtpFecIni.NSFecha; Presenter.F_FecFin = dtpFecFin.NSFecha; Presenter.Actualizar(); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void Buscar() { try { string value = txtMOVI_Codigo.Text; if (txtMOVI_Codigo.Text != "") { if (decimal.Parse(value) > 2147483647) { txtMOVI_Codigo.Text = "2147483647"; } } getFiltros(); if (dtpMOVI_FecEmision_Ini.NSFecha.HasValue && dtpMOVI_FecEmision_Ini.NSFecha.HasValue) { if (dtpMOVI_FecEmision_Fin.NSFecha.Value.Date < dtpMOVI_FecEmision_Ini.NSFecha.Value.Date) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Presenter.Title, "La Fecha de Inicio es Mayor a la Fecha de Fin, la consulta no devolvera resultados."); return; } } //if (txaCUBA_Codigo.SelectedItem != null) //{ Presenter.Actualizar(); //} //else //{ // Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Presenter.Title, "Para realizar una busqueda debe seleccionar Cuenta Bancaria."); //} } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void MView_FormClosing(object sender, FormClosingEventArgs e) { try { if (Closing != true) { this.FormClosing -= MView_FormClosing; switch (Presenter.TInicio) { case PRO022Presenter.TipoInicio.Normal: Presenter.Actualizar(); break; case PRO022Presenter.TipoInicio.EditarFacturacion: break; } } else { Closing = false; e.Cancel = true; } } catch (Exception ex) { Infrastructure.WinFormsControls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al cerrar el formulario.", ex); } }
private void Buscar() { try { Presenter.F_ENTC_Codigo = null; if (txaENTC_Codigo.SelectedItem != null) { Presenter.F_ENTC_Codigo = txaENTC_Codigo.SelectedItem.ENTC_Codigo; } Presenter.F_FecIni = dtpFecIni.NSFecha; Presenter.F_FecFin = dtpFecFin.NSFecha; Presenter.F_NVIA_Codigo = null; if (txaNVIA_NroViaje.Value != null) { Presenter.F_NVIA_Codigo = (txaNVIA_NroViaje.Value as Entities.NaveViaje).NVIA_Codigo; } if (Presenter.F_FecIni.HasValue && Presenter.F_FecIni.HasValue && Presenter.F_FecIni.Value.Date <= Presenter.F_FecIni.Value.Date) { Presenter.Actualizar(); } else { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Presenter.Title, "Debe seleccionar un rango de fechas valido."); //Presenter.FILTROItemCONSRGM = CONS_CodRGM.ConstantesSelectedItem; //Presenter.FILTROItemCONSFLE = CONS_CodFLE.ConstantesSelectedItem; } } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void Buscar() { try { GetFiltros(); if (txaCUBA_Codigo.SelectedItem != null && cmbCONC_Periodo.SelectedItem != null && Presenter.F_FecIni.HasValue && Presenter.F_FecFin.HasValue) { Presenter.Actualizar(); } else { String x_mensaje = ""; if (txaCUBA_Codigo.SelectedItem == null) { x_mensaje += String.Format("* Debe seleccionar una cuenta Bancaria.{0}", Environment.NewLine); } if (cmbCONC_Periodo.SelectedItem == null) { x_mensaje += String.Format("* Debe seleccionar un Periodo.{0}", Environment.NewLine); } if (!Presenter.F_FecIni.HasValue || !Presenter.F_FecFin.HasValue) { x_mensaje += String.Format("* Debe seleccionar las fechas Desde y Hasta{0}", Environment.NewLine); } Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Presenter.Title, "Existen campos obligatorios, revise los detalles.", x_mensaje); } } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void Buscar() { try { Presenter.FILTROItemCONSRGM = CONS_CodRGM.ConstantesSelectedItem; Presenter.FILTROItemCONSFLE = CONS_CodFLE.ConstantesSelectedItem; Presenter.FILTROItemCONSVia = CONS_CodVia.ConstantesSelectedItem; Presenter.FILTROItemCONSEST = CONS_CodEST.ConstantesSelectedItem; Presenter.FILTROItemEjecutivo = ENTC_CodEjecutivo.Value; Presenter.FILTROItemCustomer = ENTC_CodCustomer.Value; Presenter.FILTROItemAgente = ENTC_CodAgente.Value; Presenter.FILTROItemBroker = ENTC_CodBroker.Value; Presenter.FILTROItemCliente = ENTC_CodCliente.Value; Presenter.FILTROCCOT_FecEmiDesde = CCOT_FecDesde.NSFecha; Presenter.FILTROCCOT_FecEmiHasta = CCOT_FecHasta.NSFecha; Presenter.FILTROCCOT_NumDoc = CCOT_NumDoc.Text; Presenter.FILTRODOOV_HBL = DOOV_HBL.Text; Presenter.FILTRONoCRM = null; if (CCOT_NumPresupuesto.Text != "") { Presenter.FILTRONoCRM = Convert.ToDecimal(CCOT_NumPresupuesto.Text); } Presenter.Actualizar(); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void MView_FormClosing(object sender, FormClosingEventArgs e) { try { if (Closing != true) { this.FormClosing -= MView_FormClosing; if (Infrastructure.Client.FormClose.FormValidateChanges.verificarCambioFormulario(this, HashFormulario)) { if (Presenter.GuardarCambios() == System.Windows.Forms.DialogResult.Cancel) { e.Cancel = true; this.FormClosing += new FormClosingEventHandler(MView_FormClosing); } else { Presenter.Actualizar(); } } else { Presenter.Actualizar(); } } else { Closing = false; e.Cancel = true; } } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al cerrar el formulario.", ex); } }
private void Buscar() { try { if (!string.IsNullOrEmpty(cmbCABP_Ano.Text)) { Presenter.F_CABP_Ano = cmbCABP_Ano.Text; } else { Presenter.F_CABP_Ano = null; } if (!string.IsNullOrEmpty(txtCABP_Codigo.Text)) { Presenter.F_CABP_Codigo = txtCABP_Codigo.Text; } else { Presenter.F_CABP_Codigo = null; } if (cmbTIPO_CodREG.TiposSelectedItem != null) { Presenter.F_TIPO_CodREG = cmbTIPO_CodREG.TiposSelectedItem.TIPO_CodTipo; } else { Presenter.F_TIPO_CodREG = null; } Presenter.Actualizar(); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void Buscar() { try { Presenter.Actualizar(CmbAno.SelectedValue.ToString() + cmbMes.SelectedValue.ToString().PadLeft(2, '0')); } catch (Exception ex) { Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void Buscar() { try { Presenter.Actualizar(); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void Buscar() { try { Presenter.Actualizar(); } catch (Exception ex) { Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void Buscar() { try { Presenter.ItemVIA = CONS_CodVia.ConstantesSelectedItem; Presenter.Actualizar(); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void Buscar() { try { //Presenter.FILTROItemCONSRGM = CONS_CodRGM.ConstantesSelectedItem; //Presenter.FILTROItemCONSFLE = CONS_CodFLE.ConstantesSelectedItem; Presenter.Actualizar(); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void btnGuardar_Click(object sender, EventArgs e) { try { if (Presenter.Guardar(true)) { this.FormClosing -= MView_FormClosing; Presenter.Actualizar(); this.Close(); } } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al guardar el formulario.", ex); } }
private void Buscar() { try { Presenter.F_FecIni = dtpFecIni.NSFecha; Presenter.F_FecFin = dtpFecFin.NSFecha; if (Presenter.F_FecIni.HasValue && Presenter.F_FecFin.HasValue) { Presenter.F_CONS_CodLNG = null; Presenter.F_CONS_TabLNG = null; if (cmbCONS_CodLNG.ConstantesSelectedItem != null) { Presenter.F_CONS_CodLNG = cmbCONS_CodLNG.ConstantesSelectedItem.CONS_CodTipo; Presenter.F_CONS_TabLNG = cmbCONS_CodLNG.ConstantesSelectedItem.CONS_CodTabla; } Presenter.F_CONS_TabRGM = null; Presenter.F_CONS_CodRGM = null; if (cmbCONS_CodRGM.ConstantesSelectedItem != null) { Presenter.F_CONS_TabRGM = cmbCONS_CodRGM.ConstantesSelectedItem.CONS_CodTabla; Presenter.F_CONS_CodRGM = cmbCONS_CodRGM.ConstantesSelectedItem.CONS_CodTipo; } Presenter.F_CONS_TabVIA = null; Presenter.F_CONS_CodVIA = null; if (cmbCONS_CodVia.ConstantesSelectedItem != null) { Presenter.F_CONS_TabVIA = cmbCONS_CodVia.ConstantesSelectedItem.CONS_CodTabla; Presenter.F_CONS_CodVIA = cmbCONS_CodVia.ConstantesSelectedItem.CONS_CodTipo; } Presenter.F_NVIA_NroViaje = null; if (!String.IsNullOrEmpty(NVIA_NroViaje.Text)) { Presenter.F_NVIA_NroViaje = NVIA_NroViaje.Text; } Presenter.F_NAVE_Nombre = null; if (NAVE_Codigo.SelectedItem != null && ((Entities.Nave)NAVE_Codigo.SelectedItem).NAVE_Codigo > 0 && !String.IsNullOrEmpty(NAVE_Codigo.Text)) { Presenter.F_NAVE_Nombre = NAVE_Codigo.Text; } EliminarFiltros(); Presenter.Actualizar(); } else { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Presenter.Title, "Se debe seleccionar un rango de Fecha Valido"); } } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido al realizar la busqueda.", ex); } }
private void Buscar() { try { Presenter.CUBA_Codigo = (!String.IsNullOrEmpty(txtCUBA_Codigo.Text) ? txtCUBA_Codigo.Text : null); Presenter.CUBA_TipoCuenta = cmbCUBA_TipoCuenta.ConstantesSelectedValue; Presenter.FecIni = mdtCUBA_FechaCierreIni.NSFecha; Presenter.FecFin = mdtCUBA_FechaCierreFin.NSFecha; Presenter.CUBA_Bloqueo = chkCUBA_Bloqueo.Checked; Presenter.Actualizar(); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void Buscar() { try { Presenter.FILTROItemRegimen = CONS_CodRGM.ConstantesSelectedItem; Presenter.FILTROItemVia = CONS_CodVia.ConstantesSelectedItem; Presenter.FILTROItemLineaNegocio = CONS_CodLNG.ConstantesSelectedItem; Presenter.FILTROItemTipoServicio = SERV_TipoMov.ConstantesSelectedItem; Presenter.FILTROItemIGV = SERV_AfeIgv.Checked; Presenter.FILTROItemDetraccion = SERV_AfeDet.Checked; Presenter.Actualizar(); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void btnGuardar_Click(object sender, EventArgs e) { try { if (Presenter.Guardar()) { this.FormClosing -= MView_FormClosing; errorProvider1.Dispose(); Presenter.Actualizar(); this.Close(); } } catch (Exception) { } }
private void Buscar() { try { Int32?ENTC_CodTransportista = null; if (txeTransportista.Value != null) { ENTC_CodTransportista = txeTransportista.Value.ENTC_Codigo; } DateTime?CONT_FecDesde = mdtCONT_FecDesde.NSFecha; DateTime?CONT_FecHasta = mdtCONT_FecHasta.NSFecha; Boolean CONT_Activo = chkCONT_Activo.Checked; Presenter.Actualizar(ENTC_CodTransportista, CONT_FecDesde, CONT_FecHasta, CONT_Activo); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void Buscar() { try { getFiltros(); if (Presenter.F_FecIni.HasValue && Presenter.F_FecFin.HasValue) { Presenter.Actualizar(); } else { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Presenter.Title, "Debe ingresar la fechas para realizar la busqueda."); } } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void Buscar() { try { GetFiltros(); if (Presenter.F_CUBA_Codigo != null) { Presenter.Actualizar(); } else { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Presenter.Title, "Debe seleccionar una cuenta bancaria para realizar la búsqueda"); } } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void Buscar() { try { GetFiltro(); if ((dtpFecIni.NSFecha.HasValue && dtpFecFin.NSFecha.HasValue)) { EliminarFiltros(); Presenter.Actualizar(); } else { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Presenter.Title, "Para realizar la consulta debe ingresar los rangos de fecha."); } } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void Buscar() { try { EliminarFiltrosGrid(); FiltrosLView(); if (!String.IsNullOrEmpty(Presenter.F_DOCV_Serie)) { Presenter.Actualizar(); } else { Dialogos.MostrarMensajeInformacion(Presenter.Title, "Se debe seleccionar una serie."); } } catch (Exception ex) { Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void Buscar() { try { //if (ENTC_CodTransportista.Value != null) //{ Presenter.FILTROEstado = cmbNVIA_Estado.ConstantesSelectedItem; Presenter.FILTROItemRegimen = cmbCONS_CodRGM.ConstantesSelectedItem; Presenter.FILTROItemVia = cmbCONS_CodVia.ConstantesSelectedItem; Presenter.FILTROItemTransportista = ENTC_CodTransportista.Value; Int16 _NAVE_Codigo; if (NAVE_Codigo.SelectedValue != null && Int16.TryParse(NAVE_Codigo.SelectedValue.ToString(), out _NAVE_Codigo)) { if (NAVE_Codigo.SelectedValue.ToString() != "-1") { Presenter.FILTROItemNave = Convert.ToInt16(NAVE_Codigo.SelectedValue.ToString()); } else { Presenter.FILTROItemNave = null; } } else { Presenter.FILTROItemNave = null; } //Presenter.FILTROItemNave = Convert.ToInt16(NAVE_Codigo.SelectedValue.ToString()); Presenter.FILTROItemFecCreacion = mdtNVIA_FecCreacion.NSFecha; Presenter.FILTROItemNroViaje = null; if (!String.IsNullOrEmpty(NVIA_NroViaje.Text)) { Presenter.FILTROItemNroViaje = NVIA_NroViaje.Text; } //Presenter.ItemTransportista = ENTC_CodTransportista.Value; Presenter.Actualizar(); //} //else //{ // Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Presenter.Title, "Debe seleccionar un transportista."); //} } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void btnGuardar_Click(object sender, EventArgs e) { try { if (Presenter.Guardar(true)) { this.FormClosing -= MView_FormClosing; errorProviderMovimiento.Dispose(); Presenter.Actualizar(); this.Close(); } else { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Presenter.Title, "No se completo el proceso de guardar."); } } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al guardar el formulario.", ex); } }
private void Buscar() { try { if (cmbCHAN_Anio.ComboSelectedItem != null) { Presenter.FILTRO_CHAN_Anio = (Int16)cmbCHAN_Anio.ComboSelectedItem.IntCodigo; Presenter.Actualizar(); } else { Presenter.FILTRO_CHAN_Anio = null; Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Presenter.Title, "Debe seleccionar el año."); } } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al limpiar al reporte.", ex); } }
private void Buscar() { try { if (txaENTC_CodTransportista.Value != null) { Presenter.FILTRO_ENTC_CodTransportista = txaENTC_CodTransportista.Value.ENTC_Codigo; } else { Presenter.FILTRO_ENTC_CodTransportista = null; } Presenter.FILTRO_REBA_FecIni = mdtREBA_FecIni.NSFecha; Presenter.FILTRO_REBA_Tipo = cmbREBA_Tipo.ComboStrSelectedValue; Presenter.Actualizar(); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void Buscar() { try { string value = txtMOVI_Codigo.Text; if (txtMOVI_Codigo.Text != "") { if (decimal.Parse(value) > 2147483647) { txtMOVI_Codigo.Text = "2147483647"; } } getFiltros(); Presenter.Actualizar(); grdItems.BestFitColumns(); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }
private void ProcesarAsientos() { try { if (BSItems != null && BSItems.DataSource != null) { grdItems.EndEdit(); Presenter.ItemsNaveViaje = new ObservableCollection <Entities.NaveViaje>(); foreach (DataRow item in ((DataTable)BSItems.DataSource).Rows) { if (((Boolean)item["Seleccionar"])) { Entities.NaveViaje _naveviaje = new Entities.NaveViaje(); _naveviaje.NVIA_Codigo = Int32.Parse(item["NVIA_Codigo"].ToString()); _naveviaje.AUDI_UsrCrea = Presenter.Session.UserName; _naveviaje.SUCR_Codigo = Delfin.Controls.Entorno.ItemSucursal.SUCR_Codigo; _naveviaje.EMPR_Codigo = Delfin.Controls.Entorno.ItemEmpresa.EMPR_Codigo; Presenter.ItemsNaveViaje.Add(_naveviaje); } } if (Presenter.ItemsNaveViaje.Count > 0) { if (Presenter.ProcesarAsiento()) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeSatisfactorio(Presenter.Title, "Se ha Procesado Satisfactoriamente"); Presenter.Actualizar(); } else { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Presenter.Title, "No se procesaron registros validos"); } } else { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Presenter.Title, "No se ha seleccionado ningun registro para ser procesado"); } } } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error, no se puede procesar la solicitud de generar asientos.", ex); } }
private void Buscar() { try { Presenter.F_ENTC_RazonSoc = null; if (!String.IsNullOrEmpty(txtENTC_RazonSoc.Text)) { Presenter.F_ENTC_RazonSoc = txtENTC_RazonSoc.Text; } Presenter.F_ENTC_DocIden = null; if (!String.IsNullOrEmpty(txtENTC_DocIden.Text)) { Presenter.F_ENTC_DocIden = txtENTC_DocIden.Text; } Presenter.Actualizar(); //{ // Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Presenter.Title, "debe ingresar un criterio de búsqueda"); //} } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al buscar.", ex); } }