Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }