public static DataTable GetAll() { using (DataManager oDm = new DataAccess.DataManager()) { oDm.CommandType = CommandType.StoredProcedure; return(oDm.ExecuteDataTable("usp_SMSAPIConfig_GetAll")); } }
public static void Update(int APIId) { using (DataManager oDm = new DataAccess.DataManager()) { oDm.Add("@pAPIId", SqlDbType.Int, APIId); oDm.CommandType = CommandType.StoredProcedure; oDm.ExecuteNonQuery("usp_SMSAPIConfig_Update"); } }
/// <summary> /// Constructor /// </summary> /// <param name="currentUser">Current active user</param> /// <param name="commonFolder">Common files download folder</param> public ChppManager(HMEntities.UserProfiles.User currentUser) { this.oAuth = new OAuthInterface(); this.currentUser = currentUser; this.dataManager = new HM.DataAccess.DataManager(System.IO.Path.Combine(Directory.GetCurrentDirectory(), FolderNames.CommonDataFolder)); this.currentDate = DateTime.Now.ToString(HM.Resources.Constants.Chpp.HMDateFormat); this.filesDownloaded = 0; this.totalFilesToDownload = 0; this.path = System.IO.Path.Combine(currentUser.dataFolderField, currentUser.teamIdField.ToString()); this.downloadExistingFiles = false; }
public MainViewModel() { _data = DataAccess.DataManager.Instance; _store = Storage.PersistenceManager.Instance; Categories = new ObservableCollection<CategoryViewModel>(); _settings = _store.LoadSettings(); if (string.IsNullOrEmpty(_data.APIKey)) _data.APIKey = _settings.APIKey; if (string.IsNullOrEmpty(_settings.Locale) == false) _data.Locale = _settings.Locale; }
/// <summary> /// Constructor /// </summary> /// <param name="commonFolder">Common files folder</param> public DataManager(HMEntities.UserProfiles.User currentUser) { this.commonFolder = Path.Combine(Directory.GetCurrentDirectory(), FolderNames.CommonDataFolder); this.currentUser = currentUser; dataManager = new HM.DataAccess.DataManager(commonFolder); }
/// <summary> /// Constructor /// </summary> /// <param name="commonFolder">Common files folder</param> public DataManager() { this.commonFolder = Path.Combine(Directory.GetCurrentDirectory(), FolderNames.CommonDataFolder); dataManager = new HM.DataAccess.DataManager(commonFolder); }