示例#1
0
        //jQuery
        public ActionResult Autocomplete(string term)
        {
            SQL sql = new SQL();
            sql.Connect();
            var items = sql.ReturnAllInstDB();
            sql.Close();

            var filteredItems = items.Where(item => item.IndexOf(term, StringComparison.InvariantCultureIgnoreCase) >= 0);
            return Json(filteredItems, JsonRequestBehavior.AllowGet);
        }
示例#2
0
        public void SetModel(string UserName)
        {
            SQL sql = new SQL();
            sql.Connect();
            this.user = sql.ReturnUserByName(UserName);
            this.user.Name = UserName;
            this.script = new Script();
            this.ListOfInstanceDb = new List<string>();
            ListOfInstanceDb = sql.ReturnAllInstDB();
            sql.Close();

            this.ListOfTypeOfDb = new List<string>();
            ListOfTypeOfDb.Add("ORACLE");
            ListOfTypeOfDb.Add("MSSQL");
            ListOfTypeOfDb.Add("POSTGRE");
        }