public EmployeeWindowViewModel(EmployeeDescription e, UIClient dbs) { _currentEmployee = e; db = dbs; NotifyPropertyChanged("Hoursx"); }
public SetRateWindow(EmployeeDescription Employee, UIClient db) { InitializeComponent(); this.Employee = Employee; SetRateLayout.DataContext = this; _db = db; }
public SummaryWindowViewModel(UIClient db, EmployeeDescription employee) { _db = db; _summary = new Summary(); _summary.Date = DateTime.Today.AddDays(-DateTime.Today.Day); NotifyPropertyChanged("SummaryDate"); _employee = employee; _summary.EmployeeDescription = employee; _workRecords = db.GetRecordsOfEmployee(employee); _selectedWorkRecords = new List<WorkRecord>(); SummaryDate = DateTime.Now; var lastSum = db.GetLastSummaries(employee, 1); if (lastSum != null) _lastSummaryDate = lastSum.Last().Date; }
public AddBonusWindow(EmployeeDescription Employee, UIClient db) { InitializeComponent(); this.Employee = Employee; AddBonusLayout.DataContext = this; Bonus = new WorkRecord(); Bonus.EmployeeDescription = Employee; Bonus.CreationDate = DateTime.Now; Bonus.HourlyRate = 1000; // Bonus.isBonus = true; Bonus.Description = null; Bonus.MinutesWorked = 60; System.Console.WriteLine(Bonus.CreationDate); _db = db; }
public SummaryWindow(UIClient db, EmployeeDescription employee){ InitializeComponent(); viewModel = new SummaryWindowViewModel(db, employee); viewModel.RequestClose += (s, e) => this.Close(); SummaryLayout.DataContext = viewModel; }