Example #1
0
        void Worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            //SyncChanges();
            PBar.IsIndeterminate = false;
            ConfirmBtn.IsEnabled = true;
            if (_statcode > 0)
            {
                if (_statcode == 601)
                {
                    ValidatorIcon.Visibility = Visibility.Visible;
                    ValidatorMsg.Visibility  = Visibility.Visible;
                }
                else
                {
                    ValidatorIcon.Visibility = Visibility.Hidden;
                    ValidatorMsg.Visibility  = Visibility.Hidden;

                    _vre.Sync(_bookNum);
                    MsgSuccess();
                    this.Close();
                }
            }
            else
            {
                MsgFail();
            }
        }
Example #2
0
 /// <summary>
 /// Interaction logic for the AddRegConfirm button. Gathers and prepares the data
 /// for database insertion.
 /// </summary>
 private void AddRecConfirm(object sender, System.Windows.RoutedEventArgs e)
 {
     if (CheckInputs() == true)
     {
         legitimacy  = Legitimacy.Text;
         entryNum    = Convert.ToInt32(EntryNum.Value);
         pageNum     = Convert.ToInt32(PageNum.Value);
         baptismDate = Convert.ToDateTime(BaptismDate.Text).ToString("yyyy-MM-dd");
         birthDate   = Convert.ToDateTime(Birthdate.Text).ToString("yyyy-MM-dd");
         fullName    = ValidateInp(FullName.Text);
         birthPlace  = PlaceOfBirth.Text;
         parent1     = ValidateInp(Parent1.Text);
         parent2     = ValidateInp(Parent2.Text);
         sponsor1    = ValidateInp(Sponsor1.Text);
         sponsor2    = ValidateInp(Sponsor2.Text);
         stipend     = Convert.ToInt32(Stipend.Value);
         minister    = ValidateInp(Minister.Text);
         remarks     = ValidateInp(Remarks.Text);
         if (InsertEntry() > 0)
         {
             MsgSuccess();
             vre.Sync(bookNum);
             this.Close();
         }
         else
         {
             MsgFail();
         }
     }
     else
     {
     }
 }
        /// <summary>
        /// Interaction logic for the AddRegConfirm button. Gathers and prepares the data
        /// for database insertion.
        /// </summary>
        private void AddRecConfirm(object sender, System.Windows.RoutedEventArgs e)
        {
            if (CheckInputs() == true)
            {
                entryNum   = Convert.ToInt32(EntryNum.Value);
                pageNum    = Convert.ToInt32(PageNum.Value);
                deathDate  = Convert.ToDateTime(DeathDate.Text).ToString("yyyy-MM-dd");
                burialDate = Convert.ToDateTime(BurialDate.Text).ToString("yyyy-MM-dd");
                age        = Convert.ToInt32(Age.Value);
                switch (Status.SelectedIndex)
                {
                case 0:
                    status = "Widow";
                    break;

                case 1:
                    status = "Widower";
                    break;

                case 2:
                    status = "Single";
                    break;

                case 3:
                    status = "Conjugal";
                    break;

                case 4:
                    status = "Adult";
                    break;

                case 5:
                    status = "Infant";
                    break;

                default:
                    status = "----";
                    break;
                }
                fullName       = ValidateInp(FullName.Text);
                sacrament      = ValidateInp(Sacrament.Text);
                causeOfDeath   = ValidateInp(CauseOfDeath.Text);
                intermentPlace = ValidateInp(PlaceOfInterment.Text);
                parent1        = ValidateInp(Parent1.Text);
                parent2        = ValidateInp(Parent2.Text);
                residence1     = ValidateInp(Residence1.Text);
                residence2     = ValidateInp(Residence2.Text);
                stipend        = Convert.ToInt32(Stipend.Value);
                minister       = ValidateInp(Minister.Text);
                remarks        = ValidateInp(Remarks.Text);
                if (InsertEntry() > 0)
                {
                    MsgSuccess();
                    vre.Sync(bookNum);
                    this.Close();
                }
                else
                {
                    MsgFail();
                }
            }
            else
            {
            }
        }
        /// <summary>
        /// Interaction logic for the AddRegConfirm button. Gathers and prepares the data
        /// for database insertion.
        /// </summary>
        private void AddRecConfirm(object sender, System.Windows.RoutedEventArgs e)
        {
            if (CheckInputs() == true)
            {
                entryNum     = Convert.ToInt32(EntryNum.Value);
                pageNum      = Convert.ToInt32(PageNum.Value);
                marriageDate = Convert.ToDateTime(MarriageDate.Text).ToString("yyyy-MM-dd");
                age1         = Convert.ToInt32(Age1.Value);
                age2         = Convert.ToInt32(Age2.Value);
                fullName1    = ValidateInp(FullName1.Text);
                fullName2    = ValidateInp(FullName2.Text);
                switch (Status1.SelectedIndex)
                {
                case 0:
                    status1 = "Widow";
                    break;

                case 1:
                    status1 = "Widower";
                    break;

                case 2:
                    status1 = "Single";
                    break;

                case 3:
                    status1 = "Conjugal";
                    break;

                case 4:
                    status1 = "Adult";
                    break;

                case 5:
                    status1 = "Infant";
                    break;

                default:
                    status1 = "----";
                    break;
                }
                switch (Status2.SelectedIndex)
                {
                case 0:
                    status2 = "Widow";
                    break;

                case 1:
                    status2 = "Widower";
                    break;

                case 2:
                    status2 = "Single";
                    break;

                case 3:
                    status2 = "Conjugal";
                    break;

                case 4:
                    status2 = "Adult";
                    break;

                case 5:
                    status2 = "Infant";
                    break;

                default:
                    status2 = "----";
                    break;
                }
                hometown1  = ValidateInp(Hometown1.Text);
                hometown2  = ValidateInp(Hometown2.Text);
                residence1 = ValidateInp(Residence1.Text);
                residence2 = ValidateInp(Residence2.Text);
                parent1    = ValidateInp(Parent1.Text);
                parent2    = ValidateInp(Parent2.Text);
                parent3    = ValidateInp(Parent3.Text);
                parent4    = ValidateInp(Parent4.Text);
                sponsor1   = ValidateInp(Sponsor1.Text);
                sponsor2   = ValidateInp(Sponsor2.Text);
                residence3 = ValidateInp(Residence3.Text);
                residence4 = ValidateInp(Residence4.Text);
                stipend    = Convert.ToInt32(Stipend.Value);
                minister   = ValidateInp(Minister.Text);
                remarks    = ValidateInp(Remarks.Text);
                if (InsertEntry() > 0)
                {
                    MsgSuccess();
                    vre.Sync(bookNum);
                    this.Close();
                }
                else
                {
                    MsgFail();
                }
            }
            else
            {
            }
        }