private async void cargarFecha() { try { FechaSistema date = await fechaModel.fechaSistema(); lblFechaFin.Text = date.fecha.ToString(); } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message, "Cargar Fecha", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private async void cargarMediosPago() { try { loadState(true); List <MedioPago> list = await medioPagoModel.medioPagos(); medioPago = list[0]; dynamic currentFecha = await fechaModel.fechaSistema(); dtpFechaInicio.Value = currentFecha.fecha; dtpFechaIngreso.Value = currentFecha.fecha; } catch (Exception ex) { MessageBox.Show("Upps! " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } finally { loadState(false); } }
private async void cargarFechaSistema() { try { if (!nuevo) return; fechaSistema = await fechaModel.fechaSistema(); dtpFechaEntrega.Value = fechaSistema.fecha; } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message, "cargar", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private async void cargarFechas() { try { //Cargar la fecha del sistema FechaSistema fechaSistema = await fechaModel.fechaSistema(); maxAnio = fechaSistema.fecha.Year; maxMes = fechaSistema.fecha.Month; limitarComboAnio(maxAnio); limitarComboMes(maxMes); } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message, "Cargar Fecha", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private async void cargarFechaSistema() { try { if (!nuevo) { return; } fechaSistema = await fechaModel.fechaSistema(); dtpEmision.Value = fechaSistema.fecha; // dtpPago.Value = fechaSistema.fecha; } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message, "Listar", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private async void cargarFechaSistema() { try { if (!nuevo) { dtpFechaEntrega.Value = currentOrdenCompra.fecha.date; } else { fechaSistema = await fechaModel.fechaSistema(); dtpFechaEntrega.Value = fechaSistema.fecha; } //dtpFechaPago.Value = fechaSistema.fecha; } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message, "cargar", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }