private void btnAgregar_Click(object sender, RoutedEventArgs e) { wnwRegistrarLote nuevo = new wnwRegistrarLote(ptipo: "Registrar", pTamaño: null, pNumLote: Conta); nuevo.Owner = this; nuevo.ShowDialog(); }
private void BtnOpcion_Click(object sender, RoutedEventArgs e) { Button btnLote = (Button)sender; foreach (uc_Lote lote in FindVisualChildren <uc_Lote>(stpLotes)) { string[] numLote = lote.txbCodigo.Text.ToString().Split('L'); if (btnLote.Tag.ToString() == numLote[1]) { tamaño = lote.txbTamaño.Text; } } wnwRegistrarLote nuevo = new wnwRegistrarLote(ptipo: "Editar", pTamaño: tamaño, pNumLote: Convert.ToInt32(btnLote.Tag)); nuevo.Owner = this; nuevo.ShowDialog(); }