Example #1
0
        public void AssignShipFromDefaults()
        {
            //Initials Values
            string initialShipToAddressDetail = FrameworkUtils.GetPreferenceParameter("COMPANY_ADDRESS");
            string initialShipToRegion        = FrameworkUtils.GetPreferenceParameter("COMPANY_REGION");
            string initialShipToPostalCode    = FrameworkUtils.GetPreferenceParameter("COMPANY_POSTALCODE");
            string initialShipToCity          = FrameworkUtils.GetPreferenceParameter("COMPANY_CITY");
            CFG_ConfigurationCountry intialValueConfigurationCountry = SettingsApp.ConfigurationSystemCountry;

            //ShipFrom Address
            _entryBoxShipFromAddressDetail.EntryValidation.Text = initialShipToAddressDetail;
            _entryBoxShipFromAddressDetail.EntryValidation.Validate();
            //ShipFrom Region
            _entryBoxShipFromRegion.EntryValidation.Text = initialShipToRegion;
            _entryBoxShipFromRegion.EntryValidation.Validate();
            //ShipFrom PostalCode
            _entryBoxShipFromPostalCode.EntryValidation.Text = initialShipToPostalCode;
            _entryBoxShipFromPostalCode.EntryValidation.Validate();
            //ShipFrom City
            _entryBoxShipFromCity.EntryValidation.Text = initialShipToCity;
            _entryBoxShipFromCity.EntryValidation.Validate();
            //ShipFrom Country
            _entryBoxSelectShipFromCountry.Value = intialValueConfigurationCountry;
            _entryBoxSelectShipFromCountry.EntryValidation.Validate(_entryBoxSelectShipFromCountry.Value.Oid.ToString());
            //ShipFromDeliveryDate
            //_entryBoxShipFromDeliveryDate.EntryValidation.Text = initialShipFromDeliveryDate;
            //_entryBoxShipFromDeliveryDate.EntryValidation.Validate();
        }
        public void AssignShipFromDefaults()
        {
            //Initials Values
            /* IN007018 */
            string initialShipFromAddressDetail = FrameworkUtils.GetPreferenceParameter("COMPANY_ADDRESS");
            string initialShipFromRegion        = FrameworkUtils.GetPreferenceParameter("COMPANY_REGION");
            string initialShipFromPostalCode    = FrameworkUtils.GetPreferenceParameter("COMPANY_POSTALCODE");
            string initialShipFromCity          = FrameworkUtils.GetPreferenceParameter("COMPANY_CITY");

            cfg_configurationcountry intialValueConfigurationCountry = SettingsApp.ConfigurationSystemCountry;

            /* IN007018
             * There is no checking for installed country x company country, therefore, when registering company it is allowed to register the company for a different country than the deployed one.
             * So, we are seeing address from a country but validation rules from another one.
             */
            //string initialShipFromCountry = FrameworkUtils.GetPreferenceParameter("COMPANY_COUNTRY");

            //ShipFrom Address
            _entryBoxShipFromAddressDetail.EntryValidation.Text = initialShipFromAddressDetail;
            _entryBoxShipFromAddressDetail.EntryValidation.Validate();
            //ShipFrom Region
            _entryBoxShipFromRegion.EntryValidation.Text = initialShipFromRegion;
            _entryBoxShipFromRegion.EntryValidation.Validate();
            //ShipFrom PostalCode
            _entryBoxShipFromPostalCode.EntryValidation.Text = initialShipFromPostalCode;

            /* IN007018
             * There is no checking for installed country x company country, therefore, when registering company it is allowed to register the company for a different country than the deployed one.
             * So, we are seeing Postal Code from a country but validation rules from another one, hence removing validatation on page defaults.
             */
            //_entryBoxShipFromPostalCode.EntryValidation.Rule = String.Empty;
            _entryBoxShipFromPostalCode.EntryValidation.Validate();
            //_entryBoxShipFromPostalCode.EntryValidation.Validate();
            //ShipFrom City
            _entryBoxShipFromCity.EntryValidation.Text = initialShipFromCity;
            _entryBoxShipFromCity.EntryValidation.Validate();
            //ShipFrom Country
            _entryBoxSelectShipFromCountry.Value = intialValueConfigurationCountry;
            /* IN007018 */
            //_entryBoxSelectShipFromCountry.EntryValidation.Text = initialShipFromCountry;
            _entryBoxSelectShipFromCountry.EntryValidation.Validate(_entryBoxSelectShipFromCountry.Value.Oid.ToString());
            //ShipFromDeliveryDate
            //_entryBoxShipFromDeliveryDate.EntryValidation.Text = initialShipFromDeliveryDate;
            //_entryBoxShipFromDeliveryDate.EntryValidation.Validate();
        }