Exemple #1
0
        /// <summary>
        /// Event Name      : BtnDatesAreAccurate_TouchUpInside
        /// Author          : Hiren Patel
        /// Creation Date   : 29 Dec 2017
        /// Purpose         : To confirmed services date and redirect to address screen
        /// Revision        :
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="e">Event Argument</param>
        private void BtnDatesAreAccurate_TouchUpInside(object sender, EventArgs e)
        {
            string message = estimateValidateServices.ValidateServiceDates(txtPackDate.Text, txtLoadDate.Text, txtMoveDate.Text);

            if (string.IsNullOrEmpty(message))
            {
                PerformSegue("servicesDatesToAddress", this);
            }
            else
            {
                UIHelper.ShowMessage(message);
            }
        }
        /// <summary>
        /// Method Name     : IsValidAllData
        /// Author          : Hiren Patel
        /// Creation Date   : 1 Mar 2018
        /// Purpose         : To validate all data before save
        /// Revision        :
        /// </summary>
        /// <returns>validate message</returns>
        private string IsValidAllData()
        {
            string message = estimateValidateServices.ValidateServiceDates(txtPackDate.Text, txtLoadDate.Text, txtMoveDate.Text);

            if (String.IsNullOrEmpty(message))
            {
                message = estimateValidateServices.ValidateCustomerAddress(txtOriginAddress.Text, txtDestinationAddress.Text);
            }
            if (String.IsNullOrEmpty(message))
            {
                message = estimateValidateServices.ValidateWhatMattersMost(txtWhatMattersMost.Text);
            }
            if (String.IsNullOrEmpty(message))
            {
                message = estimateValidateServices.ValidateValuationData(txtDeclaredValue.Text, txtCoverageValue.Text, txtCost.Text);
            }
            return(message);
        }