private clsResponse _GetTableList(string pWhere)
        {
            clsResponse response = new clsResponse();

            string SQL = "SELECT name FROM sys.objects";
            SQL += " where type = 'U'";
            if (pWhere.Length > 0)
            {
                SQL += " and name like " + "'" + pWhere + "'";
            }

            SQL += " order by name";
            response = _Select(SQL);
            if (response.xHasError)
            { }
            else
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("テーブル名", typeof(string));
                for (int i = 0; i < response.xGetDataTable(0).Rows.Count; i++)
                {
                    DataRow row = dt.NewRow();
                    row["テーブル名"] = response.xGetDataTable(0).Rows[i]["name"].ToString();
                    dt.Rows.Add(row);
                }
                response = new clsResponse();
                response.xAddDataTable(dt);
            }

            return response;
        }
        internal override clsResponse xGetVersion()
        {
            clsResponse response = new clsResponse();
            string SQL = "SELECT * FROM PRODUCT_COMPONENT_VERSION";
            SQL += " where PRODUCT like 'Oracle%'";

            response = _Select(SQL);
            if (response.xHasError)
            { }
            else
            {
                string version = "";
                version += response.xGetDataTable(0).Rows[0]["PRODUCT"].ToString();
                version += " " + response.xGetDataTable(0).Rows[0]["VERSION"].ToString();
                version += " " + response.xGetDataTable(0).Rows[0]["STATUS"].ToString();
                response.xSetReturn("Version", version);
            }

            return response;
        }
示例#3
0
        public IActionResult Index()
        {
            StringBuilder SQL      = null;
            clsResponse   response = new clsResponse();
            DataTable     dt       = null;
            DateTime      stDate   = clsSystemInfo.xNow;
            string        session  = "";

            session = HttpContext.Session.GetString("eMail");
            if (session == null)
            {
                HttpContext.Session.SetString("eMail", "*****@*****.**");
            }

            ViewData["SessionID"] = HttpContext.Session.GetString("eMail");

            ViewData["Title"] = "TOP@" + clsSystemInfo.xSystemID;

            clsDB db = new clsDB(clsDBInfoPool.xGetInstance().xGetDBInfo(cnstDBKind.Sys));

            db.xDBOpen();

            SQL = new StringBuilder();
            SQL.Append("select * from tbl_news ");
            SQL.Append("order by 連番 desc");
            response = db.xSelect(SQL.ToString());
            db.xDBClose();

            dt = response.xGetDataTable();

            DateTime edDate = clsSystemInfo.xNow;

            clsArgs args = new clsArgs();

            args.xAddDataTable(dt);

            ViewData["stGetDataTime"] = stDate.ToString("HH:mm:ss fff");
            ViewData["edGetDataTime"] = edDate.ToString("HH:mm:ss fff");

            return(View(args));
        }