Пример #1
0
        /// <summary>
        /// ヘッダ情報取得
        /// </summary>
        /// <param name="customer">得意先コード</param>
        /// <remarks>
        /// 作成者    :  sesaki
        /// 作成日    :  2019/11/21
        /// </remarks>
        private void GetHeader(string customer)
        {
            DataSet  dtSet    = null;
            DataBase dataBase = null;

            try
            {
                dataBase = new DataBase();
                List <object> paraList = new List <object>();
                string        sqlStr;
                if (GurabiaCustomer.IsTokan(customer))
                {
                    sqlStr = QueryBuild.GetGurabiaHeaderTokan(DPY_NO, ref paraList);
                }
                else
                {
                    sqlStr = QueryBuild.GetGurabiaHeaderToyo(DPY_NO, ref paraList);
                }

                dataBase.ConnectDB();
                dtSet = dataBase.GetDataSet(sqlStr, paraList.ToArray());

                DataRow row = dtSet.Tables[0].Rows[0];

                CUSTMER_RNM = row["CUSTMER_RNM"].ToString();
                SUBNEGA_NO  = row["SUBNEGA_NO"].ToString();
                BURANDO_NM  = row["BURANDO_NM"].ToString();
                SYOHIN_NM   = row["SYOHIN_NM"].ToString();
                KAN_NM      = row["KAN_NM"].ToString();
                KSKBN_NM    = row["KSKBN_NM"].ToString();
                COLOR_NM    = row["COLOR_NM"].ToString();

                dataBase.DisconnectDB();
            }
            catch (Exception ex)
            {
            }
            finally
            {
                if (dataBase != null)
                {
                    dataBase.DisconnectDB();
                }
                if (dtSet != null)
                {
                    dtSet.Dispose();
                }
            }
        }