Beispiel #1
0
        /// <summary>
        /// 製造資源の変更
        ///
        /// 使用画面:MstRoutineResourceMnt
        /// </summary>
        public int Update()
        {
            ComDB db  = new ComDB(_db_type);
            int   rtn = 0;

            db.DbParametersClear();

            db.DbPsetInt("RET", rtn, ComConst.DB_RTN);
            db.DbPsetString("@I_ITEM_NO", _item_no, ComConst.DB_IN);
            db.DbPsetString("@I_WS_CD", _ws_cd, ComConst.DB_IN);
            db.DbPsetInt("@I_ROUTINE_SEQ", _routine_seq, ComConst.DB_IN);
            db.DbPsetString("@I_PROCESS_CD", _process_cd, ComConst.DB_IN);
            db.DbPsetInt("@I_PTY_NO", _pty_no, ComConst.DB_IN);
            db.DbPsetString("@I_RESOURCE_CD", _resource_cd, ComConst.DB_IN);
            db.DbPsetDouble("@I_SETUP_TIME", _setup_time, ComConst.DB_IN);
            db.DbPsetDouble("@I_UNIT_TIME", _unit_time, ComConst.DB_IN);
            db.DbPsetDouble("@I_UNIT_QTY", _unit_qty, ComConst.DB_IN);
            db.DbPsetDouble("@I_TRANSFER_TIME", _transfer_time, ComConst.DB_IN);
            db.DbPsetDouble("@I_MFG_LOT_QTY", _mfg_lot_qty, ComConst.DB_IN);
            db.DbPsetString("@I_SPEC_CD", _spec_cd, ComConst.DB_IN);
            db.DbPsetString("@I_JIGU", _jigu, ComConst.DB_IN);
            db.DbPsetString("@I_DIE", _die, ComConst.DB_IN);

            db.DbPsetString("@I_CHG_PGM", _chg_pgm, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_USER_ID", _chg_user_id, ComConst.DB_IN);
            db.DbPsetInt("@I_LANG", _lang, ComConst.DB_IN);

            db.DbPsetInt("@O_ERRCODE", _errcode, ComConst.DB_OUT);
            db.DbPsetString("@O_MSG", _errmsg, ComConst.DB_OUT);
            db.DbPsetInt("@O_SQLCODE", _sqlcode, ComConst.DB_OUT);
            db.DbPsetString("@O_SQLMSG", _dbmsg, ComConst.DB_OUT);
            db.DbPsetString("@O_PROC_NAME", _proc_name, ComConst.DB_OUT);

            db.DbBeginTrans();
            rtn = db.DbStored("SP_ROUTINE_RESOURCE_UPDATE");
            rtn = db.DbPgetInt("RET");
            if (rtn == ComConst.SUCCEED)
            {
                db.DbCommit();
            }
            else
            {
                _errcode   = db.DbPgetInt("@O_ERRCODE");
                _errmsg    = db.DbPgetString("@O_MSG");
                _sqlcode   = db.DbPgetInt("@O_SQLCODE");
                _dbmsg     = db.DbPgetString("@O_SQLMSG");
                _proc_name = db.DbPgetString("@O_PROC_NAME");
                _strErr    = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]";
                db.DbRollback();
                rtn = ComConst.FAILED;
            }

            return(rtn);
        }
Beispiel #2
0
        /// <summary>
        /// 部門の変更
        ///
        /// 使用画面:MstDeptMnt
        /// </summary>
        public int Update()
        {
            ComDB db  = new ComDB(_db_type);
            int   rtn = 0;

            db.DbParametersClear();
            db.DbPsetInt("RET", rtn, ComConst.DB_RTN);
            db.DbPsetString("@I_DEPT_CD", _dept_cd, ComConst.DB_IN);
            db.DbPsetString("@I_DEPT_DESC1", _dept_desc1, ComConst.DB_IN);
            db.DbPsetString("@I_DEPT_DESC2", _dept_desc2, ComConst.DB_IN);
            db.DbPsetString("@I_DEPT_DESC3", _dept_desc3, ComConst.DB_IN);
            db.DbPsetString("@I_DEPT_DESC4", _dept_desc4, ComConst.DB_IN);
            db.DbPsetInt("@I_DEPT_TYPE", _dept_type, ComConst.DB_IN);
            db.DbPsetDouble("@I_NUMBER_DEPT", _number_dept, ComConst.DB_IN);
            db.DbPsetDouble("@I_AREA_DEPT", _area_dept, ComConst.DB_IN);

            //db.DbPsetDate("@I_ENTRY_DATE", DateTime.Now.ToLongDateString(), ComConst.DB_IN);
            db.DbPsetString("@I_CHG_USER_ID", _chg_user_id, ComConst.DB_IN);
            db.DbPsetInt("@I_LANG", _lang, ComConst.DB_IN);
            db.DbPsetInt("@I_UPDATE_CNTR", _update_cntr, ComConst.DB_IN);
            db.DbPsetInt("@O_ERRCODE", _errcode, ComConst.DB_OUT);
            db.DbPsetString("@O_MSG", _errmsg, ComConst.DB_OUT);
            db.DbPsetInt("@O_SQLCODE", _sqlcode, ComConst.DB_OUT);
            db.DbPsetString("@O_SQLMSG", _dbmsg, ComConst.DB_OUT);
            db.DbPsetString("@O_PROC_NAME", _proc_name, ComConst.DB_OUT);

            db.DbBeginTrans();
            rtn = db.DbStored("SP_DEPT_UPDATE");
            rtn = db.DbPgetInt("RET");
            if (rtn == ComConst.SUCCEED)
            {
                db.DbCommit();
            }
            else
            {
                _errcode   = db.DbPgetInt("@O_ERRCODE");
                _errmsg    = db.DbPgetString("@O_MSG");
                _sqlcode   = db.DbPgetInt("@O_SQLCODE");
                _dbmsg     = db.DbPgetString("@O_SQLMSG");
                _proc_name = db.DbPgetString("@O_PROC_NAME");
                _strErr    = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]";
                db.DbRollback();
                rtn = ComConst.FAILED;
            }
            return(rtn);
        }
Beispiel #3
0
        /// <summary>
        /// DateCheck
        /// <para>1) 指定日付からn日稼働日後の日付を編集
        /// IN: I_DATE1, I_WKDAYS     OUT: O_DATE	</para>
        ///
        /// <para>2) 指定日付からn日稼働日前の日付を編集
        /// IN: I_DATE1, I_WKDAYS     OUT: O_DATE</para>
        ///
        /// <para>3) 指定日付間の稼働日数を編集
        /// IN: I_DATE1, I_DATE2      OUT: O_WKDAYS	</para>
        ///
        /// <para>4) 指定日の情報を編集
        /// IN: I_DATE1    OUT: O_HOLIDAY_FLAG, O_PO_RLS_FLAG, O_STD_WORKING_HOUR</para>
        ///
        /// <para>5) 月の稼働日数数を編集(暦日指定)
        /// IN: I_DATE1	   OUT: O_WKDAYS	</para>
        /// 使用画面:OrdSOEntry
        /// </summary>
        public int Get_Date()
        {
            ComDB db  = new ComDB(_db_type);
            int   rtn = 0;

            db.DbParametersClear();

            db.DbPsetInt("RET", rtn, ComConst.DB_RTN);
            db.DbPsetString("@I_CALENDAR_ID", _calendar_id, ComConst.DB_IN);
            db.DbPsetInt("@I_DATE1", _date1, ComConst.DB_IN);
            db.DbPsetInt("@I_DATE2", _date2, ComConst.DB_IN);
            db.DbPsetInt("@I_WKDAYS", _i_wkdays, ComConst.DB_IN);
            db.DbPsetInt("@I_LANG", _lang, ComConst.DB_IN);
            db.DbPsetInt("@I_REQUEST_ID", _request_id, ComConst.DB_IN);
            db.DbPsetInt("@O_DATE", _date, ComConst.DB_OUT);
            db.DbPsetInt("@O_WKDAYS", _o_wkdays, ComConst.DB_OUT);
            db.DbPsetInt("@O_HOLIDAY_FLAG", _holiday_flag, ComConst.DB_OUT);
            db.DbPsetInt("@O_PO_RLS_FLAG", _po_rls_flag, ComConst.DB_OUT);
            db.DbPsetDouble("@O_STD_WORKING_HOUR", _std_working_hour, ComConst.DB_OUT);
            db.DbPsetInt("@O_ERRCODE", _errcode, ComConst.DB_OUT);
            db.DbPsetString("@O_MSG", _errmsg, ComConst.DB_OUT);
            db.DbPsetInt("@O_SQLCODE", _sqlcode, ComConst.DB_OUT);
            db.DbPsetString("@O_SQLMSG", _dbmsg, ComConst.DB_OUT);
            db.DbPsetString("@O_PROC_NAME", _proc_name, ComConst.DB_OUT);

            db.DbBeginTrans(); // Hoshina
            rtn = db.DbStored("SP_CALENDAR_CHECK");
            rtn = db.DbPgetInt("RET");

            if (rtn == ComConst.SUCCEED)
            {
                _date             = db.DbPgetInt("@O_DATE");
                _o_wkdays         = db.DbPgetInt("@O_WKDAYS");
                _holiday_flag     = db.DbPgetInt("@O_HOLIDAY_FLAG");
                _po_rls_flag      = db.DbPgetInt("@O_PO_RLS_FLAG");
                _std_working_hour = db.DbPgetInt("@O_STD_WORKING_HOUR");
                db.DbCommit();  // Hoshina
            }
            else
            {
                _errcode   = db.DbPgetInt("@O_ERRCODE");
                _errmsg    = db.DbPgetString("@O_MSG");
                _sqlcode   = db.DbPgetInt("@O_SQLCODE");
                _dbmsg     = db.DbPgetString("@O_SQLMSG");
                _proc_name = db.DbPgetString("@O_PROC_NAME");
                _strErr    = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]";
                db.DbRollback();  // Hoshina

                rtn = ComConst.FAILED;
            }
            return(rtn);
        }
Beispiel #4
0
        /// <summary>
        /// Calendarの追加&更新
        /// 使用画面:MstCalendarMnt
        /// </summary>
        public int Update()
        {
            ComDB db  = new ComDB(_db_type);
            int   rtn = 0;

            db.DbParametersClear();

            db.DbPsetInt("RET", rtn, ComConst.DB_RTN);
            db.DbPsetString("@I_CALENDAR_ID", _calendar_id, ComConst.DB_IN);
            db.DbPsetInt("@I_CALENDAR_DATE", _calendar_date, ComConst.DB_IN);
            //db.DbPsetInt("@I_CALENDAR_CYM", _calendar_cym, ComConst.DB_IN);
            //db.DbPsetInt("@I_WEEK_NO", _week_no, ComConst.DB_IN);
            //db.DbPsetInt("@I_DAY_OF_WEEK", _day_of_week, ComConst.DB_IN);
            db.DbPsetInt("@I_HOLIDAY_FLAG", _holiday_flag, ComConst.DB_IN);
            db.DbPsetInt("@I_PO_RLS_FLAG", _po_rls_flag, ComConst.DB_IN);
            //db.DbPsetInt("@I_TTL_WORK_DAYS", _ttl_work_days, ComConst.DB_IN);
            //db.DbPsetInt("@I_TTL_DAYS", _ttl_days, ComConst.DB_IN);
            //db.DbPsetInt("@I_TTL_WEEK", _ttl_week, ComConst.DB_IN);
            db.DbPsetDouble("@I_STD_WORKING_HOUR", _std_working_hour, ComConst.DB_IN);
            db.DbPsetString("@I_USER_GROUP", _user_group, ComConst.DB_IN);    // HTS
            db.DbPsetString("@I_CHG_PGM", _chg_pgm, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_USERID", _chg_user_id, ComConst.DB_IN);
            db.DbPsetInt("@I_LANG", _lang, ComConst.DB_IN);
            db.DbPsetInt("@I_UPDATE_CNTR", _update_cntr, ComConst.DB_IN);
            db.DbPsetInt("@O_ERRCODE", _errcode, ComConst.DB_OUT);
            db.DbPsetString("@O_MSG", _errmsg, ComConst.DB_OUT);
            db.DbPsetInt("@O_SQLCODE", _sqlcode, ComConst.DB_OUT);
            db.DbPsetString("@O_SQLMSG", _dbmsg, ComConst.DB_OUT);
            db.DbPsetString("@O_PROC_NAME", _proc_name, ComConst.DB_OUT);
            //db.DbConnection ();
            db.DbBeginTrans();
            rtn = db.DbStored("SP_CALENDAR_UPDATE");
            rtn = db.DbPgetInt("RET");
            if (rtn == ComConst.SUCCEED)
            {
                db.DbCommit();
            }
            else
            {
                _errcode   = db.DbPgetInt("@O_ERRCODE");
                _errmsg    = db.DbPgetString("@O_MSG");
                _sqlcode   = db.DbPgetInt("@O_SQLCODE");
                _dbmsg     = db.DbPgetString("@O_SQLMSG");
                _proc_name = db.DbPgetString("@O_PROC_NAME");
                _strErr    = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]";
                db.DbRollback();
                rtn = ComConst.FAILED;
            }
            db.DbClose();
            return(rtn);
        }
Beispiel #5
0
        /// <summary>
        /// 品目別段取条件マスタ更新
        ///
        /// 使用画面:MstItemSetupMnt
        /// </summary>
        public int Update()
        {
            ComDB db  = new ComDB(_db_type);
            int   rtn = 0;

            db.DbParametersClear();
            db.DbPsetInt("RET", rtn, ComConst.DB_RTN);
            db.DbPsetString("@I_RESOURCE_CD", _resource_cd, ComConst.DB_IN);
            db.DbPsetString("@I_ITEM_NO", _item_no, ComConst.DB_IN);
            db.DbPsetString("@I_PREV_ITEM_NO", _prev_item_no, ComConst.DB_IN);
            db.DbPsetDouble("@I_SETUP_TIME", _setup_time, ComConst.DB_IN);

            db.DbPsetString("@I_CHG_PGM", _chg_pgm, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_USER_ID", _chg_user_id, ComConst.DB_IN);
            db.DbPsetInt("@I_LANG", _lang, ComConst.DB_IN);
            db.DbPsetInt("@O_ERRCODE", _errcode, ComConst.DB_OUT);
            db.DbPsetString("@O_MSG", _errmsg, ComConst.DB_OUT);
            db.DbPsetInt("@O_SQLCODE", _sqlcode, ComConst.DB_OUT);
            db.DbPsetString("@O_SQLMSG", _dbmsg, ComConst.DB_OUT);
            db.DbPsetString("@O_PROC_NAME", _proc_name, ComConst.DB_OUT);

            db.DbBeginTrans();
            rtn = db.DbStored("SP_ITEM_SETUP_UPDATE");
            rtn = db.DbPgetInt("RET");
            if (rtn == ComConst.SUCCEED)
            {
                db.DbCommit();
            }
            else
            {
                _errcode   = db.DbPgetInt("@O_ERRCODE");
                _errmsg    = db.DbPgetString("@O_MSG");
                _sqlcode   = db.DbPgetInt("@O_SQLCODE");
                _dbmsg     = db.DbPgetString("@O_SQLMSG");
                _proc_name = db.DbPgetString("@O_PROC_NAME");
                _strErr    = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]";
                db.DbRollback();
                rtn = ComConst.FAILED;
            }
            return(rtn);
        }
Beispiel #6
0
        /// <summary>
        /// 作業区の変更
        ///
        /// 使用画面:MstWsMnt
        /// </summary>
        public int Update()
        {
            ComDB db  = new ComDB(_db_type);
            int   rtn = 0;

            db.DbParametersClear();

            db.DbPsetInt("RET", rtn, ComConst.DB_RTN);
            db.DbPsetString("@I_WS_CD", _ws_cd, ComConst.DB_IN);
            db.DbPsetString("@I_WS_DESC", _ws_desc, ComConst.DB_IN);
            db.DbPsetString("@I_WS_DESC2", _ws_desc2, ComConst.DB_IN);
            db.DbPsetString("@I_REP_WS_CD", _rep_ws_cd, ComConst.DB_IN);
            db.DbPsetString("@I_COST_CENTER", _cost_center, ComConst.DB_IN);
            db.DbPsetInt("@I_SC_FLAG", _sc_flag, ComConst.DB_IN);
            db.DbPsetString("@I_VENDOR_CD", _vendor_cd, ComConst.DB_IN);
            db.DbPsetInt("@I_INPUT_FLAG", _input_flag, ComConst.DB_IN);
            db.DbPsetInt("@I_LOT_CTRL_FLAG", _lot_ctrl_flag, ComConst.DB_IN);
            db.DbPsetInt("@I_NEG_BAL_FLAG", _neg_bal_flag, ComConst.DB_IN);
            db.DbPsetInt("@I_FRONT_END_FLAG", _front_end_flag, ComConst.DB_IN);
            db.DbPsetInt("@I_COMPL_FLAG", _compl_flag, ComConst.DB_IN);
            db.DbPsetInt("@I_AUTO_DISB_FLAG", _auto_disb_flag, ComConst.DB_IN);
            db.DbPsetDouble("@I_WS_PRC", _ws_prc, ComConst.DB_IN);
            db.DbPsetString("@I_WORK_INST_TYPE", _work_inst_type, ComConst.DB_IN);
            db.DbPsetString("@I_COMPL_SLIP_PATTERN", _compl_slip_pattern, ComConst.DB_IN);
            db.DbPsetString("@I_REJ_WHS", _rej_whs, ComConst.DB_IN);            //ADD BY UBIQ-LIU 2010/11/24
            db.DbPsetString("@I_DATA_CHAR1", _data_char1, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR2", _data_char2, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR3", _data_char3, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR4", _data_char4, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR5", _data_char5, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR6", _data_char6, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR7", _data_char7, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR8", _data_char8, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR9", _data_char9, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR10", _data_char10, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM1", _data_num1, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM2", _data_num2, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM3", _data_num3, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM4", _data_num4, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM5", _data_num5, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM6", _data_num6, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM7", _data_num7, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM8", _data_num8, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM9", _data_num9, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM10", _data_num10, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG1", _data_flag1, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG2", _data_flag2, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG3", _data_flag3, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG4", _data_flag4, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG5", _data_flag5, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG6", _data_flag6, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG7", _data_flag7, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG8", _data_flag8, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG9", _data_flag9, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG10", _data_flag10, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_PGM", _chg_pgm, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_USERID", _chg_user_id, ComConst.DB_IN);
            db.DbPsetInt("@I_LANG", _lang, ComConst.DB_IN);
            db.DbPsetInt("@I_UPDATE_CNTR", _update_cntr, ComConst.DB_IN);
            db.DbPsetInt("@O_ERRCODE", _errcode, ComConst.DB_OUT);
            db.DbPsetString("@O_MSG", _errmsg, ComConst.DB_OUT);
            db.DbPsetInt("@O_SQLCODE", _sqlcode, ComConst.DB_OUT);
            db.DbPsetString("@O_SQLMSG", _dbmsg, ComConst.DB_OUT);
            db.DbPsetString("@O_PROC_NAME", _proc_name, ComConst.DB_OUT);

            db.DbBeginTrans();

            rtn = db.DbStored("SP_WORKSHOP_UPDATE");
            rtn = db.DbPgetInt("RET");
            if (rtn == ComConst.SUCCEED)
            {
                db.DbCommit();
            }
            else
            {
                _errcode   = db.DbPgetInt("@O_ERRCODE");
                _errmsg    = db.DbPgetString("@O_MSG");
                _sqlcode   = db.DbPgetInt("@O_SQLCODE");
                _dbmsg     = db.DbPgetString("@O_SQLMSG");
                _proc_name = db.DbPgetString("@O_PROC_NAME");
                _strErr    = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]";
                db.DbRollback();
                rtn = ComConst.FAILED;
            }

            return(rtn);
        }
Beispiel #7
0
        /// <summary>
        /// 倉庫の変更
        ///
        /// 使用画面:MstWhsMnt
        /// </summary>
        public int Update()
        {
            ComDB db  = new ComDB(_db_type);
            int   rtn = 0;

            db.DbParametersClear();

            db.DbPsetInt("RET", rtn, ComConst.DB_RTN);
            db.DbPsetString("@I_WHS_CD", _whs_cd, ComConst.DB_IN);
            db.DbPsetString("@I_MRP_WHS", _mrp_whs, ComConst.DB_IN);
            db.DbPsetString("@I_WHS_DESC", _whs_desc, ComConst.DB_IN);
            db.DbPsetString("@I_WHS_DESC2", _whs_desc2, ComConst.DB_IN);
            db.DbPsetString("@I_RECV_LOC", _recv_loc, ComConst.DB_IN);
            db.DbPsetInt("@I_WHS_TYPE", _whs_type, ComConst.DB_IN);
            db.DbPsetInt("@I_WHS_ITEM_TYPE", _whs_item_type, ComConst.DB_IN);
            db.DbPsetInt("@I_LOCATION_CTRL_FLAG", _location_ctrl_flag, ComConst.DB_IN);
            db.DbPsetInt("@I_AUTO_HOUSING_TYPE", _auto_housing_type, ComConst.DB_IN);
            db.DbPsetInt("@I_DIRECT_SHIP_FLAG", _direct_ship_flag, ComConst.DB_IN);
            db.DbPsetString("@I_VENDOR_CD", _vendor_cd, ComConst.DB_IN);
            db.DbPsetInt("@I_SUPPLY_TYPE", _supply_type, ComConst.DB_IN);//ADD UBIQ-LIU 2010/05/26
            db.DbPsetInt("@I_CONS_WHS_FLAG", _cons_whs_flag, ComConst.DB_IN);
            db.DbPsetString("@I_CONS_VENDOR_CD", _cons_vendor_cd, ComConst.DB_IN);
            db.DbPsetString("@I_PASS_THRU_WHS_CD", _pass_thru_whs_cd, ComConst.DB_IN);
            db.DbPsetInt("@I_BOND_FLAG", _bond_flag, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR1", _data_char1, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR2", _data_char2, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR3", _data_char3, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR4", _data_char4, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR5", _data_char5, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR6", _data_char6, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR7", _data_char7, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR8", _data_char8, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR9", _data_char9, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR10", _data_char10, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM1", _data_num1, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM2", _data_num2, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM3", _data_num3, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM4", _data_num4, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM5", _data_num5, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM6", _data_num6, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM7", _data_num7, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM8", _data_num8, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM9", _data_num9, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM10", _data_num10, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG1", _data_flag1, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG2", _data_flag2, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG3", _data_flag3, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG4", _data_flag4, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG5", _data_flag5, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG6", _data_flag6, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG7", _data_flag7, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG8", _data_flag8, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG9", _data_flag9, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG10", _data_flag10, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_PGM", _chg_pgm, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_USERID", _chg_user_id, ComConst.DB_IN);
            db.DbPsetInt("@I_LANG", _lang, ComConst.DB_IN);
            db.DbPsetInt("@I_UPDATE_CNTR", _update_cntr, ComConst.DB_IN);
            db.DbPsetInt("@O_ERRCODE", _errcode, ComConst.DB_OUT);
            db.DbPsetString("@O_MSG", _errmsg, ComConst.DB_OUT);
            db.DbPsetInt("@O_SQLCODE", _sqlcode, ComConst.DB_OUT);
            db.DbPsetString("@O_SQLMSG", _dbmsg, ComConst.DB_OUT);
            db.DbPsetString("@O_PROC_NAME", _proc_name, ComConst.DB_OUT);

            db.DbBeginTrans();
            rtn = db.DbStored("SP_WAREHOUSE_UPDATE");
            rtn = db.DbPgetInt("RET");
            if (rtn == ComConst.SUCCEED)
            {
                db.DbCommit();
            }
            else
            {
                _errcode   = db.DbPgetInt("@O_ERRCODE");
                _errmsg    = db.DbPgetString("@O_MSG");
                _sqlcode   = db.DbPgetInt("@O_SQLCODE");
                _dbmsg     = db.DbPgetString("@O_SQLMSG");
                _proc_name = db.DbPgetString("@O_PROC_NAME");
                _strErr    = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]";
                db.DbRollback();
                rtn = ComConst.FAILED;
            }

            return(rtn);
        }
Beispiel #8
0
        /// <summary>
        /// 購入単価の変更
        ///
        /// 使用画面:MstPurPriceMnt
        /// </summary>
        public int Update()
        {
            ComDB db  = new ComDB(_db_type);
            int   rtn = 0;

            db.DbParametersClear();

            db.DbPsetInt("RET", rtn, ComConst.DB_RTN);
            db.DbPsetString("@I_ITEM_NO", _item_no, ComConst.DB_IN);
            db.DbPsetString("@I_WS_CD", _ws_cd, ComConst.DB_IN);
            db.DbPsetString("@I_PROCESS_CD", _process_cd, ComConst.DB_IN);
            db.DbPsetString("@I_VENDOR_CD", _vendor_cd, ComConst.DB_IN);
            db.DbPsetInt("@I_BEG_EFF_DATE", _beg_eff_date, ComConst.DB_IN);
            db.DbPsetInt("@I_END_EFF_DATE", _end_eff_date, ComConst.DB_IN);
            db.DbPsetInt("@I_UNIT_PRC_TYPE", _unit_prc_type, ComConst.DB_IN);
            db.DbPsetInt("@I_UNIT_PRC_BASE", _unit_prc_base, ComConst.DB_IN);
            db.DbPsetInt("@I_COM_PRC_FLAG", _com_prc_flag, ComConst.DB_IN);
            db.DbPsetDouble("@I_TENTATIVE_PRC", _tentative_prc, ComConst.DB_IN);
            db.DbPsetString("@I_TENTATIVE_CUR", _tentative_cur, ComConst.DB_IN);
            db.DbPsetDouble("@I_ACT_PRC", _act_prc, ComConst.DB_IN);
            db.DbPsetString("@I_ACT_CUR", _act_cur, ComConst.DB_IN);
            db.DbPsetDouble("@I_DUTY_PCT", _duty_pct, ComConst.DB_IN);
            db.DbPsetInt("@I_TAX_TYPE", _tax_type, ComConst.DB_IN);
            db.DbPsetString("@I_TAX_CD", _tax_cd, ComConst.DB_IN);
            db.DbPsetDouble("@I_VALUE_ADD_TAX_PCT", _value_add_tax_pct, ComConst.DB_IN);
            db.DbPsetString("@I_PAY_TERMS", _pay_terms, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR1", _data_char1, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR2", _data_char2, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR3", _data_char3, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR4", _data_char4, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR5", _data_char5, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR6", _data_char6, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR7", _data_char7, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR8", _data_char8, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR9", _data_char9, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR10", _data_char10, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM1", _data_num1, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM2", _data_num2, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM3", _data_num3, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM4", _data_num4, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM5", _data_num5, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM6", _data_num6, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM7", _data_num7, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM8", _data_num8, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM9", _data_num9, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM10", _data_num10, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG1", _data_flag1, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG2", _data_flag2, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG3", _data_flag3, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG4", _data_flag4, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG5", _data_flag5, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG6", _data_flag6, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG7", _data_flag7, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG8", _data_flag8, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG9", _data_flag9, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG10", _data_flag10, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_PGM", _chg_pgm, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_USERID", _chg_user_id, ComConst.DB_IN);
            db.DbPsetInt("@I_LANG", _lang, ComConst.DB_IN);
            db.DbPsetInt("@I_UPDATE_CNTR", _update_cntr, ComConst.DB_IN);
            db.DbPsetInt("@O_ERRCODE", _errcode, ComConst.DB_OUT);
            db.DbPsetString("@O_MSG", _errmsg, ComConst.DB_OUT);
            db.DbPsetInt("@O_SQLCODE", _sqlcode, ComConst.DB_OUT);
            db.DbPsetString("@O_SQLMSG", _dbmsg, ComConst.DB_OUT);
            db.DbPsetString("@O_PROC_NAME", _proc_name, ComConst.DB_OUT);

            db.DbBeginTrans();
            rtn = db.DbStored("SP_PURCHASE_PRICE_UPDATE");
            rtn = db.DbPgetInt("RET");
            if (rtn == ComConst.SUCCEED)
            {
                db.DbCommit();
            }
            else
            {
                _errcode   = db.DbPgetInt("@O_ERRCODE");
                _errmsg    = db.DbPgetString("@O_MSG");
                _sqlcode   = db.DbPgetInt("@O_SQLCODE");
                _dbmsg     = db.DbPgetString("@O_SQLMSG");
                _proc_name = db.DbPgetString("@O_PROC_NAME");
                _strErr    = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]";
                db.DbRollback();
                rtn = ComConst.FAILED;
            }

            return(rtn);
        }
Beispiel #9
0
        /// <summary>
        /// 工程の変更
        ///
        /// 使用画面:MstProcessMnt
        /// </summary>
        public int Update()
        {
            ComDB db  = new ComDB(_db_type);
            int   rtn = 0;

            db.DbParametersClear();

            db.DbPsetInt("RET", rtn, ComConst.DB_RTN);
            db.DbPsetString("@I_WS_CD", _ws_cd, ComConst.DB_IN);
            db.DbPsetString("@I_PROCESS_CD", _process_cd, ComConst.DB_IN);
            db.DbPsetString("@I_PROCESS_DESC", _process_desc, ComConst.DB_IN);
            db.DbPsetString("@I_PROCESS_DESC2", _process_desc2, ComConst.DB_IN);
            db.DbPsetString("@I_COST_CENTER", _cost_center, ComConst.DB_IN);
            db.DbPsetInt("@I_SC_FLAG", _sc_flag, ComConst.DB_IN);
            db.DbPsetString("@I_VENDOR_CD", _vendor_cd, ComConst.DB_IN);
            db.DbPsetDouble("@I_CAPA_MH", _capa_mh, ComConst.DB_IN);
            db.DbPsetString("@I_TIME_CONSTRAINT", _time_constraint, ComConst.DB_IN);    // IMV3
            db.DbPsetString("@I_DATA_CHAR1", _data_char1, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR2", _data_char2, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR3", _data_char3, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR4", _data_char4, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR5", _data_char5, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR6", _data_char6, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR7", _data_char7, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR8", _data_char8, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR9", _data_char9, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR10", _data_char10, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM1", _data_num1, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM2", _data_num2, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM3", _data_num3, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM4", _data_num4, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM5", _data_num5, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM6", _data_num6, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM7", _data_num7, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM8", _data_num8, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM9", _data_num9, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM10", _data_num10, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG1", _data_flag1, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG2", _data_flag2, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG3", _data_flag3, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG4", _data_flag4, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG5", _data_flag5, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG6", _data_flag6, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG7", _data_flag7, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG8", _data_flag8, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG9", _data_flag9, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG10", _data_flag10, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_PGM", _chg_pgm, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_USERID", _chg_user_id, ComConst.DB_IN);
            db.DbPsetInt("@I_LANG", _lang, ComConst.DB_IN);
            db.DbPsetInt("@I_UPDATE_CNTR", _update_cntr, ComConst.DB_IN);
            db.DbPsetInt("@O_ERRCODE", _errcode, ComConst.DB_OUT);
            db.DbPsetString("@O_MSG", _errmsg, ComConst.DB_OUT);
            db.DbPsetInt("@O_SQLCODE", _sqlcode, ComConst.DB_OUT);
            db.DbPsetString("@O_SQLMSG", _dbmsg, ComConst.DB_OUT);
            db.DbPsetString("@O_PROC_NAME", _proc_name, ComConst.DB_OUT);

            db.DbBeginTrans();
            rtn = db.DbStored("SP_PROCESS_UPDATE");
            rtn = db.DbPgetInt("RET");
            if (rtn == ComConst.SUCCEED)
            {
                db.DbCommit();
            }
            else
            {
                _errcode   = db.DbPgetInt("@O_ERRCODE");
                _errmsg    = db.DbPgetString("@O_MSG");
                _sqlcode   = db.DbPgetInt("@O_SQLCODE");
                _dbmsg     = db.DbPgetString("@O_SQLMSG");
                _proc_name = db.DbPgetString("@O_PROC_NAME");
                _strErr    = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]";
                db.DbRollback();
                rtn = ComConst.FAILED;
            }

            return(rtn);
        }
Beispiel #10
0
        /// <summary>
        /// 仕入先の変更
        ///
        /// 使用画面:MstVendorMnt
        /// </summary>
        public int Update()
        {
            ComDB db  = new ComDB(_db_type);
            int   rtn = 0;

            db.DbParametersClear();

            db.DbPsetInt("RET", rtn, ComConst.DB_RTN);
            db.DbPsetString("@I_VENDOR_CD", _vendor_cd, ComConst.DB_IN);
            db.DbPsetInt("@I_BEG_EFF_DATE", _beg_eff_date, ComConst.DB_IN);
            db.DbPsetInt("@I_END_EFF_DATE", _end_eff_date, ComConst.DB_IN);
            db.DbPsetInt("@I_PO_STOP_FLAG", _po_stop_flag, ComConst.DB_IN);
            db.DbPsetString("@I_VENDOR_NAME", _vendor_name, ComConst.DB_IN);
            db.DbPsetString("@I_VENDOR_DESC", _vendor_desc, ComConst.DB_IN);
            db.DbPsetString("@I_VENDOR_NAME2", _vendor_name2, ComConst.DB_IN);
            db.DbPsetString("@I_VENDOR_DESC2", _vendor_desc2, ComConst.DB_IN);
            db.DbPsetString("@I_COUNTRY_CD", _country_cd, ComConst.DB_IN);
            db.DbPsetInt("@I_FOREIGN_FLAG", _foreign_flag, ComConst.DB_IN);
            db.DbPsetString("@I_CUR_CD", _cur_cd, ComConst.DB_IN);
            db.DbPsetString("@I_SUPPLY_WHS", _supply_whs, ComConst.DB_IN);
            db.DbPsetString("@I_BOND_SUPPLY_WHS", _bond_supply_whs, ComConst.DB_IN);
            db.DbPsetString("@I_REJ_WHS", _rej_whs, ComConst.DB_IN);            //ADD BY UBIQ-LIU 2010/11/23
            db.DbPsetInt("@I_PO_SLIPLESS_FLAG", _po_slipless_flag, ComConst.DB_IN);
            db.DbPsetString("@I_PO_SLIP_TYPE", _po_slip_type, ComConst.DB_IN);
            db.DbPsetInt("@I_FCST_FLAG", _fcst_flag, ComConst.DB_IN);
            db.DbPsetString("@I_PAY_TERMS", _pay_terms, ComConst.DB_IN);
            db.DbPsetString("@I_VENDOR_ATTN", _vendor_attn, ComConst.DB_IN);
            db.DbPsetString("@I_TELNO", _telno, ComConst.DB_IN);
            db.DbPsetString("@I_FAXNO", _faxno, ComConst.DB_IN);
            db.DbPsetString("@I_ZIP_CD", _zip_cd, ComConst.DB_IN);
            db.DbPsetString("@I_STATE", _state, ComConst.DB_IN);
            db.DbPsetString("@I_ADDRESS1", _address1, ComConst.DB_IN);
            db.DbPsetString("@I_ADDRESS2", _address2, ComConst.DB_IN);
            db.DbPsetString("@I_ADDRESS3", _address3, ComConst.DB_IN);
            db.DbPsetString("@I_ADDRESS4", _address4, ComConst.DB_IN);
            db.DbPsetString("@I_STATE2", _state2, ComConst.DB_IN);
            db.DbPsetString("@I_ADDRESS2_1", _address2_1, ComConst.DB_IN);
            db.DbPsetString("@I_ADDRESS2_2", _address2_2, ComConst.DB_IN);
            db.DbPsetString("@I_ADDRESS2_3", _address2_3, ComConst.DB_IN);
            db.DbPsetString("@I_ADDRESS2_4", _address2_4, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR1", _data_char1, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR2", _data_char2, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR3", _data_char3, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR4", _data_char4, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR5", _data_char5, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR6", _data_char6, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR7", _data_char7, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR8", _data_char8, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR9", _data_char9, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR10", _data_char10, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM1", _data_num1, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM2", _data_num2, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM3", _data_num3, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM4", _data_num4, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM5", _data_num5, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM6", _data_num6, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM7", _data_num7, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM8", _data_num8, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM9", _data_num9, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM10", _data_num10, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG1", _data_flag1, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG2", _data_flag2, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG3", _data_flag3, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG4", _data_flag4, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG5", _data_flag5, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG6", _data_flag6, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG7", _data_flag7, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG8", _data_flag8, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG9", _data_flag9, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG10", _data_flag10, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_PGM", _chg_pgm, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_USERID", _chg_user_id, ComConst.DB_IN);
            db.DbPsetInt("@I_LANG", _lang, ComConst.DB_IN);
            db.DbPsetInt("@I_UPDATE_CNTR", _update_cntr, ComConst.DB_IN);
            db.DbPsetInt("@O_ERRCODE", _errcode, ComConst.DB_OUT);
            db.DbPsetString("@O_MSG", _errmsg, ComConst.DB_OUT);
            db.DbPsetInt("@O_SQLCODE", _sqlcode, ComConst.DB_OUT);
            db.DbPsetString("@O_SQLMSG", _dbmsg, ComConst.DB_OUT);
            db.DbPsetString("@O_PROC_NAME", _proc_name, ComConst.DB_OUT);

            db.DbBeginTrans();
            rtn = db.DbStored("SP_VENDOR_UPDATE");
            rtn = db.DbPgetInt("RET");
            if (rtn == ComConst.SUCCEED)
            {
                db.DbCommit();
            }
            else
            {
                _errcode   = db.DbPgetInt("@O_ERRCODE");
                _errmsg    = db.DbPgetString("@O_MSG");
                _sqlcode   = db.DbPgetInt("@O_SQLCODE");
                _dbmsg     = db.DbPgetString("@O_SQLMSG");
                _proc_name = db.DbPgetString("@O_PROC_NAME");
                _strErr    = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]";
                db.DbRollback();
                rtn = ComConst.FAILED;
            }

            return(rtn);
        }
Beispiel #11
0
        /// <summary>
        /// 製造工順の追加
        ///
        /// 使用画面:MstRoutineMnt
        /// </summary>
        public int Insert()
        {
            ComDB db  = new ComDB(_db_type);
            int   rtn = 0;

            db.DbParametersClear();

            db.DbPsetInt("RET", rtn, ComConst.DB_RTN);
            db.DbPsetString("@I_ITEM_NO", _item_no, ComConst.DB_IN);
            db.DbPsetString("@I_WS_CD", _ws_cd, ComConst.DB_IN);
            db.DbPsetInt("@I_ROUTINE_SEQ", _routine_seq, ComConst.DB_IN);
            db.DbPsetInt("@I_BEG_EFF_DATE", _beg_eff_date, ComConst.DB_IN);
            db.DbPsetInt("@I_END_EFF_DATE", _end_eff_date, ComConst.DB_IN);
            db.DbPsetString("@I_PROCESS_CD", _process_cd, ComConst.DB_IN);
            db.DbPsetInt("@I_LT_TYPE", _lt_type, ComConst.DB_IN);
            db.DbPsetInt("@I_NEXT_PROC_CONT_FLAG", _next_proc_cont_flag, ComConst.DB_IN);
            db.DbPsetDouble("@I_SETUP_TIME", _setup_time, ComConst.DB_IN);
            db.DbPsetDouble("@I_AFTER_SETUP_TIME", _after_setup_time, ComConst.DB_IN);  // IMV3
            db.DbPsetDouble("@I_UNIT_TIME", _unit_time, ComConst.DB_IN);
            db.DbPsetDouble("@I_UNIT_QTY", _unit_qty, ComConst.DB_IN);
            db.DbPsetDouble("@I_TRANSFER_TIME", _transfer_time, ComConst.DB_IN);
            db.DbPsetDouble("@I_DAILY_PROD_QTY", _daily_prod_qty, ComConst.DB_IN);
            db.DbPsetDouble("@I_MFG_LT", _mfg_lt, ComConst.DB_IN);
            db.DbPsetDouble("@I_TRANSFER_LT", _transfer_lt, ComConst.DB_IN);
            db.DbPsetDouble("@I_YIELD", _yield, ComConst.DB_IN);
            db.DbPsetInt("@I_MH_ADOPT_FLAG", _mh_adopt_flag, ComConst.DB_IN);
            db.DbPsetString("@I_COMPL_UMSR", _compl_umsr, ComConst.DB_IN);
            db.DbPsetDouble("@I_PROCESS_CONV_RATIO", _process_conv_ratio, ComConst.DB_IN);
            db.DbPsetDouble("@I_ENG_CONV_RATIO", _eng_conv_ratio, ComConst.DB_IN);
            db.DbPsetInt("@I_COMPL_ROUND_UNIT", _compl_round_unit, ComConst.DB_IN);
            db.DbPsetInt("@I_SUPPLY_LT", _supply_lt, ComConst.DB_IN);
            db.DbPsetString("@I_RESOURCE_CD", _resource_cd, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR1", _data_char1, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR2", _data_char2, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR3", _data_char3, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR4", _data_char4, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR5", _data_char5, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR6", _data_char6, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR7", _data_char7, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR8", _data_char8, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR9", _data_char9, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR10", _data_char10, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM1", _data_num1, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM2", _data_num2, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM3", _data_num3, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM4", _data_num4, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM5", _data_num5, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM6", _data_num6, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM7", _data_num7, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM8", _data_num8, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM9", _data_num9, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM10", _data_num10, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG1", _data_flag1, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG2", _data_flag2, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG3", _data_flag3, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG4", _data_flag4, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG5", _data_flag5, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG6", _data_flag6, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG7", _data_flag7, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG8", _data_flag8, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG9", _data_flag9, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG10", _data_flag10, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_PGM", _chg_pgm, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_USERID", _chg_user_id, ComConst.DB_IN);
            db.DbPsetInt("@I_LANG", _lang, ComConst.DB_IN);
            db.DbPsetInt("@I_UPDATE_CNTR", _update_cntr, ComConst.DB_IN);
            db.DbPsetInt("@O_ERRCODE", _errcode, ComConst.DB_OUT);
            db.DbPsetString("@O_MSG", _errmsg, ComConst.DB_OUT);
            db.DbPsetInt("@O_SQLCODE", _sqlcode, ComConst.DB_OUT);
            db.DbPsetString("@O_SQLMSG", _dbmsg, ComConst.DB_OUT);
            db.DbPsetString("@O_PROC_NAME", _proc_name, ComConst.DB_OUT);

            db.DbBeginTrans();
            rtn = db.DbStored("SP_ROUTINE_INSERT");
            rtn = db.DbPgetInt("RET");
            if (rtn == ComConst.SUCCEED)
            {
                db.DbCommit();
            }
            else
            {
                _errcode   = db.DbPgetInt("@O_ERRCODE");
                _errmsg    = db.DbPgetString("@O_MSG");
                _sqlcode   = db.DbPgetInt("@O_SQLCODE");
                _dbmsg     = db.DbPgetString("@O_SQLMSG");
                _proc_name = db.DbPgetString("@O_PROC_NAME");
                _strErr    = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]";
                db.DbRollback();
                rtn = ComConst.FAILED;
            }

            return(rtn);
        }
Beispiel #12
0
        /// <summary>
        /// 仕入先の変更
        ///
        /// 使用画面:MstWhsMnt
        /// </summary>
        public int Update()
        {
            ComDB db  = new ComDB(_db_type);
            int   rtn = 0;

            db.DbParametersClear();

            db.DbPsetInt("RET", rtn, ComConst.DB_RTN);
            db.DbPsetString("@I_CUST_CD", _cust_cd, ComConst.DB_IN);
            db.DbPsetString("@I_CUST_SUB_CD", _cust_sub_cd, ComConst.DB_IN);
            db.DbPsetString("@I_CUST_NAME", _cust_name, ComConst.DB_IN);
            db.DbPsetString("@I_CUST_DESC", _cust_desc, ComConst.DB_IN);
            db.DbPsetString("@I_CUST_NAME2", _cust_name2, ComConst.DB_IN);
            db.DbPsetString("@I_CUST_DESC2", _cust_desc2, ComConst.DB_IN);
            db.DbPsetString("@I_COUNTRY_CD", _country_cd, ComConst.DB_IN);
            db.DbPsetInt("@I_FOREIGN_FLAG", _foreign_flag, ComConst.DB_IN);
            db.DbPsetString("@I_CUR_CD", _cur_cd, ComConst.DB_IN);
            db.DbPsetString("@I_SHIP_WHS", _ship_whs, ComConst.DB_IN);
            db.DbPsetInt("@I_TRANS_LT", _trans_lt, ComConst.DB_IN);
            db.DbPsetString("@I_SHIP_SLIP_TYPE", _ship_slip_type, ComConst.DB_IN);
            db.DbPsetString("@I_PAY_TERMS", _pay_terms, ComConst.DB_IN);
            db.DbPsetDouble("@I_EVAL_RATIO", _eval_ratio, ComConst.DB_IN);
            db.DbPsetString("@I_CUST_ATTN", _cust_attn, ComConst.DB_IN);
            db.DbPsetString("@I_TELNO", _telno, ComConst.DB_IN);
            db.DbPsetString("@I_FAXNO", _faxno, ComConst.DB_IN);
            db.DbPsetString("@I_ZIP_CD", _zip_cd, ComConst.DB_IN);
            db.DbPsetString("@I_STATE", _state, ComConst.DB_IN);
            db.DbPsetString("@I_ADDRESS1", _address1, ComConst.DB_IN);
            db.DbPsetString("@I_ADDRESS2", _address2, ComConst.DB_IN);
            db.DbPsetString("@I_ADDRESS3", _address3, ComConst.DB_IN);
            db.DbPsetString("@I_ADDRESS4", _address4, ComConst.DB_IN);
            db.DbPsetString("@I_STATE2", _state2, ComConst.DB_IN);
            db.DbPsetString("@I_ADDRESS2_1", _address2_1, ComConst.DB_IN);
            db.DbPsetString("@I_ADDRESS2_2", _address2_2, ComConst.DB_IN);
            db.DbPsetString("@I_ADDRESS2_3", _address2_3, ComConst.DB_IN);
            db.DbPsetString("@I_ADDRESS2_4", _address2_4, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR1", _data_char1, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR2", _data_char2, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR3", _data_char3, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR4", _data_char4, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR5", _data_char5, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR6", _data_char6, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR7", _data_char7, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR8", _data_char8, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR9", _data_char9, ComConst.DB_IN);
            db.DbPsetString("@I_DATA_CHAR10", _data_char10, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM1", _data_num1, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM2", _data_num2, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM3", _data_num3, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM4", _data_num4, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM5", _data_num5, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM6", _data_num6, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM7", _data_num7, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM8", _data_num8, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM9", _data_num9, ComConst.DB_IN);
            db.DbPsetDouble("@I_DATA_NUM10", _data_num10, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG1", _data_flag1, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG2", _data_flag2, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG3", _data_flag3, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG4", _data_flag4, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG5", _data_flag5, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG6", _data_flag6, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG7", _data_flag7, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG8", _data_flag8, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG9", _data_flag9, ComConst.DB_IN);
            db.DbPsetInt("@I_DATA_FLAG10", _data_flag10, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_PGM", _chg_pgm, ComConst.DB_IN);
            db.DbPsetString("@I_CHG_USERID", _chg_userid, ComConst.DB_IN);
            db.DbPsetInt("@I_LANG", _lang, ComConst.DB_IN);
            db.DbPsetInt("@I_UPDATE_CNTR", _update_cntr, ComConst.DB_IN);
            db.DbPsetInt("@O_ERRCODE", _errcode, ComConst.DB_OUT);
            db.DbPsetString("@O_MSG", _errmsg, ComConst.DB_OUT);
            db.DbPsetInt("@O_SQLCODE", _sqlcode, ComConst.DB_OUT);
            db.DbPsetString("@O_SQLMSG", _dbmsg, ComConst.DB_OUT);
            db.DbPsetString("@O_PROC_NAME", _proc_name, ComConst.DB_OUT);

            db.DbBeginTrans();
            rtn = db.DbStored("SP_CUSTOMER_UPDATE");
            rtn = db.DbPgetInt("RET");
            if (rtn == ComConst.SUCCEED)
            {
                db.DbCommit();
            }
            else
            {
                _errcode   = db.DbPgetInt("@O_ERRCODE");
                _errmsg    = db.DbPgetString("@O_MSG");
                _sqlcode   = db.DbPgetInt("@O_SQLCODE");
                _dbmsg     = db.DbPgetString("@O_SQLMSG");
                _proc_name = db.DbPgetString("@O_PROC_NAME");
                _strErr    = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]";
                db.DbRollback();
                rtn = ComConst.FAILED;
            }

            return(rtn);
        }