Exemple #1
0
    public void LoadMenu(  )
    {
        ADODB db = new ADODB();

        if (db.Open())
        {
            // 顶级菜单
            root = this.LoadMenu(db, "0");
            db.Close();
        }
    }
Exemple #2
0
    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;
        }