public void LoadMenu( ) { ADODB db = new ADODB(); if (db.Open()) { // 顶级菜单 root = this.LoadMenu(db, "0"); db.Close(); } }
public void LoadData( ) { ADODB db = new ADODB(); if (db.Open()) { DataTable dt = db.exec_dataset(Summary.getquerysql()); root = new List <Summary>(); if (dt != null) { foreach (DataRow row in dt.Rows) { Summary obj = new Summary(row, db); root.Add(obj); } } db.Close(); } return; }
private static int expectedStep(string inStep, string argID, ADODB.Connection objCon, ADODB.Recordset objRec) { object[,] tmpArray; int retVal; string strSQL; retVal = 0; switch (inStep) { case "Login": case "navLinks": case "addOutcome": retVal = 2; break; case "clkButton": case "inputText": retVal = 4; break; case "chkCheckbox": retVal = 5; break; case "selDropdown": retVal = 6; break; case "tblSelect": retVal = 10; break; case "vfyTableEntry": strSQL = "SELECT COUNT(*) FROM argument WHERE argument_set_id = '" + argID + "'"; objRec.Open(strSQL, objCon); tmpArray = objRec.GetRows(); retVal = Convert.ToInt32(tmpArray[0, 0]); objRec.Close(); break; } return retVal; }
private void ConnectDB(ADODB.Connection cn) { cn.Provider = "msdaipp.dso"; cn.CommandTimeout = 3600; cn.Mode = ADODB.ConnectModeEnum.adModeReadWrite; cn.Open(partPath, "Namwah", "ParaW0rld", -1); }
private void ConnectDB(ADODB.Connection cnn, string path) { cnn.Provider = "msdaipp.dso"; cnn.Mode = ADODB.ConnectModeEnum.adModeReadWrite; cnn.Open(path, "Namwah", "ParaW0rld", -1); }