Exemplo n.º 1
0
        /// <summary>
        /// 仕入先の削除
        ///
        /// 使用画面:MstWhsMnt
        /// </summary>
        public int Delete()
        {
            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_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_DELETE");
            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);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 指定ユーザー・ロールの追加
        ///
        /// 使用画面:MstRoleMnt
        /// </summary>
        public int InsertUserRole()
        {
            ComDB         db     = new ComDB("", "COM");
            StringBuilder strSQL = new StringBuilder();
            int           rtn    = 0;

            //--- sql
            strSQL.Append("INSERT INTO USER_ROLE_MASTER ");
            strSQL.Append("(");
            strSQL.Append("USER_ID, ROLE, ");
            strSQL.Append("ENTRY_DATE, CHG_DATE, CHG_USER_ID,");
            strSQL.Append("UPDATE_CNTR");
            strSQL.Append(") VALUES (");
            strSQL.Append("@USER_ID, @ROLE,");
            strSQL.Append("@ENTRY_DATE, @CHG_DATE, @CHG_USER_ID, @UPDATE_CNTR)");

            db.DbParametersClear();

            db.DbPsetString("@USER_ID", _user_id);
            db.DbPsetString("@ROLE", _role);
            db.DbPsetDate("@ENTRY_DATE", DateTime.Now);
            db.DbPsetDate("@CHG_DATE", DateTime.Now);
            db.DbPsetString("@CHG_USER_ID", _chg_user_id);
            db.DbPsetInt("@UPDATE_CNTR", _update_cntr);

            db.DbBeginTrans();

            rtn = db.DbExecute(strSQL.ToString());
            if (rtn != ComConst.FAILED)
            {
                db.DbCommit();
            }
            else
            {
                _dbmsg  = db.expmsg;
                _strErr = db.strErr;
                db.DbRollback();
            }

            return(rtn);
        }
Exemplo n.º 3
0
        public int Delete()
        {
            ComDB         db     = new ComDB(_db_type);
            StringBuilder strSQL = new StringBuilder();
            int           rtn    = 0;

            //--- sql
            if (_db_type == "ORACLE")
            {
                strSQL.Append("DELETE FROM PLAN_PROD_MC_CKD_DETAIL ");
                strSQL.Append(" WHERE MC_CKD_NO = :MC_CKD_NO");

                db.DbParametersClear();
                db.DbPsetString("MC_CKD_NO", _mc_ckd_no);
            }
            else
            {
                strSQL.Append("DELETE FROM PLAN_PROD_MC_CKD_DETAIL ");
                strSQL.Append(" WHERE MC_CKD_NO = @MC_CKD_NO");

                db.DbParametersClear();
                db.DbPsetString("@MC_CKD_NO", _mc_ckd_no);
            }


            db.DbBeginTrans();

            rtn = db.DbExecute(strSQL.ToString());
            if (rtn != ComConst.FAILED)
            {
                db.DbCommit();
            }
            else
            {
                _dbmsg  = db.expmsg;
                _strErr = db.strErr;
                db.DbRollback();
            }

            return(rtn);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 仕様別段取条件マスタ登録
        ///
        /// 使用画面:MstSpecSetupMnt
        /// </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_RESOURCE_CD", _resource_cd, ComConst.DB_IN);
            db.DbPsetString("@I_SPEC_CD", _spec_no, ComConst.DB_IN);
            db.DbPsetString("@I_PREV_SPEC_CD", _prev_spec_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_SPEC_SETUP_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);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Calendarの通算稼働日更新
        /// 使用画面:MstCalendarMnt
        /// </summary>
        public int Work_Days_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.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_TTL_WORK_DAYS_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);
        }
Exemplo n.º 6
0
        /// <summary>
        /// 資源ダウン理由の変更
        ///
        /// 使用画面:MstDownReasonMnt
        /// </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_DOWN_REASON_CD", _down_reason_cd, ComConst.DB_IN);
            db.DbPsetString("@I_DOWN_REASON_DESC", _down_reason_desc, 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_DOWN_REASON_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);
        }
Exemplo n.º 7
0
        public int Disb_UnAlloc()
        {
            ComDB db  = new ComDB(_db_type);
            int   rtn = 0;

            db.DbParametersClear();

            db.DbPsetInt("RET", rtn, ComConst.DB_RTN);
            db.DbPsetString("@I_ORDER_NO", _order_no, 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_DISB_UNALLOC");
            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);
        }
Exemplo n.º 8
0
        /// <summary>
        /// 辞書の追加
        ///
        /// 使用画面:MstDicMnt
        /// </summary>
        public int Insert()
        {
            ComDB         db     = new ComDB(_db_type);
            StringBuilder strSQL = new StringBuilder();
            int           rtn    = 0;

            //--- sql
            if (_db_type == "ORACLE")
            {
                strSQL.Append("INSERT INTO DICTIONARY_MASTER ");
                strSQL.Append("(");
                strSQL.Append("STD_ITEM, ITEM_DESC1, ITEM_DESC2, ITEM_DESC3, ITEM_DESC4,");
                strSQL.Append("ENTRY_DATE, CHG_DATE, CHG_USER_ID, UPDATE_CNTR");
                strSQL.Append(") VALUES (");
                strSQL.Append(":STD_ITEM, :ITEM_DESC1, :ITEM_DESC2, :ITEM_DESC3, :ITEM_DESC4,");
                strSQL.Append(":ENTRY_DATE, :CHG_DATE, :CHG_USER_ID, :UPDATE_CNTR)");

                db.DbParametersClear();
                db.DbPsetString("STD_ITEM", _std_item);
                db.DbPsetString("ITEM_DESC1", _item_desc1);
                db.DbPsetString("ITEM_DESC2", _item_desc2);
                db.DbPsetString("ITEM_DESC3", _item_desc3);
                db.DbPsetString("ITEM_DESC4", _item_desc4);
                db.DbPsetDate("ENTRY_DATE", DateTime.Now);
                db.DbPsetDate("CHG_DATE", DateTime.Now);
                db.DbPsetString("CHG_USER_ID", _chg_user_id);
                db.DbPsetInt("UPDATE_CNTR", _update_cntr);
            }
            else
            {
                strSQL.Append("INSERT INTO DICTIONARY_MASTER ");
                strSQL.Append("(");
                strSQL.Append("STD_ITEM, ITEM_DESC1, ITEM_DESC2, ITEM_DESC3, ITEM_DESC4,");
                strSQL.Append("ENTRY_DATE, CHG_DATE, CHG_USER_ID, UPDATE_CNTR");
                strSQL.Append(") VALUES (");
                strSQL.Append("@STD_ITEM, @ITEM_DESC1, @ITEM_DESC2, @ITEM_DESC3, @ITEM_DESC4,");
                strSQL.Append("@ENTRY_DATE, @CHG_DATE, @CHG_USER_ID, @UPDATE_CNTR)");

                db.DbParametersClear();
                db.DbPsetString("@STD_ITEM", _std_item);
                db.DbPsetString("@ITEM_DESC1", _item_desc1);
                db.DbPsetString("@ITEM_DESC2", _item_desc2);
                db.DbPsetString("@ITEM_DESC3", _item_desc3);
                db.DbPsetString("@ITEM_DESC4", _item_desc4);
                db.DbPsetDate("@ENTRY_DATE", DateTime.Now);
                db.DbPsetDate("@CHG_DATE", DateTime.Now);
                db.DbPsetString("@CHG_USER_ID", _chg_user_id);
                db.DbPsetInt("@UPDATE_CNTR", _update_cntr);
            }

            db.DbBeginTrans();

            rtn = db.DbExecute(strSQL.ToString());
            if (rtn != ComConst.FAILED)
            {
                db.DbCommit();
            }
            else
            {
                _dbmsg  = db.expmsg;
                _strErr = db.strErr;
                db.DbRollback();
            }

            return(rtn);
        }
Exemplo n.º 9
0
        /// <summary>
        /// 辞書の変更
        ///
        /// 使用画面:MstDicMnt
        /// </summary>
        public int Update()
        {
            ComDB         db     = new ComDB(_db_type);
            StringBuilder strSQL = new StringBuilder();
            int           rtn    = 0;

            //--- sql
            if (_db_type == "ORACLE")
            {
                strSQL.Append("UPDATE DICTIONARY_MASTER ");
                strSQL.Append("SET ");
                strSQL.Append("ITEM_DESC1 = :ITEM_DESC1,");
                strSQL.Append("ITEM_DESC2 = :ITEM_DESC2,");
                strSQL.Append("ITEM_DESC3 = :ITEM_DESC3,");
                strSQL.Append("ITEM_DESC4 = :ITEM_DESC4,");
                strSQL.Append("CHG_DATE = :CHG_DATE,");
                strSQL.Append("CHG_USER_ID = :CHG_USER_ID,");
                strSQL.Append("UPDATE_CNTR = UPDATE_CNTR + 1");
                strSQL.Append(" WHERE STD_ITEM = :STD_ITEM");

                db.DbParametersClear();
                db.DbPsetString("ITEM_DESC1", _item_desc1);
                db.DbPsetString("ITEM_DESC2", _item_desc2);
                db.DbPsetString("ITEM_DESC3", _item_desc3);
                db.DbPsetString("ITEM_DESC4", _item_desc4);
                db.DbPsetDate("CHG_DATE", DateTime.Now);
                db.DbPsetString("CHG_USER_ID", _chg_user_id);
                db.DbPsetString("STD_ITEM", _std_item);
            }
            else
            {
                strSQL.Append("UPDATE DICTIONARY_MASTER ");
                strSQL.Append("SET ");
                strSQL.Append("ITEM_DESC1 = @ITEM_DESC1,");
                strSQL.Append("ITEM_DESC2 = @ITEM_DESC2,");
                strSQL.Append("ITEM_DESC3 = @ITEM_DESC3,");
                strSQL.Append("ITEM_DESC4 = @ITEM_DESC4,");
                strSQL.Append("CHG_DATE = @CHG_DATE,");
                strSQL.Append("CHG_USER_ID = @CHG_USER_ID,");
                strSQL.Append("UPDATE_CNTR = UPDATE_CNTR + 1");
                strSQL.Append(" WHERE STD_ITEM = @STD_ITEM");

                db.DbParametersClear();
                db.DbPsetString("@ITEM_DESC1", _item_desc1);
                db.DbPsetString("@ITEM_DESC2", _item_desc2);
                db.DbPsetString("@ITEM_DESC3", _item_desc3);
                db.DbPsetString("@ITEM_DESC4", _item_desc4);
                db.DbPsetDate("@CHG_DATE", DateTime.Now);
                db.DbPsetString("@CHG_USER_ID", _chg_user_id);
                db.DbPsetString("@STD_ITEM", _std_item);
            }

            db.DbBeginTrans();

            rtn = db.DbExecute(strSQL.ToString());
            if (rtn != ComConst.FAILED)
            {
                db.DbCommit();
            }
            else
            {
                _dbmsg  = db.expmsg;
                _strErr = db.strErr;
                db.DbRollback();
            }

            return(rtn);
        }
Exemplo n.º 10
0
        /// <summary>
        /// メッセージの変更
        /// </summary>
        public int Update()
        {
            ComDB         db     = new ComDB(_db_type);
            StringBuilder strSQL = new StringBuilder();
            int           rtn    = 0;

            //--- sql
            if (_db_type == "ORACLE")
            {
                strSQL.Append("UPDATE MESSAGE_MASTER ");
                strSQL.Append("SET ");
                strSQL.Append("MSG_DESC = :MSG_DESC,");
                strSQL.Append("RANK = :RANK,");
                strSQL.Append("CHG_DATE = :CHG_DATE,");
                strSQL.Append("CHG_USER_ID = :CHG_USER_ID,");
                strSQL.Append("UPDATE_CNTR = UPDATE_CNTR + 1");
                strSQL.Append(" WHERE MSG_CD = :MSG_CD");
                strSQL.Append("   AND LANG = :LANG");

                db.DbParametersClear();
                db.DbPsetString("MSG_DESC", _msg_desc);
                db.DbPsetString("RANK", _rank);
                db.DbPsetDate("CHG_DATE", DateTime.Now);
                db.DbPsetString("CHG_USER_ID", _chg_user_id);
                db.DbPsetString("MSG_CD", _msg_cd);
                db.DbPsetInt("LANG", _lang);
            }
            else
            {
                strSQL.Append("UPDATE MESSAGE_MASTER ");
                strSQL.Append("SET ");
                strSQL.Append("MSG_DESC = @MSG_DESC,");
                strSQL.Append("RANK = @RANK,");
                strSQL.Append("CHG_DATE = @CHG_DATE,");
                strSQL.Append("CHG_USERID = @CHG_USER_ID,");
                strSQL.Append("UPDATE_CNTR = UPDATE_CNTR + 1");
                strSQL.Append(" WHERE MSG_CD = @MSG_CD");
                strSQL.Append("   AND LANG = @LANG");

                db.DbParametersClear();
                db.DbPsetString("@MSG_DESC", _msg_desc);
                db.DbPsetString("@RANK", _rank);
                db.DbPsetDate("@CHG_DATE", DateTime.Now);
                db.DbPsetString("@CHG_USER_ID", _chg_user_id);
                db.DbPsetString("@MSG_CD", _msg_cd);
                db.DbPsetInt("@LANG", _lang);
            }

            db.DbBeginTrans();

            rtn = db.DbExecute(strSQL.ToString());
            if (rtn != ComConst.FAILED)
            {
                rtn = ComConst.SUCCEED;
                db.DbCommit();
            }
            else
            {
                _dbmsg  = db.expmsg;
                _strErr = db.strErr;
                db.DbRollback();
            }

            return(rtn);
        }
Exemplo n.º 11
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);
        }
Exemplo n.º 12
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);
        }
Exemplo n.º 13
0
        /// <summary>
        /// メッセージの追加
        /// </summary>
        public int Insert()
        {
            ComDB         db     = new ComDB(_db_type);
            StringBuilder strSQL = new StringBuilder();
            int           rtn    = 0;

            //--- sql
            if (_db_type == "ORACLE")
            {
                strSQL.Append("INSERT INTO MESSAGE_MASTER ");
                strSQL.Append("(");
                strSQL.Append("MSG_CD, LANG, MSG_DESC, RANK,");
                strSQL.Append("ENTRY_DATE, CHG_DATE, CHG_USER_ID, UPDATE_CNTR");
                strSQL.Append(") VALUES (");
                strSQL.Append(":MSG_CD, :LANG, :MSG_DESC, :RANK,");
                strSQL.Append(":ENTRY_DATE, :CHG_DATE, :CHG_USER_ID, :UPDATE_CNTR)");

                db.DbParametersClear();
                db.DbPsetString("MSG_CD", _msg_cd);
                db.DbPsetInt("LANG", _lang);
                db.DbPsetString("MSG_DESC", _msg_desc);
                db.DbPsetString("RANK", _rank);
                db.DbPsetDate("ENTRY_DATE", DateTime.Now);
                db.DbPsetDate("CHG_DATE", DateTime.Now);
                db.DbPsetString("CHG_USER_ID", _chg_user_id);
                db.DbPsetInt("UPDATE_CNTR", _update_cntr);
            }
            else
            {
                strSQL.Append("INSERT INTO MESSAGE_MASTER ");
                strSQL.Append("(");
                strSQL.Append("MSG_CD, LANG, MSG_DESC, RANK,");
                strSQL.Append("ENTRY_DATE, CHG_DATE, CHG_USER_ID, UPDATE_CNTR");
                strSQL.Append(") VALUES (");
                strSQL.Append("@MSG_CD, @LANG, @MSG_DESC, @RANK,");
                strSQL.Append("@ENTRY_DATE, @CHG_DATE, @CHG_USER_ID, @UPDATE_CNTR)");

                db.DbParametersClear();
                db.DbPsetString("@MSG_CD", _msg_cd);
                db.DbPsetInt("@LANG", _lang);
                db.DbPsetString("@MSG_DESC", _msg_desc);
                db.DbPsetString("@RANK", _rank);
                db.DbPsetDate("@ENTRY_DATE", DateTime.Now);
                db.DbPsetDate("@CHG_DATE", DateTime.Now);
                db.DbPsetString("@CHG_USER_ID", _chg_user_id);
                db.DbPsetInt("@UPDATE_CNTR", _update_cntr);
            }

            db.DbBeginTrans();

            rtn = db.DbExecute(strSQL.ToString());
            if (rtn != ComConst.FAILED)
            {
                db.DbCommit();
            }
            else
            {
                _dbmsg  = db.expmsg;
                _strErr = db.strErr;
                db.DbRollback();
            }

            return(rtn);
        }
Exemplo n.º 14
0
        /// <summary>
        /// お知らせ情報の変更
        ///
        /// 使用画面:MstInfoMnt
        /// </summary>
        public int Update()
        {
            ComDB         db     = new ComDB(_db_type, "COM");
            StringBuilder strSQL = new StringBuilder();
            int           rtn    = 0;

            //--- sql
            if (_db_type == "ORACLE")
            {
                strSQL.Append("UPDATE INFO_MASTER ");
                strSQL.Append("SET ");
                strSQL.Append("LANG = :LANG,");
                strSQL.Append("INFO_DATE = :INFO_DATE,");
                strSQL.Append("INFO_MSG = :INFO_MSG,");
                strSQL.Append("IMPORTANT_FLG = :IMPORTANT_FLG,");
                strSQL.Append("BEG_EFF_DATE = :BEG_EFF_DATE,");
                strSQL.Append("END_EFF_DATE = :END_EFF_DATE,");
                strSQL.Append("CHG_DATE = :CHG_DATE,");
                strSQL.Append("CHG_USER_ID = :CHG_USER_ID,");
                strSQL.Append("UPDATE_CNTR = UPDATE_CNTR + 1");
                //strSQL.Append(" WHERE COMPANY_CD = :COMPANY_CD");
                strSQL.Append("   WHERE REC_NO = :REC_NO");

                db.DbParametersClear();

                db.DbPsetInt("LANG", _lang);
                db.DbPsetInt("INFO_DATE", _info_date);
                db.DbPsetString("INFO_MSG", _info_msg);
                db.DbPsetInt("IMPORTANT_FLG", _important_flg);
                db.DbPsetInt("BEG_EFF_DATE", _beg_eff_date);
                db.DbPsetInt("END_EFF_DATE", _end_eff_date);
                db.DbPsetDate("CHG_DATE", DateTime.Now);
                db.DbPsetString("CHG_USER_ID", _chg_user_id);
                //db.DbPsetString("COMPANY_CD", _company_cd);
                db.DbPsetInt("REC_NO", _rec_no);
            }
            else
            {
                strSQL.Append("UPDATE INFO_MASTER ");
                strSQL.Append("SET ");
                strSQL.Append("LANG = @LANG,");
                strSQL.Append("INFO_DATE = @INFO_DATE,");
                strSQL.Append("INFO_MSG = @INFO_MSG,");
                strSQL.Append("IMPORTANT_FLG = @IMPORTANT_FLG,");
                strSQL.Append("BEG_EFF_DATE = @BEG_EFF_DATE,");
                strSQL.Append("END_EFF_DATE = @END_EFF_DATE,");
                strSQL.Append("CHG_DATE = @CHG_DATE,");
                strSQL.Append("CHG_USER_ID = @CHG_USER_ID,");
                strSQL.Append("UPDATE_CNTR = @UPDATE_CNTR + 1");
                //strSQL.Append(" WHERE COMPANY_CD = @COMPANY_CD");
                strSQL.Append("   WHERE REC_NO = @REC_NO");

                db.DbParametersClear();

                db.DbPsetInt("@LANG", _lang);
                db.DbPsetInt("@INFO_DATE", _info_date);
                db.DbPsetString("@INFO_MSG", _info_msg);
                db.DbPsetInt("@IMPORTANT_FLG", _important_flg);
                db.DbPsetInt("@BEG_EFF_DATE", _beg_eff_date);
                db.DbPsetInt("@END_EFF_DATE", _end_eff_date);
                db.DbPsetDate("@CHG_DATE", DateTime.Now);
                db.DbPsetString("@CHG_USER_ID", _chg_user_id);
                //db.DbPsetString("@COMPANY_CD", _company_cd);
                db.DbPsetInt("@REC_NO", _rec_no);
            }

            db.DbBeginTrans();

            rtn = db.DbExecute(strSQL.ToString());
            if (rtn != ComConst.FAILED)
            {
                db.DbCommit();
            }
            else
            {
                _dbmsg  = db.expmsg;
                _strErr = db.strErr;
                db.DbRollback();
            }

            return(rtn);
        }
Exemplo n.º 15
0
        /// <summary>
        /// 指定目录下所有[CSV]类型文件导入DataTable
        /// XML方式一次性导入
        /// </summary>
        /// <returns></returns>
        public int ImpFilesToDataTableBulk()
        {
            int        rtn = 0;
            ComLibrary com = new ComLibrary();

            try
            {
                string   strFileNm = "";
                string[] strWk     = _file_path.Split('\\');
                strFileNm = strWk[strWk.Length - 1];
                string   strFileNmA = "";
                string[] strWkA     = strFileNm.Split('.');
                strFileNmA = strWkA[0];

                bool isEmpty = true;
                int  LineCnt = 0;

                string IfType = _if_type;//連携データ区分

                StringBuilder strXML = new StringBuilder();
                strXML.Append("<IFRows>");

                Boolean err_flag = false;
                //if (_save_path != "")
                //{
                //    if (_save_path.EndsWith("\\"))
                //        _save_file = _save_path + DateTime.Now.ToString("yyyyMMdd_HHmmss") + "_" + strFileNm;
                //    else
                //        _save_file = _save_path + "\\" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + "_" + strFileNm;

                //}
                // LOG FILE 名 2014.09.22
                //if (_log_path != "")
                //{
                //    if (_log_path.EndsWith("\\"))
                //        _log_file = _log_path + DateTime.Now.ToString("yyyyMMdd_HHmmss") + "_" + strFileNm;
                //    else
                //        _log_file = _log_path + "\\" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + "_" + strFileNm;
                //}

                // FILE COPY 2014.09.22
                //if (_save_path != "")
                //{
                //    File.Copy(_file_path, _save_file, true);
                //}

                Encoding FileEncoding = GetFileEncoding(_file_path);

                // 最初にメモリに読むこむ
                int wLineCnt = 0;

                StreamReader sr = new StreamReader(_file_path, FileEncoding);
                while (sr.Peek() >= 0)
                {
                    wLineCnt++;
                    string        strRecord = sr.ReadLine();
                    FileInfoClass fi        = new FileInfoClass();
                    fi.LineCnt = wLineCnt;
                    fi.Data    = strRecord;
                    lstFileInfo.Add(fi);
                }
                sr.Dispose();
                sr.Close();

                TextFieldParser parser = new TextFieldParser(_file_path, FileEncoding);
                using (parser)
                {
                    parser.TextFieldType = FieldType.Delimited;
                    parser.SetDelimiters(","); // 区切り文字はコンマ

                    while (!parser.EndOfData)
                    {
                        err_flag = false;
                        LineCnt++;
                        isEmpty = false;
                        string[] strRecord = parser.ReadFields(); // 1行読み込み 2014.09.22

                        string aRecord = "";
                        for (int p = 0; p < strRecord.Length; p++)
                        {
                            if (p > 0)
                            {
                                aRecord += "|";
                            }
                            aRecord += strRecord[p];
                        }
                        if (LineCnt <= lstFileInfo.Count)
                        {
                            ((FileInfoClass)lstFileInfo[LineCnt - 1]).CnvData = aRecord;
                        }

                        //各項目属性チェック
                        //年月, 数量
                        //if (!com.IsNumeric(strRecord[2].Replace("/", "")) || !com.IsNumeric(strRecord[3]))
                        //{
                        //    err_flag = true;

                        //    // 2014.10.10
                        //    if (LineCnt <= lstFileInfo.Count)
                        //    {
                        //        ((FileInfoClass)lstFileInfo[LineCnt - 1]).ErrFlag = 1;
                        //        ((FileInfoClass)lstFileInfo[LineCnt - 1]).ErrMsg = "数値エラー。";
                        //    }
                        //}

                        //数据各项值取得
                        IF_PROD_PLAN ifpl = SetRecordValues(IfType, LineCnt, strRecord, FileEncoding);


                        //if (ifpl.ITEM_NO.ToString().Length > 30
                        //|| ifpl.ITEM_DESC.ToString().Length > 50
                        //|| ifpl.PLAN_YM.ToString().Length > 6
                        //|| com.StringToDouble(ifpl.ORDER_QTY.ToString()) > 1000000000)
                        //{
                        //    err_flag = true;

                        //    if (LineCnt <= lstFileInfo.Count)
                        //    {
                        //        ((FileInfoClass)lstFileInfo[LineCnt - 1]).ErrFlag = 1;
                        //        ((FileInfoClass)lstFileInfo[LineCnt - 1]).ErrMsg += "桁数エラー。";
                        //    }
                        //}


                        if (err_flag)   // 2014.10.10
                        {
                            //_len_err_cnt++;

                            ////IF 取込データログに登録
                            //Poif poif = new Poif(_chg_user_id, _lang);
                            //Message msg = new Message(_chg_user_id, _lang);

                            //poif.if_date = ifpl.IF_DATE;
                            //poif.if_hms = ifpl.IF_HMS;
                            //poif.if_type = ifpl.IF_TYPE;
                            //poif.if_type_name = _if_type_name;
                            //poif.if_data_seq = ifpl.IF_DATA_SEQ;
                            //poif.if_data = aRecord;
                            //poif.if_data_err = msg.GetMessage("COLUMN_LENGTH_FORMAT_ERR");
                            //poif.if_data_flag = 2;
                            //poif.chg_pgm = _chg_pgm;
                            //poif.chg_user_id = _chg_user_id;
                            //poif.lang = _lang;
                            //poif.errcode = _errcode;
                            //poif.errmsg = _errmsg;
                            //poif.sqlcode = _sqlcode;
                            //poif.dbmsg = _dbmsg;

                            //rtn = poif.Ins_IF_IN_LOG();
                            //if (rtn == ComConst.FAILED)
                            //{
                            //    goto RESULT;
                            //}
                        }

                        if (!err_flag)  // 2014.09.22
                        {
                            //XML格式作成
                            strXML.Append("<IFRow ");
                            //strXML.Append(" IF_DATE=\"" + ifpl.IF_DATE.ToString() + "\"");
                            //strXML.Append(" IF_HMS=\"" + ifpl.IF_HMS.ToString() + "\"");
                            strXML.Append(" IF_TYPE=\"" + ifpl.IF_TYPE + "\"");
                            strXML.Append(" IF_DATA_SEQ=\"" + ifpl.IF_DATA_SEQ.ToString() + "\"");
                            strXML.Append(" IF_PLAN_NO=\"" + ifpl.IF_PLAN_NO + "\"");
                            strXML.Append(" ITEM_NO=\"" + ifpl.ITEM_NO + "\"");
                            //strXML.Append(" ITEM_DESC=\"" + com.XMLString(ifpl.ITEM_DESC) + "\"");
                            //strXML.Append(" WS_CD=\"" + ifpl.WS_CD + "\"");
                            //strXML.Append(" PLAN_YM=\"" + ifpl.PLAN_YM.ToString() + "\"");
                            //strXML.Append(" ORDER_QTY=\"" + ifpl.ORDER_QTY.ToString() + "\"");
                            //strXML.Append(" IF_DATA_FLAG=\"" + ifpl.IF_DATA_FLAG.ToString() + "\"");
                            //strXML.Append(" CHG_PGM=\"" + _chg_pgm + "\"");
                            strXML.Append(" CHG_USER_ID=\"" + _chg_user_id + "\"");
                            strXML.Append(" />");
                        }
                    }
                }
                strXML.Append("</IFRows>");

                //_file_line_cnt = LineCnt;

                if (isEmpty)
                {
                    Message msg = new Message(_chg_user_id, _lang);
                    _strErr = msg.GetMessage("FILE_NOT_EXIST_ERR");
                    rtn     = ComConst.CHECK_ERROR;
                    goto RESULT;
                }
                else
                {
                    // [IF初期取込生産計画]の一括登録
                    #region : [IF初期取込生産計画]の一括登録
                    ComDB db = new ComDB(_db_type);
                    db.DbParametersClear();

                    db.DbPsetInt("rtn", rtn, ComConst.DB_RTN);
                    db.DbPsetXml("@I_XML", strXML.ToString(), strXML.ToString().Length, 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_IF_PROD_PLAN_BULK_IMP");//一括登録
                    if (rtn == ComConst.SUCCEED)
                    {
                        db.DbCommit();
                    }
                    else
                    {
                        db.DbRollback();
                        rtn = db.DbPgetInt("rtn");
                        if (rtn > 0)
                        {
                            _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 + ")]";
                        }
                        else
                        {
                            _strErr = db.strErr;
                        }
                        rtn = ComConst.FAILED;
                    }
                    #endregion
                }
                //File.Delete(_file_path);
            }
            catch (Exception ex)
            {
                _strErr = ex.ToString();
                rtn     = ComConst.FAILED;
            }

RESULT:
            return(rtn);
        }
Exemplo n.º 16
0
        /// <summary>
        /// 画面ラベルの追加
        /// </summary>
        public int InsertScreenLabel()
        {
            ComDB         db     = new ComDB(_db_type);
            StringBuilder strSQL = new StringBuilder();
            int           rtn    = 0;

            //--- sql
            if (_db_type == "ORACLE")
            {
                strSQL.Append("INSERT INTO SCREEN_LABEL_MASTER ");
                strSQL.Append("(");
                strSQL.Append("SCREEN_ID, CONTROL_ID, STD_ITEM, ");
                strSQL.Append("ENTRY_DATE, CHG_DATE, CHG_USER_ID,");
                strSQL.Append("UPDATE_CNTR");
                strSQL.Append(") VALUES (");
                strSQL.Append(":SCREEN_ID, :CONTROL_ID, :STD_ITEM,");
                strSQL.Append(":ENTRY_DATE, :CHG_DATE, :CHG_USER_ID, :UPDATE_CNTR)");

                db.DbParametersClear();
                db.DbPsetString("SCREEN_ID", _screen_id);
                db.DbPsetString("CONTROL_ID", _control_id);
                db.DbPsetString("STD_ITEM", _std_item);
                db.DbPsetDate("ENTRY_DATE", DateTime.Now);
                db.DbPsetDate("CHG_DATE", DateTime.Now);
                db.DbPsetString("CHG_USER_ID", _chg_user_id);
                db.DbPsetInt("UPDATE_CNTR", _update_cntr);
            }
            else
            {
                strSQL.Append("INSERT INTO SCREEN_LABEL_MASTER ");
                strSQL.Append("(");
                strSQL.Append("SCREEN_ID, CONTROL_ID, STD_ITEM, ");
                strSQL.Append("ENTRY_DATE, CHG_DATE, CHG_USER_ID,");
                strSQL.Append("UPDATE_CNTR");
                strSQL.Append(") VALUES (");
                strSQL.Append("@SCREEN_ID, @CONTROL_ID, @STD_ITEM,");
                strSQL.Append("@ENTRY_DATE, @CHG_DATE, @CHG_USER_ID, @UPDATE_CNTR)");

                db.DbParametersClear();
                db.DbPsetString("@SCREEN_ID", _screen_id);
                db.DbPsetString("@CONTROL_ID", _control_id);
                db.DbPsetString("@STD_ITEM", _std_item);
                db.DbPsetDate("@ENTRY_DATE", DateTime.Now);
                db.DbPsetDate("@CHG_DATE", DateTime.Now);
                db.DbPsetString("@CHG_USER_ID", _chg_user_id);
                db.DbPsetInt("@UPDATE_CNTR", _update_cntr);
            }

            db.DbBeginTrans();

            rtn = db.DbExecute(strSQL.ToString());
            if (rtn != ComConst.FAILED)
            {
                db.DbCommit();
            }
            else
            {
                _dbmsg  = db.expmsg;
                _strErr = db.strErr;
                db.DbRollback();
            }

            return(rtn);
        }
Exemplo n.º 17
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);
        }
Exemplo n.º 18
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);
        }
Exemplo n.º 19
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);
        }
Exemplo n.º 20
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);
        }
Exemplo n.º 21
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);
        }
Exemplo n.º 22
0
        /// <summary>
        /// お知らせ情報の追加
        ///
        /// 使用画面:MstInfoMnt
        /// </summary>
        public int Insert()
        {
            ComDB         db     = new ComDB(_db_type, "COM");
            StringBuilder strSQL = new StringBuilder();
            int           rtn    = 0;

            // 最大のREC_NOを得る
            strSQL.Append("SELECT ");

            if (_db_type == "ORACLE")
            {
                strSQL.Append("NVL(MAX(REC_NO),0) ");
            }
            else
            {
                strSQL.Append("ISNULL(MAX(REC_NO),0) ");
            }

            strSQL.Append(" AS REC_NO");

            strSQL.Append(" FROM INFO_MASTER ");

            //if (_db_type == "ORACLE")
            //{
            //    strSQL.Append(" WHERE COMPANY_CD = :COMPANY_CD");

            //    db.DbParametersClear();
            //    db.DbPsetString("COMPANY_CD", _company_cd);
            //}
            //else
            //{
            //    strSQL.Append(" WHERE COMPANY_CD = @COMPANY_CD");

            //    db.DbParametersClear();
            //    db.DbPsetString("@COMPANY_CD", _company_cd);
            //}


            rtn = db.DbExecuteReader(strSQL.ToString());
            if (rtn == ComConst.FAILED)
            {
                _rec_no = 1;
            }
            else
            {
                try
                {
                    _rec_no = int.Parse(db.Row("REC_NO"));
                }
                catch
                {
                    _rec_no = 0;
                }

                _rec_no += 1;
            }

            db.DbCloseReader();

            // Insert
            strSQL = new StringBuilder();
            if (_db_type == "ORACLE")
            {
                strSQL.Append("INSERT INTO INFO_MASTER ");
                strSQL.Append("(");
                //strSQL.Append("COMPANY_CD, REC_NO, LANG, INFO_DATE, INFO_MSG,");
                strSQL.Append("REC_NO, LANG, INFO_DATE, INFO_MSG,");
                strSQL.Append("IMPORTANT_FLG, BEG_EFF_DATE, END_EFF_DATE,");
                strSQL.Append("ENTRY_DATE, CHG_DATE, CHG_USER_ID, UPDATE_CNTR");
                strSQL.Append(") VALUES (");
                //strSQL.Append(":COMPANY_CD, :REC_NO, :LANG, :INFO_DATE, :INFO_MSG,");
                strSQL.Append(":REC_NO, :LANG, :INFO_DATE, :INFO_MSG,");
                strSQL.Append(":IMPORTANT_FLG, :BEG_EFF_DATE, :END_EFF_DATE,");
                strSQL.Append(":ENTRY_DATE, :CHG_DATE, :CHG_USER_ID, :UPDATE_CNTR)");

                db.DbParametersClear();

                //db.DbPsetString("COMPANY_CD", _company_cd);
                db.DbPsetInt("REC_NO", _rec_no);
                db.DbPsetInt("LANG", _lang);
                db.DbPsetInt("INFO_DATE", _info_date);
                db.DbPsetString("INFO_MSG", _info_msg);
                db.DbPsetInt("IMPORTANT_FLG", _important_flg);
                db.DbPsetInt("BEG_EFF_DATE", _beg_eff_date);
                db.DbPsetInt("END_EFF_DATE", _end_eff_date);
                db.DbPsetDate("ENTRY_DATE", DateTime.Now);
                db.DbPsetDate("CHG_DATE", DateTime.Now);
                db.DbPsetString("CHG_USER_ID", _chg_user_id);
                db.DbPsetInt("UPDATE_CNTR", _update_cntr);
            }
            else
            {
                strSQL.Append("INSERT INTO INFO_MASTER ");
                strSQL.Append("(");
                //strSQL.Append("COMPANY_CD, REC_NO, LANG, INFO_DATE, INFO_MSG,");
                strSQL.Append("REC_NO, LANG, INFO_DATE, INFO_MSG,");
                strSQL.Append("IMPORTANT_FLG, BEG_EFF_DATE, END_EFF_DATE,");
                strSQL.Append("ENTRY_DATE, CHG_DATE, CHG_USER_ID, UPDATE_CNTR");
                strSQL.Append(") VALUES (");
                //strSQL.Append("@COMPANY_CD, @REC_NO, @LANG, @INFO_DATE, @INFO_MSG,");
                strSQL.Append("@REC_NO, @LANG, @INFO_DATE, @INFO_MSG,");
                strSQL.Append("@IMPORTANT_FLG, @BEG_EFF_DATE, @END_EFF_DATE,");
                strSQL.Append("@ENTRY_DATE, @CHG_DATE, @CHG_USER_ID, @UPDATE_CNTR)");

                db.DbParametersClear();

                //db.DbPsetString("@COMPANY_CD", _company_cd);
                db.DbPsetInt("@REC_NO", _rec_no);
                db.DbPsetInt("@LANG", _lang);
                db.DbPsetInt("@INFO_DATE", _info_date);
                db.DbPsetString("@INFO_MSG", _info_msg);
                db.DbPsetInt("@IMPORTANT_FLG", _important_flg);
                db.DbPsetInt("@BEG_EFF_DATE", _beg_eff_date);
                db.DbPsetInt("@END_EFF_DATE", _end_eff_date);
                db.DbPsetDate("@ENTRY_DATE", DateTime.Now);
                db.DbPsetDate("@CHG_DATE", DateTime.Now);
                db.DbPsetString("@CHG_USER_ID", _chg_user_id);
                db.DbPsetInt("@UPDATE_CNTR", _update_cntr);
            }


            db.DbBeginTrans();

            rtn = db.DbExecute(strSQL.ToString());
            if (rtn != ComConst.FAILED)
            {
                db.DbCommit();
            }
            else
            {
                _dbmsg  = db.expmsg;
                _strErr = db.strErr;
                db.DbRollback();
            }

            return(rtn);
        }