public DailyPointView() { InitializeComponent(); DPDate.SelectedDate = DateTime.Now.Date; markingControl = new MarkingControl(); companyControl = new CompanyControl(); departmentControl = new DepartmentControl(); officeControl = new OfficeControl(); dailyPointViewControl = new DailyPointViewControl(); fillGriddDailyMarking(); fillCBCompany(); fillCBDepartment(); fillCBOffice(); DataContext = dailyPointViewControl; }
public MarkingCardView() { InitializeComponent(); DateTime firstDayOfMonth = new DateTime(DateTime.Now.Date.Year, DateTime.Now.Date.Month, 1); DateTime lastDayOfMonth = firstDayOfMonth.AddMonths(1).AddDays(-1); DPStartDate.SelectedDate = firstDayOfMonth; DPEndDate.SelectedDate = lastDayOfMonth; markingControl = new MarkingControl(); companyControl = new CompanyControl(); departmentControl = new DepartmentControl(); officeControl = new OfficeControl(); employeeControl = new EmployeeControl(); markingCardViewControl = new MarkingCardViewControl(); fillCBCompany(); fillCBDepartment(); fillCBOffice(); DataContext = markingCardViewControl; }