public async void AddTaskType() { Value = true; var connection = await apiService.CheckConnection(); if (!connection.IsSuccess) { await Application.Current.MainPage.DisplayAlert( Languages.Warning, Languages.CheckConnection, Languages.Ok); return; } if (string.IsNullOrEmpty(Code) || string.IsNullOrEmpty(Description)) { Value = true; return; } var taskType = new AddTaskType { code = Code, description = Description, businessCard = BusinessCard }; var response = await apiService.Save <AddTaskType>( "https://app.smart-path.it", "/md-core", "/medial/taskType", taskType); if (!response.IsSuccess) { await Application.Current.MainPage.DisplayAlert("Error", response.Message, "ok"); return; } Value = false; MessagingCenter.Send((App)Application.Current, "OnSaved"); DependencyService.Get <INotification>().CreateNotification("Medial", "Task Type Added"); await App.Current.MainPage.Navigation.PopPopupAsync(true); }
public frmTaskList(AddTaskType type) { InitializeComponent(); }
public frmTaskList(AddTaskType type) { InitializeComponent(); }