コード例 #1
0
        /// <summary>
        /// getEigyoCd
        /// 営業コードを取得
        /// </summary>
        public DataTable getEigyoCd(string strUserId)
        {
            DataTable dtGetTableGrid = new DataTable();
            string    strSQLInput    = "";

            // SQL文 営業所コード
            strSQLInput = strSQLInput + " SELECT ";
            strSQLInput = strSQLInput + " 営業所コード ";

            strSQLInput = strSQLInput + " FROM ";
            strSQLInput = strSQLInput + " 担当者  ";

            strSQLInput = strSQLInput + " WHERE ";
            strSQLInput = strSQLInput + " ログインID= '" + strUserId + "' ";
            strSQLInput = strSQLInput + " AND 削除='N' ";

            // SQLのインスタンス作成
            DBConnective dbconnective = new DBConnective();

            try
            {
                dtGetTableGrid = dbconnective.ReadSql(strSQLInput);
            }
            catch
            {
                throw;
            }
            finally
            {
                dbconnective.DB_Disconnect();
            }
            return(dtGetTableGrid);
        }
コード例 #2
0
        ///<summary>
        ///updMOdataKakutei
        ///MOデータ確定処理
        ///</summary>
        public void updMOdataKakutei(List <string> lstStringMOKakutei)
        {
            List <string> lstTableName = new List <string>();

            lstTableName.Add("@年月度");
            lstTableName.Add("@商品コード");
            lstTableName.Add("@ユーザー名");

            DBConnective dbconnective = new DBConnective();

            //トランザクション開始
            dbconnective.BeginTrans();
            try
            {
                //MOデータ削除_PROCを実行
                dbconnective.RunSqlRe("MOデータ確定_PROC", CommandType.StoredProcedure, lstStringMOKakutei, lstTableName);

                //コミット
                dbconnective.Commit();
            }
            catch (Exception ex)
            {
                //ロールバック開始
                dbconnective.Rollback();
                throw (ex);
            }
            finally
            {
                //トランザクション終了
                dbconnective.DB_Disconnect();
            }
        }
コード例 #3
0
ファイル: MakerList_B.cs プロジェクト: kawabata-k-crew/KATO
        ///<summary>
        ///setDatagridView
        ///データグリッドビュー表示
        ///作成者:大河内
        ///作成日:2017/3/23
        ///更新者:大河内
        ///更新日:2017/3/23
        ///カラム論理名
        ///</summary>
        public DataTable setKensaku(string strTxtDaibun, string strTxtKensaku, int RadioBtnJud)
        {
            DataTable dtGetTableGrid = new DataTable();

            string strWhere = null;

            //SQL用に移動
            DBConnective dbConnective = new DBConnective();

            strWhere = "WHERE a.削除 = 'N'";

            //大分類
            if (strTxtDaibun != "")
            {
                strWhere = strWhere + " AND a.メーカーコード IN (SELECT メーカーコード FROM 商品 WHERE 削除 = 'N' AND 大分類コード = '" + strTxtDaibun + "')";
            }

            if (strTxtKensaku != "")
            {
                //現行では検索不可能だが可能になった
                strWhere = strWhere + "AND a.メーカー名 LIKE '%" + strTxtKensaku + "%'";
            }

            //並び替えボタンクリック時の動き
            if (RadioBtnJud == 1)
            {
                dtGetTableGrid = dbConnective.ReadSql("SELECT a.メーカーコード, a.メーカー名 FROM メーカー a " + strWhere + " ORDER BY a.メーカーコード");
            }
            else
            {
                dtGetTableGrid = dbConnective.ReadSql("SELECT a.メーカーコード, a.メーカー名 FROM メーカー a " + strWhere + " ORDER BY a.メーカー名");
            }
            return(dtGetTableGrid);
        }
コード例 #4
0
        ///<summary>
        ///getDenpyoData
        ///伝票データの取得
        ///</summary>
        public DataTable getDenpyoData(string s)
        {
            DataTable dt = null;

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

            try
            {
                string strSQL = "SELECT 伝票番号, CONVERT(VARCHAR, 伝票年月日, 111) as 伝票年月日, 仕入先コード, 取引区分, 担当者コード, 営業所コード FROM 出庫ヘッダ WHERE 伝票番号= " + s + " AND 削除='N'";

                dt = con.ReadSql(strSQL);
            }
            catch (Exception ex)
            {
                //ロールバック開始
                con.Rollback();
                throw (ex);
            }
            finally
            {
                //トランザクション終了
                con.DB_Disconnect();
            }
            return(dt);
        }
コード例 #5
0
        /// <summary>
        /// delRiekiritsu
        /// 表示中のマスタデータを削除する処理
        /// </summary>
        public void delRiekiritsu(List <string> lstDeleteItem)
        {
            DBConnective dbconnective = new DBConnective();

            try
            {
                // トランザクション開始
                dbconnective.BeginTrans();

                // 商品分類別利益率設定マスタ削除_PROCを実行
                dbconnective.RunSql("商品分類別利益率設定マスタ削除_PROC " + lstDeleteItem[0] + ", '" + lstDeleteItem[1] + "'");

                // コミット
                dbconnective.Commit();
            }
            catch
            {
                // ロールバック処理
                dbconnective.Rollback();
                throw;
            }
            finally
            {
                dbconnective.DB_Disconnect();
            }
            return;
        }
コード例 #6
0
        ///<summary>
        ///addTanaoroshi
        ///テキストボックス内のデータをDBに登録
        ///作成者:大河内
        ///作成日:2017/3/22
        ///更新者:大河内
        ///更新日:2017/4/10
        ///カラム論理名
        ///</summary>
        public void addTanaoroshi(string strTxtYMD, string strTxtEigyousyo, string strTxtShouhinCD, string strTxtTanasuu, string strTxtTanabanEdit)
        {
            string strSQLInput = null;

            //SQLのインスタンス作成
            DBConnective dbconnective = new DBConnective();

            //トランザクション開始
            dbconnective.BeginTrans();

            try
            {
                strSQLInput = null;

                strSQLInput = "棚卸入力更新_PROC '" + strTxtYMD + "','" + strTxtEigyousyo + "','" + strTxtShouhinCD + "','" + strTxtTanasuu + "','" + strTxtTanabanEdit + "', 'ADMIN'";
                dbconnective.RunSql(strSQLInput);

                //コミット開始
                dbconnective.Commit();

                MessageBox.Show("登録。", "登録", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            catch
            {
                //ロールバック開始
                dbconnective.Rollback();
                MessageBox.Show("登録失敗。", "登録", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
コード例 #7
0
        public decimal getShukko(string denNo, string gyo)
        {
            decimal   ret      = 0;
            DataTable dtRet    = null;
            string    strQuery = "";

            strQuery  = "SELECT 数量 FROM  出庫明細";
            strQuery += " WHERE 伝票番号 = " + denNo;
            strQuery += " AND 行番号 = " + gyo;
            strQuery += " AND 削除 = 'N'";

            DBConnective dbCon = new DBConnective();

            try
            {
                dtRet = dbCon.ReadSql(strQuery);

                if (dtRet != null && dtRet.Rows.Count > 0)
                {
                    if (dtRet.Rows[0]["数量"] != null && dtRet.Rows[0]["数量"] != DBNull.Value)
                    {
                        ret = Decimal.Parse(dtRet.Rows[0]["数量"].ToString());
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(ret);
        }
コード例 #8
0
        ///<summary>
        ///getNyukinSonota
        ///入金その他を取得
        ///</summary>
        /// <param name="lstString">
        ///     listString[0]:得意先コードStart
        ///     listString[1]:日付Start
        ///     listString[2]:日付End
        /// </param>
        public DataTable getNyukinSonota(List <string> lstString)
        {
            DataTable dtGetTableGrid = new DataTable();

            string strSQLInput = "";

            //データ渡し用
            List <string> lstStringSQL = new List <string>();


            //SQL文 入金その他

            strSQLInput = strSQLInput + " SELECT dbo.f_get売掛残高一覧表_入金_その他( '" + lstString[0] + "','" + lstString[1] + "','" + lstString[2] + "') AS 入金その他 ";

            //SQLのインスタンス作成
            DBConnective dbconnective = new DBConnective();

            try
            {
                dtGetTableGrid = dbconnective.ReadSql(strSQLInput);
            }
            catch (Exception ex)
            {
                new CommonException(ex);
                throw (ex);
            }
            finally
            {
                dbconnective.DB_Disconnect();
            }

            return(dtGetTableGrid);
        }
コード例 #9
0
        /// <summary>
        ///     getZenzan
        ///     前月残高を取得
        /// </summary>
        /// <param name="lstString">
        ///     listString[0]:得意先コードStart
        ///     listString[1]:日付Start
        ///     listString[2]:日付End
        /// </param>
        public DataTable getZenzan(List <string> lstString)
        {
            DataTable dtGetTableGrid = new DataTable();

            string strSQLInput = "";

            //データ渡し用
            List <string> lstStringSQL = new List <string>();


            //SQL文 請求履歴

            strSQLInput = strSQLInput + " SELECT dbo.f_get売掛残高一覧表_繰越残高FROM取引先経理情報( '" + lstString[0] + "'" + ",dbo.f_月初日('" + lstString[1] + "')) AS 前月残高 ";

            //SQLのインスタンス作成
            DBConnective dbconnective = new DBConnective();

            try
            {
                dtGetTableGrid = dbconnective.ReadSql(strSQLInput);
            }
            catch (Exception ex)
            {
                new CommonException(ex);
                throw (ex);
            }
            finally
            {
                dbconnective.DB_Disconnect();
            }

            return(dtGetTableGrid);
        }
コード例 #10
0
        ///<summary>
        ///getSotozei
        ///外税を取得
        ///</summary>
        /// <param name="lstString">
        ///     listString[0]:得意先コードStart
        ///     listString[1]:日付Start
        ///     listString[2]:日付End
        /// </param>
        public DataTable getSotozei(List <string> lstString)
        {
            DataTable dtGetTableGrid = new DataTable();

            string strSQLInput = "";

            //データ渡し用
            List <string> lstStringSQL = new List <string>();


            //SQL文 外税

            strSQLInput = strSQLInput + " SELECT dbo.f_get売掛残高一覧表_月間消費税( '" + lstString[0] + "','" + lstString[2] + "'," + lstString[3] + ") AS 請求消費税 ";

            //SQLのインスタンス作成
            DBConnective dbconnective = new DBConnective();

            try
            {
                dtGetTableGrid = dbconnective.ReadSql(strSQLInput);
            }
            catch (Exception ex)
            {
                new CommonException(ex);
                throw (ex);
            }
            finally
            {
                dbconnective.DB_Disconnect();
            }

            return(dtGetTableGrid);
        }
コード例 #11
0
        public DataTable getTokuisakiInfo(string tCode)
        {
            DataTable dtTokuisakiInfo = new DataTable();

            // SQLのパス指定用List
            List <string> listSqlPath = new List <string>();

            listSqlPath.Add("E0330_TokuisakiMotocyoKakunin");
            listSqlPath.Add("E0330_TokuisakiMotocyoKakunin_TokuisakiSELECT");

            DBConnective dbconnective = new DBConnective();

            try
            {
                OpenSQL opensql = new OpenSQL();
                // sqlファイルからSQL文を取得
                string strSqltxt = opensql.setOpenSQL(listSqlPath);
                string sql       = string.Format(strSqltxt, tCode);

                dtTokuisakiInfo = dbconnective.ReadSql(sql);
            }
            catch (Exception ex)
            {
                new CommonException(ex);
                throw (ex);
            }
            finally
            {
                dbconnective.DB_Disconnect();
            }
            return(dtTokuisakiInfo);
        }
コード例 #12
0
        ///<summary>
        ///updShukoInputDel
        ///データの削除
        ///</summary>
        public void updShukoInputDel(List <string> lstStringData, List <string> lstStringTanblename)
        {
            //SQL用に移動
            DBConnective dbconnective = new DBConnective();

            //トランザクション開始
            dbconnective.BeginTrans();
            try
            {
                //プロシージャ(戻り値なし)用のメソッドに投げる
                dbconnective.RunSql("出庫依頼入力削除_PROC", CommandType.StoredProcedure, lstStringData, lstStringTanblename);

                //コミット
                dbconnective.Commit();
            }
            catch (Exception ex)
            {
                //ロールバック開始
                dbconnective.Rollback();
                throw (ex);
            }
            finally
            {
                //トランザクション終了
                dbconnective.DB_Disconnect();
            }
            return;
        }
コード例 #13
0
        /// <summary>
        /// getUriage
        /// 得意先別売上管理表_PROCを実行
        /// </summary>
        public DataTable getUriage(List <string> lstDataName)
        {
            DataTable dtRet = new DataTable();

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

            lstTableName.Add("@開始年月日");
            lstTableName.Add("@終了年月日");
            lstTableName.Add("@開始グループコード");
            lstTableName.Add("@終了グループコード");
            lstTableName.Add("@開始担当者コード");
            lstTableName.Add("@終了担当者コード");
            lstTableName.Add("@開始得意先コード");
            lstTableName.Add("@終了得意先コード");
            lstTableName.Add("@開始営業所コード");
            lstTableName.Add("@終了営業所コード");

            DBConnective dbconnective = new DBConnective();

            try
            {
                // 請求明細書_PROCを実行
                dtRet = dbconnective.RunSqlReDT("得意先別売上管理表_PROC", CommandType.StoredProcedure, lstDataName, lstTableName, "@結果");

                return(dtRet);
            }
            catch
            {
                throw;
            }
            finally
            {
                dbconnective.DB_Disconnect();
            }
        }
コード例 #14
0
        /// <summary>
        /// getShohinData
        /// 商品データを取得
        /// </summary>
        public DataTable getShohinData(List <string> lstString)
        {
            DataTable dtGetTableGrid = new DataTable();
            string    strSQLInput    = "";

            // データ渡し用
            List <string> lstStringSQL = new List <string>();

            // SQL文 商品別利益率

            strSQLInput = strSQLInput + " SELECT * FROM 商品 WHERE 商品コード='" + lstString[0] + "' AND 削除='N' ";

            // SQLのインスタンス作成
            DBConnective dbconnective = new DBConnective();

            try
            {
                dtGetTableGrid = dbconnective.ReadSql(strSQLInput);
            }
            catch (Exception ex)
            {
                new CommonException(ex);
                throw (ex);
            }
            finally
            {
                dbconnective.DB_Disconnect();
            }
            return(dtGetTableGrid);
        }
コード例 #15
0
        ///<summary>
        ///setYMD
        ///最終棚卸年月日の表示
        ///作成者:大河内
        ///作成日:2017/3/22
        ///更新者:大河内
        ///更新日:2017/4/10
        ///カラム論理名
        ///</summary>
        public DataTable setYMD()
        {
            //データ渡し用
            List <string> lstStringSQL = new List <string>();

            DataTable dtYMD = new DataTable();

            //SQLのインスタンス作成
            DBConnective dbconnective = new DBConnective();

            string strSQLName = null;

            strSQLName = "Tanaorosi_SELECT_SetYMD";

            //データ渡し用
            lstStringSQL.Add(strSQLName);

            OpenSQL opensql     = new OpenSQL();
            string  strSQLInput = opensql.setOpenSQL(lstStringSQL);

            strSQLInput = string.Format(strSQLInput);

            dtYMD = dbconnective.ReadSql(strSQLInput);

            dtYMD.Columns["Column1"].ColumnName = "最新棚卸年月日";

            return(dtYMD);
        }
コード例 #16
0
ファイル: Z0000_B.cs プロジェクト: kawabata-neolis/KATO
        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);
        }
コード例 #17
0
        ///<summary>
        ///setSelectItem
        ///データグリッドビューの処理
        ///作成者:大河内
        ///作成日:2017/3/28
        ///更新者:大河内
        ///更新日:2017/4/10
        ///カラム論理名
        ///</summary>
        public DataTable setSelectItem(List <string> lstString)
        {
            DataTable dtSelect = null;

            string strSQLName = null;

            //SQLのインスタンス作成
            DBConnective dbconnective = new DBConnective();

            //データ渡し用
            List <string> lstStringSQL = new List <string>();

            strSQLName = "Tanaorosi_SELECT_SetItem";

            //データ渡し用
            lstStringSQL.Add(strSQLName);

            OpenSQL opensql     = new OpenSQL();
            string  strSQLInput = opensql.setOpenSQL(lstStringSQL);

            //配列設定
            string[] strArray = { lstString[0], lstString[1] };

            strSQLInput = string.Format(strSQLInput, strArray);

            dtSelect = dbconnective.ReadSql(strSQLInput);

            return(dtSelect);
        }
コード例 #18
0
ファイル: Z0000_B.cs プロジェクト: kawabata-neolis/KATO
        ///<summary>
        ///getTantoshaCd
        ///担当者コードの取り出し
        ///</summary>
        public string getTantoshaCd(string strUserID)
        {
            //SQLファイルのパスとファイル名を入れる用
            List <string> lstSQL = new List <string>();

            //SQLファイルのパス用(フォーマット後)
            string strSQLInput = "";

            string strTantoshaCd = null;

            //SQLファイルのパスとファイル名を追加
            lstSQL.Add("Z0000");
            lstSQL.Add("MainMenu_TantoshaCd_SELECT");

            //SQL実行時に取り出したデータを入れる用
            DataTable dtSetCd_B = new DataTable();

            //SQL接続
            OpenSQL opensql = new OpenSQL();

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

            try
            {
                //SQLファイルのパス取得
                strSQLInput = opensql.setOpenSQL(lstSQL);

                //パスがなければ返す
                if (strSQLInput == "")
                {
                    return(strTantoshaCd);
                }

//テスト
                //strUserID = "a.kato";

                //SQLファイルと該当コードでフォーマット
                strSQLInput = string.Format(strSQLInput, strUserID);

                //SQL接続後、該当データを取得
                dtSetCd_B = dbconnective.ReadSql(strSQLInput);

                if (dtSetCd_B.Rows.Count > 0)
                {
                    strTantoshaCd = dtSetCd_B.Rows[0]["担当者コード"].ToString();
                }

                return(strTantoshaCd);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                //トランザクション終了
                dbconnective.DB_Disconnect();
            }
        }
コード例 #19
0
        ///<summary>
        ///getDenpyoMeisai
        ///伝票明細の取得
        ///</summary>
        public DataTable getDenpyoMeisai(string s)
        {
            DataTable dt = null;

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

            try
            {
                string strSQL = "SELECT * FROM 出庫明細 WHERE 伝票番号= " + s + " AND 削除='N' ORDER BY 行番号";

                dt = con.ReadSql(strSQL);
            }
            catch (Exception ex)
            {
                //ロールバック開始
                con.Rollback();
                throw (ex);
            }
            finally
            {
                //トランザクション終了
                con.DB_Disconnect();
            }
            return(dt);
        }
コード例 #20
0
        public DataTable getHatchuData(string strHatchuNo)
        {
            DataTable dtRet    = null;
            string    strQuery = "";

            strQuery += "SELECT 発注数量";
            strQuery += "      ,仕入先コード";
            strQuery += "      ,CONVERT(VARCHAR, 納期, 111) as 納期";
            strQuery += "      ,注番";
            strQuery += "      ,担当者コード";
            strQuery += "      ,仕入先名称";
            strQuery += "      ,商品コード";
            strQuery += "      ,営業所コード";
            strQuery += "  FROM 発注";
            strQuery += " WHERE 発注番号 = " + strHatchuNo;
            strQuery += "   AND 削除     = 'N'";

            DBConnective dbCon = new DBConnective();

            try
            {
                dtRet = dbCon.ReadSql(strQuery);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(dtRet);
        }
コード例 #21
0
        public void addShukkoHead(DBConnective con, string[] updShukkoHeaderItem)
        {
            try
            {
                string strProc = "出庫ヘッダ更新_PROC "
                                 + updShukkoHeaderItem[0] + ", "
                                 + "'" + updShukkoHeaderItem[1] + "', "
                                 + "'" + updShukkoHeaderItem[2] + "', "
                                 + "'" + updShukkoHeaderItem[3] + "', "
                                 + "'" + updShukkoHeaderItem[4] + "', "
                                 + "'" + updShukkoHeaderItem[5] + "', "
                                 + "'" + updShukkoHeaderItem[6] + "', "
                                 + "'" + updShukkoHeaderItem[7] + "'";

                // 出庫ヘッダ更新_PROC
                con.ReadSql(strProc);
            }
            catch
            {
                throw;
            }
            finally
            {
            }
        }
コード例 #22
0
        /// <summary>
        /// getShiharai
        /// 伝票番号の最大値を取得
        /// </summary>
        public DataTable getMaxDenpyoNo(string strDenpyoNo)
        {
            DataTable dtGetDenpyoNo = new DataTable();

            string strSql = "SELECT MAX(伝票番号) AS 最大値 FROM 支払 WHERE  削除='N'";

            // 伝票番号がある場合
            if (!strDenpyoNo.Equals(""))
            {
                strSql += " AND 伝票番号 < " + strDenpyoNo;
            }

            DBConnective dbconnective = new DBConnective();

            try
            {
                // 検索データをテーブルへ格納
                dtGetDenpyoNo = dbconnective.ReadSql(strSql);
            }
            catch
            {
                throw;
            }
            finally
            {
                dbconnective.DB_Disconnect();
            }

            return(dtGetDenpyoNo);
        }
コード例 #23
0
        ///<summary>
        ///setTextData
        ///前画面のデータを記入
        ///作成者:大河内
        ///作成日:2017/3/15
        ///更新者:大河内
        ///更新日:2017/3/15
        ///カラム論理名
        ///</summary>
        private void setTextData()
        {
            //SQLのインスタンス作成
            DBConnective dbconnective = new DBConnective();

            if (strDaibunruiCode.Length >= 1)
            {
                txtDaibunrui.Text = strDaibunruiCode;
                intDBjud          = 1;
                setLabel(intDBjud);
            }
            if (strChubunruiCode.Length >= 1)
            {
                txtChubunrui.Text = strChubunruiCode;
                intDBjud          = 2;
                setLabel(intDBjud);
            }
            if (strMakerCode.Length >= 1)
            {
                txtMaker.Text = strMakerCode;
                intDBjud      = 3;
                setLabel(intDBjud);
            }
            txtKensaku.Text = strKensaku;
        }
コード例 #24
0
        /// <summary>
        /// getDate
        /// 日付制限テーブルから最小年月日、最大年月日を取得
        /// </summary>
        public DataTable getDate(string strEigyoshoCd)
        {
            DataTable dtGetShiharai = new DataTable();
            string    strSql;

            strSql  = "SELECT 最小年月日, 最大年月日 FROM 日付制限 ";
            strSql += "WHERE 画面NO ='6' ";
            strSql += "AND 営業所コード ='" + strEigyoshoCd + "' ";

            DBConnective dbconnective = new DBConnective();

            try
            {
                // 検索データをテーブルへ格納
                dtGetShiharai = dbconnective.ReadSql(strSql);

                return(dtGetShiharai);
            }
            catch
            {
                throw;
            }
            finally
            {
                dbconnective.DB_Disconnect();
            }
        }
コード例 #25
0
        /// <summary>
        /// getZengetuYokugetuSyutoku
        /// 締切年月日の前月翌月を取得
        /// </summary>
        public DataTable getZengetuYokugetuSyutoku(List <string> lstString)
        {
            DataTable dtGetTableGrid = new DataTable();

            string strSQLInput = "";

            // データ渡し用
            List <string> lstStringSQL = new List <string>();


            // SQL文 請求履歴

            strSQLInput = strSQLInput + " SELECT dbo.f_前月翌日('" + lstString[0] + "') AS 前月翌月 ";

            // SQLのインスタンス作成
            DBConnective dbconnective = new DBConnective();

            try
            {
                dtGetTableGrid = dbconnective.ReadSql(strSQLInput);
            }
            catch (Exception ex)
            {
                new CommonException(ex);
                throw (ex);
            }
            finally
            {
                dbconnective.DB_Disconnect();
            }

            return(dtGetTableGrid);
        }
コード例 #26
0
        /// <summary>
        /// delShiharai
        /// 表示中の支払を全削除する処理
        /// </summary>
        public void delShiharai(string[] strDeleteItem)
        {
            DBConnective dbconnective = new DBConnective();

            try
            {
                // トランザクション開始
                dbconnective.BeginTrans();

                // 支払全削除_PROCを実行
                DataTable dtRet = dbconnective.ReadSql("支払全削除_PROC '" + strDeleteItem[0] + "', '" + strDeleteItem[1] + "'");

                // コミット
                dbconnective.Commit();
            }
            catch (Exception ex)
            {
                // ロールバック処理
                dbconnective.Rollback();
                new CommonException(ex);
                //throw (ex);
            }
            finally
            {
                dbconnective.DB_Disconnect();
            }
            return;
        }
コード例 #27
0
        ///<summary>
        ///judtxtDaibunruiLeave
        ///code入力箇所からフォーカスが外れた時
        ///作成者:大河内
        ///作成日:2017/3/21
        ///更新者:大河内
        ///更新日:2017/4/7
        ///カラム論理名
        ///</summary>
        public DataTable judTxtDaibunruiLeave(List <string> lstString)
        {
            //データ渡し用
            List <string> lstStringSQL = new List <string>();

            string strSQLName = null;

            strSQLName = "M1010_Daibun_SELECT_LEAVE";

            //データ渡し用
            lstStringSQL.Add("M1010_Daibunrui");
            lstStringSQL.Add(strSQLName);

            OpenSQL opensql     = new OpenSQL();
            string  strSQLInput = opensql.setOpenSQL(lstStringSQL);

            //配列設定
            string[] strArray = { lstString[0] };

            strSQLInput = string.Format(strSQLInput, strArray);

            DataTable dtSetcode_B = new DataTable();

            //SQLのインスタンス作成
            DBConnective dbconnective = new DBConnective();

            //SQL文を直書き(+戻り値を受け取る)
            dtSetcode_B = dbconnective.ReadSql(strSQLInput);

            return(dtSetcode_B);
        }
コード例 #28
0
        public DataTable baseText1_Leave(string strBaseText1)
        {
            string strSQLName = null;

            //データ渡し用
            List <string> lstStringSQL = new List <string>();

            strSQLName = "JuchuInput_SELECT_LEAVE";

            //データ渡し用
            lstStringSQL.Add(strSQLName);

            OpenSQL opensql     = new OpenSQL();
            string  strSQLInput = opensql.setOpenSQL(lstStringSQL);

            //配列設定
            string[] strArray = { strBaseText1 };

            strSQLInput = string.Format(strSQLInput, strArray);

            //SQLのインスタンス作成
            DBConnective dbconnective = new DBConnective();

            DataTable dtSetcode_B = new DataTable();

            //SQL文を直書き(+戻り値を受け取る)
            dtSetcode_B = dbconnective.ReadSql(strSQLInput);

            return(dtSetcode_B);
        }
コード例 #29
0
        // 伝票名から伝票番号を取得
        public string getDenpyoNo()
        {
            List <string> lstTableName = new List <string>();

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

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

            lstDataName.Add("支払伝票");

            string strRet;

            DBConnective dbconnective = new DBConnective();

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

            return(strRet);
        }
コード例 #30
0
        /// <summary>
        /// delShiharai
        /// 在庫一覧表データ作成処理
        /// </summary>
        public void addZaikoIchiranCreate(List <string> lstItem)
        {
            DBConnective dbconnective = new DBConnective();

            try
            {
                // トランザクション開始
                dbconnective.BeginTrans();

                string strProc = "在庫一覧表データ作成_PROC '" + lstItem[0] + "', '" + lstItem[1] + "', '" +
                                 lstItem[2] + "', '" + lstItem[3] + "', '" + lstItem[4] + "'";

                // 在庫一覧表データ作成_PROCを実行
                dbconnective.ReadSql(strProc);

                // コミット
                dbconnective.Commit();
            }
            catch
            {
                // ロールバック処理
                dbconnective.Rollback();
                throw;
            }
            finally
            {
                dbconnective.DB_Disconnect();
            }
            return;
        }