public void GetConfigValues(SharePointContext spContext) { //if (items == null) //{ ConfigListClass obj = new ConfigListClass(); items = new Dictionary<string, string>(); items = obj.GetConfigDetails(spContext); //} }
static Config() { ConfigListClass obj = new ConfigListClass(); // Dictionary<string,string> configlist = obj.GetConfigDetails( requestID, sharepointUrl, accessToken); // Cache all these values in static properties. ClientId = WebConfigurationManager.AppSettings["ClientId"]; TimeOffApprovers = WebConfigurationManager.AppSettings["TimeOffApprovers"]; DepartmentCalendar = WebConfigurationManager.AppSettings["DepartmentCalendar"]; HolidayList = WebConfigurationManager.AppSettings["HolidayList"]; OtherTimeOffDaysList = WebConfigurationManager.AppSettings["OtherTimeOffDaysList"]; TimeOffTypes = WebConfigurationManager.AppSettings["TimeOffTypes"]; ConfigList = WebConfigurationManager.AppSettings["ConfigList"]; SenderEmail = WebConfigurationManager.AppSettings["SenderEmail"]; SenderPassword = WebConfigurationManager.AppSettings["SenderPassword"]; WorkingHours = WebConfigurationManager.AppSettings["WorkingHours"]; ListURL = WebConfigurationManager.AppSettings["ListURL"]; TimeOffRequests = WebConfigurationManager.AppSettings["TimeOffRequests"]; ConfigItems = WebConfigurationManager.AppSettings["ConfigItems"]; NotesToolTip = WebConfigurationManager.AppSettings["NotesToolTip"]; TimeOffTypeExceptionList = WebConfigurationManager.AppSettings["TimeOffTypeExceptionList"]; CancelLeaveDay = WebConfigurationManager.AppSettings["CancelLeaveDay"]; }