/// <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); }
/// <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); }
public int DetailUpdate() { ComDB db = new ComDB(_db_type); int rtn = 0; db.DbParametersClear(); db.DbPsetInt("RET", rtn, ComConst.DB_RTN); db.DbPsetString("@FE_CKD_NO", _fe_ckd_no, ComConst.DB_IN); db.DbPsetInt("@FE_CKD_LINE", _fe_ckd_line, ComConst.DB_IN); db.DbPsetDate("@FE_DEL_N_2", _fe_del_n_2, ComConst.DB_IN); db.DbPsetString("@VENDOR", _vendor, ComConst.DB_IN); db.DbPsetString("@DIST", _dist, ComConst.DB_IN); db.DbPsetString("@MODEL", _model, ComConst.DB_IN); db.DbPsetInt("@QTY", _qty, ComConst.DB_IN); db.DbPsetString("@PC_NO", _pc_no, ComConst.DB_IN); db.DbPsetInt("@BLOCK_QTY", _block_qty, ComConst.DB_IN); db.DbPsetInt("@HEAD_QTY", _head_qty, ComConst.DB_IN); db.DbPsetDate("@VAN_ORIGINAL", _van_original, ComConst.DB_IN); db.DbPsetString("@CY_CUT", _cy_cut, ComConst.DB_IN); db.DbPsetString("@TIME_LCD", _time_lcd, ComConst.DB_IN); db.DbPsetDate("@ETD", _etd, ComConst.DB_IN); db.DbPsetString("@VESSEL", _vessel, ComConst.DB_IN); db.DbPsetString("@REMARK", _remark, ComConst.DB_IN); db.DbPsetInt("@FLAG", _flag, 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_PLAN_PROD_FECKD_DETAIL_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); }
/// <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); }
/// <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); }
public int HeadInsert() { ComDB db = new ComDB(_db_type); int rtn = 0; //rtnkd_prod_no = ""; db.DbParametersClear(); db.DbPsetInt("RET", rtn, ComConst.DB_RTN); db.DbPsetString("@KD_SPECIAL_NO", _kd_special_no, ComConst.DB_IN); db.DbPsetString("@ORDER_NO", _order_no, ComConst.DB_IN); db.DbPsetDate("@ORDER_DATE", _order_date, ComConst.DB_IN); db.DbPsetString("@PC_NO", _pc_no, ComConst.DB_IN); db.DbPsetString("@PART_DELIVERY", _part_delivery, ComConst.DB_IN); db.DbPsetDate("@PACKING_DATE", _packing_date, ComConst.DB_IN); db.DbPsetDate("@PACKING_LIST_TO_LB", _packing_list_to_lb, ComConst.DB_IN); db.DbPsetDate("@ETD_DATE", _etd_date, ComConst.DB_IN); db.DbPsetDate("@ETA_DATE", _eta_date, ComConst.DB_IN); db.DbPsetString("@SHIP_BY", _ship_by, ComConst.DB_IN); db.DbPsetDate("@RTA", _rta, ComConst.DB_IN); db.DbPsetDate("@ISSUE_DATE", _issue_date, ComConst.DB_IN); db.DbPsetString("@MODEL_CODE", _model_code, ComConst.DB_IN); db.DbPsetString("@MODEL_TYPE", _model_type, ComConst.DB_IN); db.DbPsetString("@ISSUE_BY", _issue_by, ComConst.DB_IN); db.DbPsetString("@REMARK", _remark, ComConst.DB_IN); db.DbPsetString("@CREATE_BY", _chg_user_id, ComConst.DB_IN); //db.DbPsetString("@rtnHEAD_NO", rtnkd_prod_no, ComConst.DB_OUT); db.DbPsetInt("@O_ERRCODE", _errcode, ComConst.DB_OUT); db.DbPsetString("@O_MSG", _errmsg, ComConst.DB_OUT); db.DbPsetInt("@O_SQLCODE", _sqlcode, ComConst.DB_OUT); db.DbPsetString("@O_SQLMSG", _dbmsg, ComConst.DB_OUT); db.DbPsetString("@O_PROC_NAME", _proc_name, ComConst.DB_OUT); db.DbBeginTrans(); rtn = db.DbStored("SP_PLAN_PROD_KD_HEADER_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; } //rtnkd_prod_no = db.DbPgetString("@rtnHEAD_NO"); return(rtn); }
public int Insert() { ComDB db = new ComDB(_db_type); int rtn = 0; db.DbParametersClear(); db.DbPsetInt("RET", rtn, ComConst.DB_RTN); db.DbPsetString("@CONTENT_NO", _content_no, ComConst.DB_IN); db.DbPsetString("@PART_NO", _part_no, ComConst.DB_IN); db.DbPsetString("@PART_NAME", _part_name, ComConst.DB_IN); db.DbPsetString("@COLOR", _color, ComConst.DB_IN); db.DbPsetString("@PROC_LOC_FROM", _proc_loc_from, ComConst.DB_IN); db.DbPsetString("@PROC_LOC_TO", _proc_loc_to, ComConst.DB_IN); db.DbPsetString("@INV_LOC_CD", _inv_loc_cd, ComConst.DB_IN); db.DbPsetString("@DOCK_NO", _dock_no, ComConst.DB_IN); db.DbPsetString("@KD_LOT_NO", _kd_lot_no, ComConst.DB_IN); db.DbPsetString("@PC_NO", _pc_no, ComConst.DB_IN); db.DbPsetDate("@DELV_SCDL_TIME", _delv_scdl_time, ComConst.DB_IN); db.DbPsetInt("@DELV_SCDL_QTY", _delv_scdl_qty, ComConst.DB_IN); db.DbPsetString("@INV_CATEGORY", _inv_category, ComConst.DB_IN); //db.DbPsetInt("@FLAG", _flag, 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_PUR_REC_IMPORT_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); }
public int DetailInsert() { ComDB db = new ComDB(_db_type); int rtn = 0; db.DbParametersClear(); db.DbPsetInt("RET", rtn, ComConst.DB_RTN); db.DbPsetString("@MC_HUM_NO", _mc_hum_no, ComConst.DB_IN); db.DbPsetInt("@MC_CKD_LINE", _mc_ckd_line, ComConst.DB_IN); db.DbPsetDate("@MC_DEL_N_2", _mc_del_n_2, ComConst.DB_IN); db.DbPsetString("@VENDOR", _vendor, ComConst.DB_IN); db.DbPsetString("@DEST", _dest, ComConst.DB_IN); db.DbPsetString("@MODEL", _model, ComConst.DB_IN); db.DbPsetInt("@QTY", _qty, ComConst.DB_IN); db.DbPsetString("@PC_NO", _pc_no, ComConst.DB_IN); db.DbPsetInt("@BLOCK_QTY", _block_qty, ComConst.DB_IN); db.DbPsetInt("@HEAD_QTY", _head_qty, 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_PLAN_DEL_MC_DETAIL_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); }
/// <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); }
public int DetailUpdate() { ComDB db = new ComDB(_db_type); int rtn = 0; db.DbParametersClear(); db.DbPsetInt("RET", rtn, ComConst.DB_RTN); db.DbPsetString("@SERVICE_PART_NO", _server_part_no, ComConst.DB_IN); db.DbPsetInt("@SERVICE_PART_LINE", _server_part_line, ComConst.DB_IN); db.DbPsetString("@PART_NO", _part_no, ComConst.DB_IN); db.DbPsetString("@MODEL", _model, ComConst.DB_IN); db.DbPsetInt("@ORDER", _order, ComConst.DB_IN); db.DbPsetInt("@DIFF", _diff, ComConst.DB_IN); db.DbPsetDate("@DELIVERY_PLAN_DATE", _delivery_plan_date, ComConst.DB_IN); db.DbPsetInt("@PLAN_QTY", _plan_qty, 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_PLAN_PROD_SVC_DETAIL_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); }
/// <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); }
public int DetailUpdate() { ComDB db = new ComDB(_db_type); int rtn = 0; db.DbParametersClear(); db.DbPsetInt("RET", rtn, ComConst.DB_RTN); db.DbPsetString("@MC_PROD_NO", _mc_prod_no, ComConst.DB_IN); db.DbPsetInt("@MC_LINE_NO", _mc_line_no, ComConst.DB_IN); db.DbPsetString("@PART_NO", _part_no, ComConst.DB_IN); //db.DbPsetString("@TYPE_PART", _type_part, ComConst.DB_IN); db.DbPsetDate("@PRODUCTION_PLAN_DATE", _production_plan_date, ComConst.DB_IN); db.DbPsetInt("@PLAN_QTY", _plan_qty, 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_PLAN_PROD_MC_DETAIL_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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }