public void clean()
 {
     TB_ref.Text    = "";
     TB_NamRef.Text = "";
     TB_NamRef.Text = "";
     TB_Codtip.Text = "";
     TB_Nomtip.Text = "";
     TB_CodPrv.Text = "";
     TB_NomPrv.Text = "";
     TB_Tiva.Text   = "";
     TB_Por.Text    = "";
     tx_val.Text    = "0";
     tx_cos.Text    = "0";
     tx_sal.Text    = "0";
     tx_canti.Value = 0;
     Tx_Doc.Text    = consecutivo();
     TB_ref.Focus();
 }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     tx_bodega.Text = cod_bod;
     TB_ref.Focus();
 }