Beispiel #1
0
        private void btnVerify_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(this.txtDestinationFile.Text) || string.IsNullOrEmpty(this.txtSourceFile.Text))
            {
                MessageBox.Show("Please select the source file or destination file.");
                return;
            }

            int count;

            if (int.TryParse(this.txtSourceHeaderNumber.Text.Trim(), out count) == false || int.TryParse(this.txtDestinationHeaderNumber.Text.Trim(), out count) == false)
            {
                MessageBox.Show("The header number is empty or is not the integer.");
                return;
            }

            VerificationPresenter presenter = new VerificationPresenter();

            presenter.View       = this;
            presenter.View.Model = new ReportVerificationModel();

            this.Model.DestinationFile            = this.txtDestinationFile.Text;
            this.Model.DestinationHeaderRowNumber = int.Parse(this.txtDestinationHeaderNumber.Text.Trim());
            this.Model.SourceFile            = this.txtSourceFile.Text;
            this.Model.SourceHeaderRowNumber = int.Parse(this.txtSourceHeaderNumber.Text.Trim());

            presenter.DoVerification();
        }
Beispiel #2
0
        private void btnVerify_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(this.txtDestinationFile.Text) || string.IsNullOrEmpty(this.txtSourceFile.Text))
            {
                MessageBox.Show("Please select the source file or destination file.");
                return;
            }

            int count;
            if (int.TryParse(this.txtSourceHeaderNumber.Text.Trim(),out count) == false || int.TryParse(this.txtDestinationHeaderNumber.Text.Trim(), out count) == false)
            {
                MessageBox.Show("The header number is empty or is not the integer.");
                return;
            }

            VerificationPresenter presenter = new VerificationPresenter();
            presenter.View = this;
            presenter.View.Model = new ReportVerificationModel();

            this.Model.DestinationFile = this.txtDestinationFile.Text;
            this.Model.DestinationHeaderRowNumber = int.Parse(this.txtDestinationHeaderNumber.Text.Trim());
            this.Model.SourceFile = this.txtSourceFile.Text;
            this.Model.SourceHeaderRowNumber = int.Parse(this.txtSourceHeaderNumber.Text.Trim());

            presenter.DoVerification();
        }