Example #1
0
        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;
            }
        }
Example #2
0
        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));
            }
        }