public async Task CreateTask() { TaskModel task = new TaskModel(); task.TaskId = TaskViewModel.NewTask.TaskId; task.DateTime = TaskViewModel.NewTask.DateTime; task.Description = TaskViewModel.NewTask.Description; task.IsDone = TaskViewModel.NewTask.IsDone; task.IsRepeatable = TaskViewModel.NewTask.IsRepeatable; task.SchduledDate = TaskViewModel.NewTask.SchduledDate; task.StationId = TaskViewModel.NewTask.StationId; task.UserId = CurrentSessioncs.GetCurrentUser().UserId; await TaskWebApiTest.RunAPITestCreate(task); }
public async void AddMeasurment() { WebAPITest <Measurement> MeasurmentTester = new WebAPITest <Measurement>(MeasurmentWebApi); measurment = new Measurement { MeasurementId = MeasurementsViewM.NewMeasurment.MeasurementId, MonitorId = MeasurementsViewM.NewMeasurment.MonitorId, UserId = CurrentSessioncs.GetCurrentUser().UserId, StationId = MeasurementsViewM.NewMeasurment.StationId, Date = MeasurementsViewM.NewMeasurment.Date, Description = MeasurementsViewM.NewMeasurment.Description, Value = MeasurementsViewM.NewMeasurment.Value }; await MeasurmentTester.RunAPITestCreate(measurment); }
//asdsadsadasd public async void AddComment() { try { WebAPITest <Comment> CommentTester = new WebAPITest <Comment>(CommentWebApi); comment = new Comment { CommentId = CommentsViewM.NewComment.CommentId, CommentDate = CommentsViewM.NewComment.CommentDate, Description = CommentsViewM.NewComment.Description, UserId = CurrentSessioncs.GetCurrentUser().UserId, }; await CommentTester.RunAPITestCreate(comment); } catch (Exception exception) { MessageDialog dialog = new MessageDialog(exception.ToString()); } }