private void DeleteModel(TimesheetMaintenanceDataModel model) { EmployeeTimesheet entry = EmployeeTimesheet.Get(model.Id); LogChange(entry); entry.SetIsDeleted(true); entry.Update(); dataSet.Remove(model); dataGrid.Items.Refresh(); }
private void UpdateModel(TimesheetMaintenanceDataModel model) { EmployeeTimesheet entry = EmployeeTimesheet.Get(model.Id); LogChange(model, entry); entry.SetDeclaredTipAmount(model.DeclaredTipAmount); entry.SetDriverCompensationAmount(model.DriverCompensation); entry.SetStartTime(model.StartTime); entry.SetEndTime(model.EndTime); entry.SetJobId(model.GetJobId()); entry.Update(); dataGrid.Items.Refresh(); }