Esempio n. 1
0
        /// <summary>
        /// 新着情報の取得
        /// </summary>
        /// <param name="clsSqlServer"></param>
        /// <param name="clsBindData"></param>
        private void Set_DatSystemNews(SqlServer clsSqlServer, BindingData clsBindData)
        {
            string strSql = "";

            DataTable DatSqlResult = new DataTable();
            Dictionary <string, struct_sys003> Dic_sys003 = new Dictionary <string, struct_sys003>();

            strSql += Environment.NewLine + " " + "select ";
            strSql += Environment.NewLine + " " + "   format(toroku_datetime, 'yyyy/MM/dd HH:mm:ss') as '日付',";
            strSql += Environment.NewLine + " " + "   news            as '内容'";
            strSql += Environment.NewLine + " " + "from sys003";
            strSql += Environment.NewLine + " " + "where 1 = 1";
            strSql += Environment.NewLine + " " + "and invalid_flg = 0";

            // sqlの実行
            DatSqlResult = clsSqlServer.ExeSQL_Select(strSql);

            // データバインディング用のプロパティへ
            clsBindData.DatSystemNews = DatSqlResult;
        }
Esempio n. 2
0
        /// <summary>
        /// 初期処理
        /// </summary>
        public View01()
        {
            InitializeComponent();

            // ソリューション共通初期処理
            Com01.SystemInit();

            // 初期処理
            clsBindData = new BindingData();

            // データベースへ接続
            SqlServer clsSqlServer = new SqlServer(Com01.clsSystemInfo.LoginDatabase);

            clsSqlServer.Connect();

            // 新着情報取得処理
            Set_DatSystemNews(clsSqlServer, clsBindData);

            // 画面表項目初期値設定
            this.DataContext = clsBindData;
        }