Example #1
0
        public DataTable getTime(string cd)
        {
            DataTable dt = null;

            //接続用クラスのインスタンス作成
            DBConnective con = new DBConnective();

            con.DB_Connect();

            try
            {
                string st = "select * from 担当者利用時刻 where 担当者コード = '" + cd + "'";
                dt = con.ReadSql(st);
            }
            catch (Exception ex)
            {
                //ロールバック開始
                throw (ex);
            }
            finally
            {
                //トランザクション終了
                con.DB_Disconnect();
            }

            return(dt);
        }
        public string getDenpyoNo(string tableName)
        {
            List <string> lstTableName = new List <string>();

            lstTableName.Add("@テーブル名");

            List <string> lstDataName = new List <string>();

            lstDataName.Add(tableName);

            string       strRet;
            DBConnective dtCon = new DBConnective();

            try
            {
                dtCon.DB_Connect();
                // get伝票番号_PROC"を実行
                strRet = dtCon.RunSqlRe("get伝票番号_PROC", CommandType.StoredProcedure, lstDataName, lstTableName, "@番号");
            }
            catch
            {
                throw;
            }
            finally
            {
                dtCon.DB_Disconnect();
            }

            return(strRet);
        }