public TimeSheetRecord(FactStaff FactStaff, TimeSheet TimeSheet, decimal StaffCount, int daysCount) { factStaff = FactStaff; timeSheet = TimeSheet; staffCount = StaffCount; timeSheetFSRecord = NullTimeSheetFSWorkingDay.Instance; workingDaysCount = daysCount; }
private void cbTimeSheet_SelectedIndexChanged(object sender, EventArgs e) { CurrentTimeSheet = cbTimeSheet.SelectedItem as TimeSheet; //получаем список сотрyдников отдела за период IEnumerable<GetFactStaffForTimeSheetResult> staff = CurrentTimeSheet.GetStaffByPeriod().ToArray(); IEnumerable<GetFactStaffForTimeSheetResult> NotCreatedFactStaff = CurrentTimeSheet.GetNotInsertedStaff(staff).ToArray(); timeSheetFSWorkingDaysBindingSource.DataSource = ((from st in NotCreatedFactStaff join fcSt in KadrController.Instance.Model.FactStaffs on (int)st.idFactStaff equals (int)fcSt.id select new { TSRecord = st, FactSt = fcSt }).Select(depSt => new TimeSheetRecord(depSt.FactSt, CurrentTimeSheet, depSt.TSRecord.StaffCount, Convert.ToInt32(depSt.TSRecord.daysCount))).Union(CurrentTimeSheet.TimeSheetFSWorkingDays.Where(tsRecord => (tsRecord.IsClosed != true)).Select(tsRecord => new TimeSheetRecord(tsRecord)))).OrderBy(tsRecord => tsRecord.FactStaff.Employee.LastName).ThenBy(tsRecord => tsRecord.FactStaff.Employee.FirstName).ThenBy(tsRecord => tsRecord.FactStaff.Employee.Otch); }
public TimeSheetDecorator(TimeSheet timeSheet) { this.timeSheet = timeSheet; }