public PedidosFacturadosVtex() { InitializeComponent(); lblnom_modulo.Content = "{" + Ent_Global._nom_modulo.ToString() + "}"; lblhora.Content = DateTime.Now.ToLongTimeString();//Doy la hora actual al reloj DispatcherTimer dispatcherTimer = new DispatcherTimer(); dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick); dispatcherTimer.Interval = new TimeSpan(0, 0, 1); dispatcherTimer.Start(); DateTime myDt = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Unspecified); //obtiene datos fecha/hora string dtString = myDt.ToString(@"dd/MM/yyyy"); //formato a entregar lblfecha.Content = dtString; Ent_Usuario user = Ent_Global._usuario_var; lblnombre_login.Content = "Usuario | " + user._nombre; lblusuario.Content = user._nombre; this.Title = "PEDIDOS FACTURADOS VTEX: RE-ENVIO DE SOLICITUD DE SERVICIO A URBANO (COURIER) [" + Ent_Global._nom_modulo + "]"; txtSecuenciaGuia.Text = Dat_ConfigGuia.guiasecuencia(); }
private async void consultar() { Mouse.OverrideCursor = Cursors.Wait; var metroWindow = this; int _pendiente = 1; metroWindow.MetroDialogOptions.ColorScheme = MetroDialogOptions.ColorScheme; txtSecuenciaGuia.Text = Dat_ConfigGuia.guiasecuencia(); try { Boolean _tipo = chkactivar.IsChecked.Value; if (chkPendientes.IsChecked.Value) { _pendiente = 0; } else { _pendiente = 1; } if (_tipo) { if (txtdoc.Text.Length == 0) { await metroWindow.ShowMessageAsync(Ent_Msg.msginfomacion, "Por favor ingrese el numero de documento a consultar", MessageDialogStyle.Affirmative, metroWindow.MetroDialogOptions); Mouse.OverrideCursor = null; txtdoc.Focus(); return; } } DateTime _fechaini = Convert.ToDateTime(dtpdesde.Text); DateTime _fechafin = Convert.ToDateTime(dtphasta.Text); DataTable dt2 = new DataTable(); string _doc = txtdoc.Text; dt = Dat_Venta.dt_VTEX_consulta_pedido_urbano(_tipo, _fechaini, _fechafin, _doc, _pendiente); //DataRow[] foundRows; //foundRows = dt.Select("Ven_DET_GuiUrb_Envio=true"); dg1.ItemsSource = dt.DefaultView; //dg1.ItemsSource = foundRows; lblTotal.Content = "Total: " + dt.Rows.Count + " Reg."; } catch (Exception exc) { MessageBox.Show(exc.Message, Ent_Msg.msginfomacion, MessageBoxButton.OK, MessageBoxImage.Error); } Mouse.OverrideCursor = null; }
private void defecto() { try { lblmsg.Content = ""; llenarcombo(); cbotransportadora.SelectedIndex = -1; lblliq.Content = _liq; lblcliente.Content = _cliente; txtguia.Text = Dat_ConfigGuia.guiasecuencia(); } catch (Exception exc) { MessageBox.Show(exc.Message, Ent_Msg.msginfomacion, MessageBoxButton.OK, MessageBoxImage.Error); } }