private void MaxInWindow_Load(object sender, EventArgs e) { keywordDAO = DAOFactory.Instance.GetKeywordDAO(); rankInfo = keywordDAO.GetShowcaseRankInfo(iModifyProductId); this.ProductLabel.Text = rankInfo.ProductName; this.oldMaxInquiryQty.Text = rankInfo.MaxInquiryQty.ToString(); this.NewMaxInquiryQty.Focus(); }
private DAOFactory() { string DataBasePath = string.Empty; #if DEBUG DataBasePath = FileUtils.GetAppDataFolder() + Path.DirectorySeparatorChar + Constants.DEBUG_DB_FILE; #else DataBasePath = FileUtils.GetAppDataFolder() + Path.DirectorySeparatorChar + Constants.DB_FILE; #endif //File.Delete(DataBasePath); if (!File.Exists(DataBasePath)) { SQLiteConnection.CreateFile(DataBasePath); SQLiteDBHelper.EncryptDatabase(DataBasePath, Constants.DB_PASSWORD); } dbHelper = new SQLiteDBHelper(DataBasePath, Constants.DB_PASSWORD); keywordDAO = new KeywordDAO(dbHelper); vpnDAO = new VpnDAO(dbHelper); inquiryDAO = new InquiryDAO(dbHelper); profileDAO = new ProfileDAO(dbHelper); }
private void ImpKwForm_Load(object sender, EventArgs e) { CheckForIllegalCrossThreadCalls = false; keywordDAO = DAOFactory.Instance.GetKeywordDAO(); UpdateListView(null); }