public void SetMonth(DateTime m, string userName) { _date = m; _user = userName; App_Code.Base db = new App_Code.Base(WebConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); d1 = new DateTime(_date.Year, _date.Month, 1); DateTime d2 = new DateTime(_date.Year, _date.Month, DateTime.DaysInMonth(_date.Year, _date.Month)); d2 = d2.AddDays(1); _data = db.GetPlan(userName, d1, d2); _hollidays = db.GetHollidays(userName, d1, d2); }