async Task sendTech() { Analytics.TrackEvent("Запрос кода для тех.поддержки"); TechSupportAppealArguments arguments = new TechSupportAppealArguments(); arguments.OS = Device.RuntimePlatform; arguments.Phone = Settings.Person.Phone; arguments.Text = "Заявка из МП для мессенджеров"; arguments.Mail = "*****@*****.**"; arguments.AppVersion = Xamarin.Essentials.AppInfo.VersionString; arguments.Info = GetIdent(); arguments.Address = GetAdres(); arguments.Login = Settings.Person.Login; TechId result = await server.TechSupportAppeal(arguments); if (result.Error == null) { number = result.requestId.ToString(); Analytics.TrackEvent("Получили код: " + number); BindingContext = this; } number = "-1"; launched = true; }
async Task SendTech() { string phone = EntryPhone.Text .Replace("+", "") .Replace(" ", "") .Replace("(", "") .Replace(")", "") .Replace("-", ""); ; string email = EntryEmail.Text; string text = EntryText.Text; TechSupportAppealArguments arguments = new TechSupportAppealArguments(); arguments.OS = Device.RuntimePlatform; arguments.Phone = phone; arguments.Text = text; arguments.Mail = email; arguments.AppVersion = Xamarin.Essentials.AppInfo.VersionString; arguments.Info = GetIdent(); arguments.Address = GetAdres(); arguments.Login = Settings.Person.Login; TechId result = await server.TechSupportAppeal(arguments); if (result.Error == null) { await DisplayAlert(AppResources.AlertSuccess, AppResources.TechSendSuccess, "OK"); ClosePage(); } else { await DisplayAlert(AppResources.ErrorTitle, result.Error, "OK"); } }