private async Task SendOTP() { var Wait = UserDialogs.Instance.Loading("Wait...", Cancel(), "Cancel", true, MaskType.Black); Wait.Show(); if (HasErrors) { // Error message ScrollToControlProperty(GetFirstInvalidPropertyName); } else { if (_Retailer_Collected_Cash_Amount > 0) { JObject result = await _IAllDataServices.GetOTP(RetailerMaster_Class_Data); if (result != null) { string type = result["Type"].ToString(); if (type == "1") { await App.Current.MainPage.DisplayAlert("Success!", (string)result["ResponseMessage"], "Ok"); _Resived_OTP = (string)result["Result"]; _Retailer_Contect_No_Enabled = false; _Button_Send_OTP_Visible = false; _After_Send_OTP_Command = true; } else { await App.Current.MainPage.DisplayAlert("Error!", (string)result["ResponseMessage"], "Ok"); } } else { await App.Current.MainPage.DisplayAlert("Oops!", "Please try Again....", "Ok"); } } else { await App.Current.MainPage.DisplayAlert("Oops!", "Please fill Amount...", "Ok"); } } Wait.Dispose(); }
private async Task SendOTP() { var Wait = UserDialogs.Instance.Loading("Wait...", Cancel(), "Cancel", true, MaskType.Black); Wait.Show(); if (HasErrors) { // Error message ScrollToControlProperty(GetFirstInvalidPropertyName); } else { if (Employee_OrderGenerate_Class_data.odm.Count > 0) { if (string.IsNullOrEmpty(Employee_OrderGenerate_Class_data.Remark)) { await App.Current.MainPage.DisplayAlert("Oops!", "Please Fill Remark...", "Ok"); } else if (Employee_OrderGenerate_Class_data.DateOfDispatch == null) { await App.Current.MainPage.DisplayAlert("Oops!", "Please select Dispatch Date...", "Ok"); } else if (string.IsNullOrEmpty(Employee_OrderGenerate_Class_data.PreferredTransport)) { await App.Current.MainPage.DisplayAlert("Oops!", "Please Fill Preferred Transport...", "Ok"); } else if (Employee_OrderGenerate_Class_data.DateOfDispatch <= DateTime.Now) { await App.Current.MainPage.DisplayAlert("Oops!", "Selected dispatch date less then current date...", "Ok"); } else if (_Resived_OTP == _OTP) { JObject result = await _IAllDataServices.GetOTP(Employee_OrderGenerate_Class_data.RetailerMaster_Class_Data); if (result != null) { string type = result["Type"].ToString(); if (type == "1") { await App.Current.MainPage.DisplayAlert("Success!", (string)result["ResponseMessage"], "Ok"); _Resived_OTP = (string)result["Result"]; After_Send_OTP_Command = true; _Button_Send_OTP_Visible = false; } else { await App.Current.MainPage.DisplayAlert("Error!", (string)result["ResponseMessage"], "Ok"); } } else { await App.Current.MainPage.DisplayAlert("Oops!", "Please Refresh Page And try Again....", "Ok"); } } else { await App.Current.MainPage.DisplayAlert("Oops!", "OTP is Not Mached...", "Ok"); } } else { await App.Current.MainPage.DisplayAlert("Oops!", "Please Fill Qty Then Send OTP", "Ok"); } } Wait.Dispose(); }