internal static int UpdateSettings() { n = 0; try { daSettings = new TblSettingsTableAdapter(); dtSettings = new DsLiveOutlook.TblSettingsDataTable(); daSettings.FillByID(dtSettings, SettingsInfo.ADay); drwSettings = dtSettings[0]; drwSettings.BeginEdit(); drwSettings.MaxAppointments = SettingsInfo.MaxAppointments; drwSettings.EndEdit(); n = daSettings.Update(dtSettings); return(n); } catch (Exception ex) { Interactive.LInfoError(ex.Message, "Record was not saved !"); return(n); } }
internal static DataTable GetAllSettingssByID() { try { SettingsInfo.Recs = false; dt = new DataTable(); daSettings = new TblSettingsTableAdapter(); dtSettings = new DsLiveOutlook.TblSettingsDataTable(); daSettings.FillByID(dtSettings, SettingsInfo.ADay); dt = dtSettings; if (dt.Rows.Count > 0) { SettingsInfo.Recs = true; } } catch (Exception ex) { Interactive.LInfoError("Could not load Settings Information\n" + ex.Message, "Database connection failure"); } return(dt); }