Example #1
0
 public Registro(int registry_Number, string book_Name, int book_Number, int pageNumber,
                 string registry_Date, string name, string sex, string birthDate, string birthHour,
                 string fatherName, string fatherBirthDate, string fatherBirthCity, string motherName,
                 string motherBirthDate, string motherBirthCity, string docmentNumber, int isOnDeadline)
 {
     Registry_Number = registry_Number;
     Book_Name       = book_Name;
     Book_Number     = book_Number;
     Page_Number     = pageNumber;
     Registry_Date   = DateTime.Parse(registry_Date);
     Name            = name;
     Sex             = Sex.MALE.value.Equals(sex) ? Sex.MALE : Sex.FEMALE;
     BirthDate       = DateTime.Parse(birthDate);
     BirthHour       = DateTime.Parse(birthHour);
     FatherName      = fatherName;
     FatherBirthDate = DateTime.Parse(fatherBirthDate);
     FatherAge       = BusinessLogicalLayer.IdadePai(FatherBirthDate);
     FatherBirthCity = fatherBirthCity;
     MotherName      = motherName;
     MotherBirthDate = DateTime.Parse(motherBirthDate);
     if (isOnDeadline == 1)
     {
         BusinessLogicalLayer.IdadeMae(MotherBirthDate, Registry_Date, isOnDeadline == 1 ? true : false);
     }
     MotherBirthCity = motherBirthCity;
     DocumentNumber  = docmentNumber;
     IsOnDeadline    = isOnDeadline.Equals(0) ? false : true;
 }
Example #2
0
 private void DtpFatherBirthDate_LostFocus(object sender, RoutedEventArgs e)
 {
     try
     {
         lblFatherAge.Content = BusinessLogicalLayer.IdadePai(dtpFatherBirthDate.SelectedDate.Value);
     }
     catch (System.Exception ex)
     {
         MessageBox.Show(ex.Message, "Idade invalida", MessageBoxButton.OK, MessageBoxImage.Exclamation);
     }
 }