예제 #1
0
        private void DeleteModel(TimesheetMaintenanceDataModel model)
        {
            EmployeeTimesheet entry = EmployeeTimesheet.Get(model.Id);

            LogChange(entry);
            entry.SetIsDeleted(true);
            entry.Update();
            dataSet.Remove(model);
            dataGrid.Items.Refresh();
        }
예제 #2
0
        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();
        }