public static void RecreateFolders() { StockDB.DeleteRows(StockDB.dtFolderAll, "ParentId = " + 2); DataRow[] rowArray1 = StockDB.GetDistinctRows(StockDB.dtSymbolList, "Exchange", "not Code like '^%'"); DataRow[] rowArray2 = rowArray1; for (int num1 = 0; num1 < rowArray2.Length; num1++) { DataRow row1 = rowArray2[num1]; StockDB.LoadFolderRow(2, row1["Exchange"].ToString(), false); } StockDB.ResetFolderDatabase(); StockDB.GetFolderDatatable(); }
private void btnCreate_Click(object sender, EventArgs e) { string text1 = InputBox.ShowInputBox("Folder name:", "Name"); if (this.CanCreate) { int num1 = (int)this.CurrentRow["FolderId"]; StockDB.LoadFolderRow(num1, text1); StockDB.ResetFolderDatabase(); ListForm.Current.FolderId = StockDB.GetMaxFolderId(); } this.CreateTree(); }
private void btnScan_Click(object sender, EventArgs e) { TreeNode node1 = this.tvFormula.SelectedNode; if (node1 != null) { string text1 = (string)node1.Tag; int num1 = 0; if (text1 != null) { text1 = text1 + this.GetParam(); FormulaBase base1 = FormulaBase.GetFormulaByName(text1); int num2 = base1.DataCountAtLeast(); FileDataManager manager1 = new FileDataManager(null); string[] textArray1 = ListForm.Current.GetSymbolList(); ArrayList list1 = new ArrayList(); this.pbScan.Maximum = textArray1.Length; this.pbScan.Visible = true; if (textArray1.Length > 0) { string[] textArray2 = textArray1; for (int num4 = 0; num4 < textArray2.Length; num4++) { string text2 = textArray2[num4]; CommonDataProvider provider1 = (CommonDataProvider)manager1[text2, num2]; FormulaPackage package1 = base1.Run(provider1); FormulaData data1 = package1[package1.Count - 1]; if ((data1.Length > 0) && (data1.LASTDATA > 0)) { list1.Add(text2); } num1++; if (((num1 % 10) == 0) || (num1 == textArray1.Length)) { this.pbScan.Value = num1; double num5 = ((double)num1) / ((double)textArray1.Length); this.lMsg.Text = num1.ToString() + "(" + num5.ToString("p2") + ")"; Application.DoEvents(); if ((num1 % 100) == 0) { GC.Collect(); } } } } StockDB.LoadFolderRow(1, text1); int num3 = StockDB.GetMaxFolderId(); if (list1.Count > 0) { this.pbScan.Maximum = list1.Count; num1 = 0; IEnumerator enumerator1 = list1.GetEnumerator(); try { while (enumerator1.MoveNext()) { StockDB.LoadFolderRelRow(enumerator1.Current, num3); num1++; if ((num1 % 100) == 0) { this.pbScan.Value = num1; Application.DoEvents(); } } } finally { IDisposable disposable1 = enumerator1 as IDisposable; if (disposable1 != null) { disposable1.Dispose(); } } } StockDB.ResetFolderDatabase(); ListForm.Current.FolderId = num3; return; } } MessageBox.Show("Please select a condition!"); }
public static DataRow LoadFolderRow(int ParentId, string FolderName) { return(StockDB.LoadFolderRow(ParentId, FolderName, true)); }