예제 #1
0
        /// <summary>
        /// 指定ユーザー・ロールの追加
        ///
        /// 使用クラス:MstUserMnt→User.Insert
        /// </summary>
        public int InsertUserRole(ComDB db)
        {
            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);

            rtn = db.DbExecute(strSQL.ToString());
            if (rtn == ComConst.FAILED)
            {
                _dbmsg  = db.expmsg;
                _strErr = db.strErr;
                db.DbRollback();
            }
            return(rtn);
        }
예제 #2
0
        /// <summary>
        /// 画面ラベルの変更
        /// </summary>
        public int UpdateScreenLabel()
        {
            ComDB         db     = new ComDB(_db_type);
            StringBuilder strSQL = new StringBuilder();
            int           rtn    = 0;

            //--- sql
            if (_db_type == "ORACLE")
            {
                strSQL.Append("UPDATE SCREEN_LABEL_MASTER ");
                strSQL.Append("SET ");
                strSQL.Append("STD_ITEM = :STD_ITEM,");
                strSQL.Append("CHG_DATE = :CHG_DATE,");
                strSQL.Append("CHG_USER_ID = :CHG_USER_ID,");
                strSQL.Append("UPDATE_CNTR = UPDATE_CNTR + 1");
                strSQL.Append(" WHERE SCREEN_ID = :SCREEN_ID");
                strSQL.Append("   AND CONTROL_ID = :CONTROL_ID");

                db.DbParametersClear();
                db.DbPsetString("STD_ITEM", _std_item);
                db.DbPsetDate("CHG_DATE", DateTime.Now);
                db.DbPsetString("CHG_USER_ID", _chg_user_id);
                db.DbPsetString("SCREEN_ID", _screen_id);
                db.DbPsetString("CONTROL_ID", _control_id);
            }
            else
            {
                strSQL.Append("UPDATE SCREEN_LABEL_MASTER ");
                strSQL.Append("SET ");
                strSQL.Append("STD_ITEM = @STD_ITEM,");
                strSQL.Append("CHG_DATE = @CHG_DATE,");
                strSQL.Append("CHG_USER_ID = @CHG_USER_ID,");
                strSQL.Append("UPDATE_CNTR = UPDATE_CNTR + 1");
                strSQL.Append(" WHERE SCREEN_ID = @SCREEN_ID");
                strSQL.Append("   AND CONTROL_ID = @CONTROL_ID");

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

            db.DbBeginTrans();

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

            return(rtn);
        }
예제 #3
0
        /// <summary>
        /// 指定ユーザー・ロールの削除
        ///
        /// 使用画面:MstRoleMnt
        /// </summary>
        public int DeleteUserRole()
        {
            ComDB         db     = new ComDB("", "COM");
            StringBuilder strSQL = new StringBuilder();
            int           rtn    = 0;

            //--- sql
            strSQL.Append("DELETE FROM USER_ROLE_MASTER ");
            strSQL.Append(" WHERE USER_ID = @USER_ID");
            strSQL.Append("   AND ROLE = @ROLE");

            db.DbParametersClear();

            db.DbPsetString("@USER_ID", _user_id);
            db.DbPsetString("@ROLE", _role);

            db.DbBeginTrans();

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

            return(rtn);
        }
예제 #4
0
        /// <summary>
        /// ロールの追加
        ///
        /// 使用画面:MstRoleMnt
        /// </summary>
        public int Insert()
        {
            ComDB         db     = new ComDB("", "COM");
            StringBuilder strSQL = new StringBuilder();
            int           rtn    = 0;

            //--- sql
            strSQL.Append("INSERT INTO ROLE_MASTER ");
            strSQL.Append("(");
            strSQL.Append("ROLE, ROLE_DESC1, ROLE_DESC2, ROLE_DESC3,");
            strSQL.Append("ROLE_DESC4,");
            strSQL.Append("ENTRY_DATE, CHG_DATE, CHG_USER_ID,");
            strSQL.Append("UPDATE_CNTR");
            strSQL.Append(") VALUES (");
            strSQL.Append("@ROLE, @ROLE_DESC1, @ROLE_DESC2, @ROLE_DESC3,");
            strSQL.Append("@ROLE_DESC4,");
            strSQL.Append("@ENTRY_DATE, @CHG_DATE, @CHG_USER_ID, @UPDATE_CNTR)");

            db.DbParametersClear();

            db.DbPsetString("@ROLE", _role);
            db.DbPsetString("@ROLE_DESC1", _role_desc1);
            db.DbPsetString("@ROLE_DESC2", _role_desc2);
            db.DbPsetString("@ROLE_DESC3", _role_desc3);
            db.DbPsetString("@ROLE_DESC4", _role_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);
        }
예제 #5
0
        /// <summary>
        /// ロールの変更
        ///
        /// 使用画面:MstRoleMnt
        /// </summary>
        public int Update()
        {
            ComDB         db     = new ComDB("", "COM");
            StringBuilder strSQL = new StringBuilder();
            int           rtn    = 0;

            //--- sql
            strSQL.Append("UPDATE USER_ROLE_MASTER ");
            strSQL.Append("SET ");
            strSQL.Append("USER_GROUP_CODE = @ROLE,");
            strSQL.Append("USER_GROUP_NAME = @ROLE_DESC,");
            strSQL.Append("GROUP_ACTIVE = @DEL_DISABLE_FLAG,");
            strSQL.Append("MANAGEMENT_LEVEL = @MGMT_LEVEL,");
            strSQL.Append("DEPT_NO = @DEPT_NO,");
            strSQL.Append("PROCESS_NO = @PROCESS_NO,");
            strSQL.Append("UPDATE_DATE = @CHG_DATE,");
            strSQL.Append("USER_UPDATE = @CHG_USER_ID,");
            strSQL.Append(" WHERE ROLE = @ROLE");

            db.DbParametersClear();

            db.DbPsetString("@ROLE", _role);
            db.DbPsetString("@ROLE_DESC", _role_desc);
            db.DbPsetInt("@DEL_DISABLE_FLAG", _del_disable_flag);
            db.DbPsetString("@MGMT_LEVEL", _mgmt_level);
            db.DbPsetString("@DEPT_NO", _dept_no);
            db.DbPsetString("@PROCESS_NO", _process_no);
            db.DbPsetDate("@CHG_DATE", DateTime.Now);
            db.DbPsetString("@CHG_USER_ID", _chg_user_id);

            db.DbBeginTrans();

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

            return(rtn);
        }
예제 #6
0
        /// <summary>
        /// お知らせ情報の削除
        ///
        /// 使用画面:MstInfoMnt
        /// </summary>
        public int Delete()
        {
            ComDB         db     = new ComDB(_db_type, "COM");
            StringBuilder strSQL = new StringBuilder();
            int           rtn    = 0;

            //--- sql
            if (_db_type == "ORACLE")
            {
                strSQL.Append("DELETE FROM INFO_MASTER ");
                //strSQL.Append(" WHERE COMPANY_CD = :COMPANY_CD");
                strSQL.Append("   WHERE REC_NO = :REC_NO");

                db.DbParametersClear();

                //db.DbPsetString("COMPANY_CD", _company_cd);
                db.DbPsetInt("REC_NO", _rec_no);
            }
            else
            {
                strSQL.Append("DELETE FROM INFO_MASTER ");
                //strSQL.Append(" WHERE COMPANY_CD = @COMPANY_CD");
                strSQL.Append("   WHERE REC_NO = @REC_NO");

                db.DbParametersClear();

                //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);
        }
예제 #7
0
        /// <summary>
        /// ロールの追加
        ///
        /// 使用画面:MstRoleMnt
        /// </summary>
        public int Insert()
        {
            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_GROUP_CODE, USER_GROUP_NAME, GROUP_ACTIVE, MANAGEMENT_LEVEL,");
            strSQL.Append("DEPT_NO, PROCESS_NO");
            strSQL.Append("ENTRY_DATE, UPDATE_DATE, USER_CREATE");
            strSQL.Append(") VALUES (");
            strSQL.Append("@ROLE, @ROLE_DESC, @DEL_DISABLE_FLAG, @MGMT_LEVEL,");
            strSQL.Append("@DEPT_NO, @PROCESS_NO");
            strSQL.Append("@ENTRY_DATE, @CHG_DATE, @CHG_USER_ID)");

            db.DbParametersClear();

            db.DbPsetString("@ROLE", _role);
            db.DbPsetString("@ROLE_DESC", _role_desc);
            db.DbPsetInt("@DEL_DISABLE_FLAG", _del_disable_flag);
            db.DbPsetInt("@MGMT_LEVEL", int.Parse(_mgmt_level));
            db.DbPsetInt("@DEPT_NO", int.Parse(_dept_no));
            db.DbPsetInt("@PROCESS_NO", int.Parse(_process_no));
            db.DbPsetDate("@ENTRY_DATE", DateTime.Now);
            db.DbPsetDate("@CHG_DATE", DateTime.Now);
            db.DbPsetString("@CHG_USER_ID", _chg_user_id);

            db.DbBeginTrans();

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

            return(rtn);
        }
예제 #8
0
        /// <summary>
        /// メッセージの削除
        /// </summary>
        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 MESSAGE_MASTER ");
                strSQL.Append(" WHERE MSG_CD = :MSG_CD");
                strSQL.Append("   AND LANG = :LANG");

                db.DbParametersClear();
                db.DbPsetString("MSG_CD", _msg_cd);
                db.DbPsetInt("LANG", _lang);
            }
            else
            {
                strSQL.Append("DELETE FROM MESSAGE_MASTER ");
                strSQL.Append(" WHERE MSG_CD = @MSG_CD");
                strSQL.Append("   AND LANG = @LANG");

                db.DbParametersClear();
                db.DbPsetString("@MSG_CD", _msg_cd);
                db.DbPsetInt("@LANG", _lang);
            }

            db.DbBeginTrans();

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

            return(rtn);
        }
예제 #9
0
        /// <summary>
        /// ロールの変更
        ///
        /// 使用画面:MstRoleMnt
        /// </summary>
        public int Update()
        {
            ComDB         db     = new ComDB("", "COM");
            StringBuilder strSQL = new StringBuilder();
            int           rtn    = 0;

            //--- sql
            strSQL.Append("UPDATE ROLE_MASTER ");
            strSQL.Append("SET ");
            strSQL.Append("ROLE_DESC1 = @ROLE_DESC1,");
            strSQL.Append("ROLE_DESC2 = @ROLE_DESC2,");
            strSQL.Append("ROLE_DESC3 = @ROLE_DESC3,");
            strSQL.Append("ROLE_DESC4 = @ROLE_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 ROLE = @ROLE");

            db.DbParametersClear();

            db.DbPsetString("@ROLE_DESC1", _role_desc1);
            db.DbPsetString("@ROLE_DESC2", _role_desc2);
            db.DbPsetString("@ROLE_DESC3", _role_desc3);
            db.DbPsetString("@ROLE_DESC4", _role_desc4);
            db.DbPsetDate("@CHG_DATE", DateTime.Now);
            db.DbPsetString("@CHG_USER_ID", _chg_user_id);
            db.DbPsetString("@ROLE", _role);

            db.DbBeginTrans();

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

            return(rtn);
        }
예제 #10
0
        /// <summary>
        /// 画面ラベルの削除
        /// </summary>
        public int DeleteScreenLabel()
        {
            ComDB         db     = new ComDB(_db_type);
            StringBuilder strSQL = new StringBuilder();
            int           rtn    = 0;

            //--- sql
            if (_db_type == "ORACLE")
            {
                strSQL.Append("DELETE FROM SCREEN_LABEL_MASTER ");
                strSQL.Append(" WHERE SCREEN_ID = :SCREEN_ID");
                strSQL.Append("   AND CONTROL_ID = :CONTROL_ID");

                db.DbParametersClear();
                db.DbPsetString("SCREEN_ID", _screen_id);
                db.DbPsetString("CONTROL_ID", _control_id);
            }
            else
            {
                strSQL.Append("DELETE FROM SCREEN_LABEL_MASTER ");
                strSQL.Append(" WHERE SCREEN_ID = @SCREEN_ID");
                strSQL.Append("   AND CONTROL_ID = @CONTROL_ID");

                db.DbParametersClear();
                db.DbPsetString("@SCREEN_ID", _screen_id);
                db.DbPsetString("@CONTROL_ID", _control_id);
            }

            db.DbBeginTrans();

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

            return(rtn);
        }
예제 #11
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_FE_CKD_DETAIL ");
                strSQL.Append(" WHERE FE_CKD_NO = :FE_CKD_NO");

                db.DbParametersClear();
                db.DbPsetString("FE_CKD_NO", _fe_ckd_no);
            }
            else
            {
                strSQL.Append("DELETE FROM PLAN_PROD_FE_CKD_DETAIL ");
                strSQL.Append(" WHERE FE_CKD_NO = @FE_CKD_NO");

                db.DbParametersClear();
                db.DbPsetString("@FE_CKD_NO", _fe_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);
        }
예제 #12
0
        /// <summary>
        /// 辞書の削除
        ///
        /// 使用画面:MstDicMnt
        /// </summary>
        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 DICTIONARY_MASTER ");
                strSQL.Append(" WHERE STD_ITEM = :STD_ITEM");

                db.DbParametersClear();
                db.DbPsetString("STD_ITEM", _std_item);
            }
            else
            {
                strSQL.Append("DELETE FROM DICTIONARY_MASTER ");
                strSQL.Append(" WHERE STD_ITEM = @STD_ITEM");

                db.DbParametersClear();
                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);
        }
예제 #13
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);
        }
예제 #14
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);
        }
예제 #15
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);
        }
예제 #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);
        }
예제 #17
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);
        }
예제 #18
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);
        }
예제 #19
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);
        }