private void Pin_Clicked(object sender, EventArgs e) { var pin = (Pin)sender; SelectedTempat = tempats.Where(x => x.TempatId.ToString() == pin.AutomationId).FirstOrDefault(); if (SelectedTempat != null) { Status = String.Empty; AbsenCommand.ChangeCanExecute(); } }
public Task <bool> AddKaryawan(int tempatId, int karyawanid) { try { var model = new TempatDetail { KaryawanId = karyawanid, TempatId = tempatId }; _db.TempatDetails.Add(model); _db.SaveChanges(); return(Task.FromResult(true)); } catch (Exception ex) { throw new SystemException(ex.Message); } }