public void TrimData()
        {
            if (Name == null)
            {
                Name = "";
            }

            if (Password == null)
            {
                Password = "";
            }

            if (EmailId == null)
            {
                EmailId = "";
            }

            if (MobileNo == null)
            {
                MobileNo = "";
            }

            if (DateFormat == null)
            {
                DateFormat = "";
            }

            if (AmountFormat == null)
            {
                AmountFormat = "";
            }

            if (Remarks == null)
            {
                Remarks = "";
            }


            MobileAppToken = MobileAppToken == null ? "" : MobileAppToken.Trim();

            Name     = Name.Trim();
            Password = Password.Trim();
            EmailId  = EmailId.Trim().ToLower();
            MobileNo = MobileNo.Trim().ToUpper();

            if (DateFormat == "")
            {
                DateFormat = "MMM dd, yyyy";
            }

            if (PageSize <= 0)
            {
                PageSize = 10;
            }

            if (AmountFormat == "")
            {
                AmountFormat = "0.00";
            }
        }
Exemplo n.º 2
0
        public void TrimData()
        {
            if (Name == null)
            {
                Name = "";
            }

            if (EmailId == null)
            {
                EmailId = "";
            }

            if (EncryptedEmailId == null)
            {
                EncryptedEmailId = "";
            }

            if (MobileNo == null)
            {
                MobileNo = "";
            }

            if (EncryptedMobileNo == null)
            {
                EncryptedMobileNo = "";
            }

            if (LoginPassword == null)
            {
                LoginPassword = "";
            }

            if (EncryptedLoginPassword == null)
            {
                EncryptedLoginPassword = "";
            }

            if (PasswordResetToken == null)
            {
                PasswordResetToken = "";
            }

            if (Remarks == null)
            {
                Remarks = "";
            }


            Name              = Name.Trim();
            EmailId           = EmailId.Trim();
            EncryptedEmailId  = EncryptedEmailId.Trim();
            MobileNo          = MobileNo.Trim();
            EncryptedMobileNo = EncryptedMobileNo.Trim();

            LoginPassword          = LoginPassword.Trim();
            EncryptedLoginPassword = EncryptedLoginPassword.Trim();

            PasswordResetToken = PasswordResetToken.Trim();
            Remarks            = Remarks.Trim();
        }
        public void TrimData()
        {
            if (Name == null)
            {
                Name = "";
            }

            if (EmailId == null)
            {
                EmailId = "";
            }

            if (MobileNo == null)
            {
                MobileNo = "";
            }

            Name     = Name.Trim();
            EmailId  = EmailId.Trim();
            MobileNo = MobileNo.Trim();
        }
Exemplo n.º 4
0
        public async void GoToEnterOtpPage()
        {
            var Toast = DependencyService.Get <IMessage>();

            try
            {
                if (string.IsNullOrEmpty(EmailId))
                {
                    Toast.LongAlert("Please enter you email address."); return;
                }
                if (!Regex.IsMatch(EmailId.Trim(), @"^((?:[a-zA-Z0-9]+)|(([a-zA-Z0-9]+(\.|\+|\-|_))+[a-zA-Z0-9]+))@(([a-zA-Z0-9]+(\.|\-))+[a-zA-Z]{2,4})$", RegexOptions.IgnoreCase))
                {
                    Toast.LongAlert("Oops, this email address doesn't look right."); return;
                }
                else
                {
                    IsBusy = true;
                    var response = await new ApiData().PostData <UserModel>("user/ForgotPassword?EmailId=" + EmailId + "&Otp=" + string.Empty, true);
                    if (response != null && response.data != null)
                    {
                        if (response.status == "Success")
                        {
                            Toast.LongAlert("We have sent an OTP to your entered email id. Please check your email inbox.");
                            var navigationParams = new NavigationParameters();
                            navigationParams.Add("FromForgetPassword", true);
                            navigationParams.Add("Email_Id", EmailId);
                            await NavigationService.NavigateAsync("EnterOtpPage", navigationParams);
                        }
                    }
                    else
                    {
                        Toast.LongAlert(response.message);
                    }
                    IsBusy = false;
                }
            }
            catch (Exception e)
            {
            }
        }