Ejemplo n.º 1
0
 public MainWindow()
 {
     InitializeComponent();
     Person p = new Person();
     // p.CPR = "as345as123";
     Debug.WriteLine(p.getYear("2802902673"));
 }
Ejemplo n.º 2
0
 private void CheckCpr(object sender, RoutedEventArgs e)
 {
     Person p = new Person();
     try {
         p.CPR = Txbox.Text;
         int y;
         int m;
         int d;
         p.ExtractYmd(p.CPR, out y, out m, out d);
         LblText.Content = "" + d + ". " + monthsStrings[m - 1] + " " + y;
     }
     catch
         (ArgumentException ex) {
         LblText.Content = ex.Message;
     }
 }