public async void GetTransactionByEmployeeId(int EmployeeId) { var result = await TimekeepingTransactionService.GetAllByEmployeeId(EmployeeId); if (result.IsSuccessful) { var transactions = JsonConvert.DeserializeObject <IEnumerable <TimekeepingTransactionModel> >(JsonConvert.SerializeObject(result.Data)); TkTransactions = transactions; } }
public async void TimeOut() { if (!string.IsNullOrEmpty(SelectedEmployeeId)) { var tkTransactionModel = new TimekeepingTransactionModel() { EmployeeId = int.Parse(SelectedEmployeeId), TransactionDateTime = DateTime.Now, TransactionTypeId = 2 //Time Out }; var result = await TimekeepingTransactionService.Add(tkTransactionModel); this.GetTransactionByEmployeeId(int.Parse(SelectedEmployeeId)); } }