private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     ControlDeInventariosSCIR.Presentacion.DataSetConsultas dataSetConsultas = ((ControlDeInventariosSCIR.Presentacion.DataSetConsultas)(this.FindResource("dataSetConsultas")));
     // Load data into the table mp_materiaPrima. You can modify this code as needed.
     ControlDeInventariosSCIR.Presentacion.DataSetConsultasTableAdapters.mp_materiaPrimaTableAdapter dataSetConsultasmp_materiaPrimaTableAdapter = new ControlDeInventariosSCIR.Presentacion.DataSetConsultasTableAdapters.mp_materiaPrimaTableAdapter();
     dataSetConsultasmp_materiaPrimaTableAdapter.Fill(dataSetConsultas.mp_materiaPrima);
     System.Windows.Data.CollectionViewSource mp_materiaPrimaViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("mp_materiaPrimaViewSource")));
     mp_materiaPrimaViewSource.View.MoveCurrentToFirst();
 }
Exemplo n.º 2
0
 public void cargarGrid()
 {
     ControlDeInventariosSCIR.Presentacion.DataSetConsultas dataSetConsultas = ((ControlDeInventariosSCIR.Presentacion.DataSetConsultas)(this.FindResource("dataSetConsultas")));
     // Load data into the table usr_UsuariosGestionar. You can modify this code as needed.
     ControlDeInventariosSCIR.Presentacion.DataSetConsultasTableAdapters.usr_UsuariosGestionarTableAdapter dataSetConsultasusr_UsuariosGestionarTableAdapter = new ControlDeInventariosSCIR.Presentacion.DataSetConsultasTableAdapters.usr_UsuariosGestionarTableAdapter();
     dataSetConsultasusr_UsuariosGestionarTableAdapter.Fill(dataSetConsultas.usr_UsuariosGestionar);
     System.Windows.Data.CollectionViewSource usr_UsuariosGestionarViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("usr_UsuariosGestionarViewSource")));
     usr_UsuariosGestionarViewSource.View.MoveCurrentToFirst();
 }
Exemplo n.º 3
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     try
     {
         ControlDeInventariosSCIR.Presentacion.DataSetConsultas dataSetConsultas = ((ControlDeInventariosSCIR.Presentacion.DataSetConsultas)(this.FindResource("dataSetConsultas")));
         // Load data into the table rol_roles. You can modify this code as needed.
         ControlDeInventariosSCIR.Presentacion.DataSetConsultasTableAdapters.rol_rolesTableAdapter dataSetConsultasrol_rolesTableAdapter = new ControlDeInventariosSCIR.Presentacion.DataSetConsultasTableAdapters.rol_rolesTableAdapter();
         dataSetConsultasrol_rolesTableAdapter.Fill(dataSetConsultas.rol_roles);
         System.Windows.Data.CollectionViewSource rol_rolesViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("rol_rolesViewSource")));
         rol_rolesViewSource.View.MoveCurrentToFirst();
         cbRoles.SelectedValue = user.usr_id_rol;
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error al cargar roles", "ERROR", MessageBoxButton.OK, MessageBoxImage.Error);
         Console.Write(ex.Message);
     }
 }