private void LoadSpareIncome() { da = new DataAccess(); List<SpareIncomeView> list = da.SpareIncomeGetAll(); foreach (SpareIncomeView s in list) { string strDate = ""; strDate += s.Date.Year + "."; if (s.Date.Month < 10) strDate += "0"; strDate += s.Date.Month + "."; if (s.Date.Day < 10) strDate += "0"; strDate += s.Date.Day; s.DateString = strDate; } dgSpareMovementIn.DataContext = list.OrderByDescending(s => s.Date); }