/// <summary> /// 使用画面:PurManPOPlanRpt /// </summary> public DataSet GetDayOfWeek() { ComDB db = new ComDB(_db_type); StringBuilder strSQL = new StringBuilder(); DataSet ds = new DataSet(); //--- sql strSQL.Append("SELECT DISTINCT "); strSQL.Append("CALENDAR_CYM, DAY_OF_WEEK, TTL_WEEK "); if (_db_type == "ORACLE") { strSQL.Append(" FROM CALENDAR_MASTER "); strSQL.Append(" WHERE CALENDAR_ID = :CALENDAR_ID "); strSQL.Append(" AND CALENDAR_DATE = :CALENDAR_DATE "); db.DbParametersClear(); db.DbPsetString("CALENDAR_ID", _calendar_id); db.DbPsetInt("CALENDAR_DATE", _calendar_date); } else { strSQL.Append(" FROM CALENDAR_MASTER "); strSQL.Append(" WHERE CALENDAR_ID = @CALENDAR_ID "); strSQL.Append(" AND CALENDAR_DATE = @CALENDAR_DATE "); db.DbParametersClear(); db.DbPsetString("@CALENDAR_ID", _calendar_id); db.DbPsetInt("@CALENDAR_DATE", _calendar_date); } strSQL.Append(" ORDER BY CALENDAR_CYM "); try { ds = db.DbDataSet(strSQL.ToString(), "Tabel"); if (ds == null) { _dbmsg = db.expmsg; _strErr = db.strErr; } if (db.State() == ConnectionState.Open) { db.DbClose(); } return(ds); } catch { _dbmsg = db.expmsg; _strErr = db.strErr; if (db.State() == ConnectionState.Open) { db.DbClose(); } return(null); } }
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); }
/// <summary> /// メッセージ詳細の取得 /// </summary> public int GetMessageDetail() { ComDB db = new ComDB(_db_type); StringBuilder strSQL = new StringBuilder(); int rtn = 0; //--- sql strSQL.Append("SELECT MSG_DESC, RANK, "); strSQL.Append(" ENTRY_DATE, CHG_DATE, CHG_USER_ID,"); strSQL.Append(" UPDATE_CNTR"); strSQL.Append(" FROM MESSAGE_MASTER "); if (_db_type == "ORACLE") { 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(" WHERE MSG_CD = @MSG_CD"); strSQL.Append(" AND LANG = @LANG"); db.DbParametersClear(); db.DbPsetString("@MSG_CD", _msg_cd); db.DbPsetInt("@LANG", _lang); } rtn = db.DbExecuteReader(strSQL.ToString()); if (rtn == ComConst.FAILED) { _dbmsg = db.expmsg; _strErr = db.strErr; } else { _msg_desc = db.Row("MSG_DESC"); _rank = db.Row("RANK"); _entry_date = DateTime.Parse(db.Row("ENTRY_DATE")); _chg_date = DateTime.Parse(db.Row("CHG_DATE")); _chg_user_id = db.Row("CHG_USER_ID"); _update_cntr = int.Parse(db.Row("UPDATE_CNTR")); } if (db.State() == ConnectionState.Open) { db.DbClose(); } return(rtn); }
public int Update() { ComDB db = new ComDB(_db_type); int rtn = 0; db.DbParametersClear(); db.DbPsetInt("RET", rtn, ComConst.DB_RTN); db.DbPsetString("@SLIP_NO", _slip_no, ComConst.DB_IN); db.DbPsetString("@DATE", _date, ComConst.DB_IN); db.DbPsetString("@TIME", _time, ComConst.DB_IN); db.DbPsetString("@PROC_LOC_FROM", _proc_loc_from, ComConst.DB_IN); db.DbPsetString("@MAKER_NAME", _maker_name, ComConst.DB_IN); db.DbPsetString("@SHIP_TO", _ship_to, 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("@RECEIVE_CYCLE", _receive_cycle, ComConst.DB_IN); db.DbPsetString("@INV_CATEGORY", _inv_category, ComConst.DB_IN); db.DbPsetString("@KD_LOT_FROM", _kd_lot_from, ComConst.DB_IN); db.DbPsetString("@KD_LOT_TO", _kd_lot_to, ComConst.DB_IN); db.DbPsetString("@PROC_LOC_TO", _proc_loc_to, ComConst.DB_IN); db.DbPsetString("@DELV_ADDR", _delv_addr, ComConst.DB_IN); db.DbPsetInt("@DELV_SCDLL_QTY", _delv_scdll_qty, ComConst.DB_IN); db.DbPsetInt("@PART_UNLD_QTY", _part_unld_qty, ComConst.DB_IN); db.DbPsetInt("@PROGRESS", _progress, ComConst.DB_IN); db.DbPsetString("@INV_LOC_CD", _inv_category, ComConst.DB_IN); db.DbPsetInt("@FLAG", _flag, ComConst.DB_IN); db.DbBeginTrans(); rtn = db.DbStored("Update_Pur_Rec_Import"); 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 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 GetHeadNo(out string rtnmc_prod_no) { ComDB db = new ComDB(_db_type); int rtn = 0; rtnmc_prod_no = ""; db.DbParametersClear(); db.DbPsetInt("RET", rtn, ComConst.DB_RTN); db.DbPsetString("@OptMethod", _OptMethod, ComConst.DB_IN); db.DbPsetString("@outHEADNO", rtnmc_prod_no, ComConst.DB_OUT); db.DbBeginTrans(); rtn = db.DbStored("SP_PLAN_PROD_HEADNO"); rtn = db.DbPgetInt("RET"); if (rtn == ComConst.SUCCEED) { db.DbCommit(); } else { db.DbRollback(); rtn = ComConst.FAILED; } rtnmc_prod_no = db.DbPgetString("@outHEADNO"); 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); }
/// <summary> /// メッセージの取得 /// </summary> public string GetMessage(string msgcd) { ComDB db = new ComDB(_db_type); StringBuilder strSQL = new StringBuilder(); int rtn = 0; //--- sql strSQL.Append("SELECT MSG_DESC, RANK "); strSQL.Append(" FROM MESSAGE_MASTER "); if (_db_type == "ORACLE") { strSQL.Append(" WHERE MSG_CD = :MSG_CD"); strSQL.Append(" AND LANG = :LANG"); db.DbParametersClear(); db.DbPsetString("MSG_CD", msgcd); db.DbPsetInt("LANG", _lang); } else { strSQL.Append(" WHERE MSG_CD = @MSG_CD"); strSQL.Append(" AND LANG = @LANG"); db.DbParametersClear(); db.DbPsetString("@MSG_CD", msgcd); db.DbPsetInt("@LANG", _lang); } rtn = db.DbExecuteReader(strSQL.ToString()); if (rtn == ComConst.FAILED) { _dbmsg = db.expmsg; _strErr = db.strErr; _msg_desc = "No Corresponding Message."; } else { _msg_desc = db.Row("MSG_DESC"); _rank = db.Row("RANK"); } if (db.State() == ConnectionState.Open) { db.DbClose(); } return(_msg_desc); }
public int HeadUpdate() { 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("@YEAR", _year, ComConst.DB_IN); db.DbPsetInt("@MONTH", _month, ComConst.DB_IN); //db.DbPsetInt("@VERSION", _version, ComConst.DB_IN); //db.DbPsetString("@PART_NO", _part_no, ComConst.DB_IN); //db.DbPsetString("@REMARK", _remark, ComConst.DB_IN); //db.DbPsetDate("@ENTRY_DATE", _entry_date, ComConst.DB_IN); //db.DbPsetDate("@UPDATE_DATE", _chg_date, ComConst.DB_IN); //db.DbPsetString("@USER_CREATE", _chg_user_id, ComConst.DB_IN); db.DbPsetString("@USER_UPDATE", _chg_user_id, ComConst.DB_IN); //db.DbPsetString("@rtnHEAD_NO", rtnmc_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_MC_HEADER_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> /// お知らせ情報の削除 /// /// 使用画面: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); }
/// <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); }
/// <summary> /// <para>自動採番の取得 /// </para> /// 使用画面:OrdSOEntry /// </summary> public int GET_AUTO_NUM() { ComDB db = new ComDB(_db_type); int rtn = 0; db.DbParametersClear(); db.DbPsetInt("RET", rtn, ComConst.DB_RTN); db.DbPsetString("@I_CTR_CD", _ctr_cd, ComConst.DB_IN); db.DbPsetString("@I_CTR_SUB_CD", _ctr_sub_cd, ComConst.DB_IN); db.DbPsetString("@I_CTR_PREFIX", _ctr_prefix, ComConst.DB_IN); db.DbPsetInt("@I_CTR_DIGIT", _ctr_digit, 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.DbPsetString("@O_NUMBER", _out_num, 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_NUMBERING"); rtn = db.DbPgetInt("RET"); if (rtn == ComConst.SUCCEED) { _out_num = db.DbPgetString("@O_NUMBER"); db.DbCommit(); // Hoshina } else { _errcode = db.DbPgetInt("@O_ERRCODE"); _errmsg = db.DbPgetString("@O_MSG"); _sqlcode = db.DbPgetInt("@O_SQLCODE"); _dbmsg = db.DbPgetString("@O_SQLMSG"); _proc_name = db.DbPgetString("@O_PROC_NAME"); _strErr = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]"; db.DbRollback(); // Hoshina rtn = ComConst.FAILED; } return(rtn); }
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> /// メッセージの削除 /// </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); }
/// <summary> /// JOCの変更 /// /// 使用画面:MstJOCMnt /// </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_JOC_CD", _joc_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_JOC_STATUS", _joc_status, ComConst.DB_IN); db.DbPsetInt("@I_JOC_TYPE", _joc_type, ComConst.DB_IN); db.DbPsetString("@I_JOC_DESC", _joc_desc, ComConst.DB_IN); db.DbPsetString("@I_JOC_DESC2", _joc_desc2, ComConst.DB_IN); db.DbPsetString("@I_COST_CENTER", _cost_center, 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_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_JOC_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> /// ロケーションの追加 HTS /// /// 使用画面:MstLocationMnt /// </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_LOCATION", _location, ComConst.DB_IN); db.DbPsetString("@I_LOCATION_DESC", _location_desc, ComConst.DB_IN); db.DbPsetString("@I_LOCATION_DESC2", _location_desc2, ComConst.DB_IN); // HTS db.DbPsetString("@I_DEPT_NO", _dept_no, ComConst.DB_IN); // HTS 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_LOCATION_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); }
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); }
public int DetailInsert() { 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_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> /// 工程NG理由の追加 /// /// 使用画面:MstProcessNGReasonMnt /// </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_WS_CD", _ws_cd, ComConst.DB_IN); db.DbPsetString("@I_PROCESS_CD", _process_cd, ComConst.DB_IN); db.DbPsetString("@I_NG_REASON_CD", _ng_reason_cd, ComConst.DB_IN); db.DbPsetString("@I_NG_REASON_DESC", _ng_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_PROCESS_NG_REASON_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> /// Calendarの追加&更新 /// 使用画面:MstCalendarMnt /// </summary> public int Update() { ComDB db = new ComDB(_db_type); int rtn = 0; db.DbParametersClear(); db.DbPsetInt("RET", rtn, ComConst.DB_RTN); db.DbPsetString("@I_CALENDAR_ID", _calendar_id, ComConst.DB_IN); db.DbPsetInt("@I_CALENDAR_DATE", _calendar_date, ComConst.DB_IN); //db.DbPsetInt("@I_CALENDAR_CYM", _calendar_cym, ComConst.DB_IN); //db.DbPsetInt("@I_WEEK_NO", _week_no, ComConst.DB_IN); //db.DbPsetInt("@I_DAY_OF_WEEK", _day_of_week, ComConst.DB_IN); db.DbPsetInt("@I_HOLIDAY_FLAG", _holiday_flag, ComConst.DB_IN); db.DbPsetInt("@I_PO_RLS_FLAG", _po_rls_flag, ComConst.DB_IN); //db.DbPsetInt("@I_TTL_WORK_DAYS", _ttl_work_days, ComConst.DB_IN); //db.DbPsetInt("@I_TTL_DAYS", _ttl_days, ComConst.DB_IN); //db.DbPsetInt("@I_TTL_WEEK", _ttl_week, ComConst.DB_IN); db.DbPsetDouble("@I_STD_WORKING_HOUR", _std_working_hour, ComConst.DB_IN); db.DbPsetString("@I_USER_GROUP", _user_group, ComConst.DB_IN); // HTS db.DbPsetString("@I_CHG_PGM", _chg_pgm, ComConst.DB_IN); db.DbPsetString("@I_CHG_USERID", _chg_user_id, ComConst.DB_IN); db.DbPsetInt("@I_LANG", _lang, ComConst.DB_IN); db.DbPsetInt("@I_UPDATE_CNTR", _update_cntr, ComConst.DB_IN); db.DbPsetInt("@O_ERRCODE", _errcode, ComConst.DB_OUT); db.DbPsetString("@O_MSG", _errmsg, ComConst.DB_OUT); db.DbPsetInt("@O_SQLCODE", _sqlcode, ComConst.DB_OUT); db.DbPsetString("@O_SQLMSG", _dbmsg, ComConst.DB_OUT); db.DbPsetString("@O_PROC_NAME", _proc_name, ComConst.DB_OUT); //db.DbConnection (); db.DbBeginTrans(); rtn = db.DbStored("SP_CALENDAR_UPDATE"); rtn = db.DbPgetInt("RET"); if (rtn == ComConst.SUCCEED) { db.DbCommit(); } else { _errcode = db.DbPgetInt("@O_ERRCODE"); _errmsg = db.DbPgetString("@O_MSG"); _sqlcode = db.DbPgetInt("@O_SQLCODE"); _dbmsg = db.DbPgetString("@O_SQLMSG"); _proc_name = db.DbPgetString("@O_PROC_NAME"); _strErr = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]"; db.DbRollback(); rtn = ComConst.FAILED; } db.DbClose(); return(rtn); }
/// <summary> /// 品目別段取条件マスタ更新 /// /// 使用画面:MstItemSetupMnt /// </summary> public int Update() { ComDB db = new ComDB(_db_type); int rtn = 0; db.DbParametersClear(); db.DbPsetInt("RET", rtn, ComConst.DB_RTN); db.DbPsetString("@I_RESOURCE_CD", _resource_cd, ComConst.DB_IN); db.DbPsetString("@I_ITEM_NO", _item_no, ComConst.DB_IN); db.DbPsetString("@I_PREV_ITEM_NO", _prev_item_no, ComConst.DB_IN); db.DbPsetDouble("@I_SETUP_TIME", _setup_time, ComConst.DB_IN); db.DbPsetString("@I_CHG_PGM", _chg_pgm, ComConst.DB_IN); db.DbPsetString("@I_CHG_USER_ID", _chg_user_id, ComConst.DB_IN); db.DbPsetInt("@I_LANG", _lang, ComConst.DB_IN); db.DbPsetInt("@O_ERRCODE", _errcode, ComConst.DB_OUT); db.DbPsetString("@O_MSG", _errmsg, ComConst.DB_OUT); db.DbPsetInt("@O_SQLCODE", _sqlcode, ComConst.DB_OUT); db.DbPsetString("@O_SQLMSG", _dbmsg, ComConst.DB_OUT); db.DbPsetString("@O_PROC_NAME", _proc_name, ComConst.DB_OUT); db.DbBeginTrans(); rtn = db.DbStored("SP_ITEM_SETUP_UPDATE"); rtn = db.DbPgetInt("RET"); if (rtn == ComConst.SUCCEED) { db.DbCommit(); } else { _errcode = db.DbPgetInt("@O_ERRCODE"); _errmsg = db.DbPgetString("@O_MSG"); _sqlcode = db.DbPgetInt("@O_SQLCODE"); _dbmsg = db.DbPgetString("@O_SQLMSG"); _proc_name = db.DbPgetString("@O_PROC_NAME"); _strErr = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]"; db.DbRollback(); rtn = ComConst.FAILED; } return(rtn); }
/// <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); }
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); }
public int HeadInsert() { ComDB db = new ComDB(_db_type); int rtn = 0; //rtnsp_prod_no = ""; db.DbParametersClear(); db.DbPsetInt("RET", rtn, ComConst.DB_RTN); db.DbPsetString("@SERVICE_PART_NO", _server_part_no, ComConst.DB_IN); db.DbPsetInt("@YEAR", _year, ComConst.DB_IN); db.DbPsetInt("@MONTH", _month, ComConst.DB_IN); db.DbPsetInt("@VERSION", _version, ComConst.DB_IN); db.DbPsetString("@PART_NO", _part_no, ComConst.DB_IN); db.DbPsetInt("@SEMI_FIXED_FIRST", _semi_fixed_first, ComConst.DB_IN); db.DbPsetInt("@SEMI_FIXED_SECOND", _semi_fixed_second, ComConst.DB_IN); //db.DbPsetDate("@ENTRY_DATE", _entry_date, ComConst.DB_IN); //db.DbPsetDate("@UPDATE_DATE", _chg_date, ComConst.DB_IN); db.DbPsetString("@USER_CREATE", _chg_user_id, ComConst.DB_IN); //db.DbPsetString("@USER_UPDATE", _chg_user_id, ComConst.DB_IN); //db.DbPsetString("@rtnHEAD_NO", rtnsp_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_SVC_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; } //rtnsp_prod_no = db.DbPgetString("@rtnHEAD_NO"); 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> /// 製造資源の変更 /// /// 使用画面:MstRoutineResourceMnt /// </summary> public int Update() { ComDB db = new ComDB(_db_type); int rtn = 0; db.DbParametersClear(); db.DbPsetInt("RET", rtn, ComConst.DB_RTN); db.DbPsetString("@I_ITEM_NO", _item_no, ComConst.DB_IN); db.DbPsetString("@I_WS_CD", _ws_cd, ComConst.DB_IN); db.DbPsetInt("@I_ROUTINE_SEQ", _routine_seq, ComConst.DB_IN); db.DbPsetString("@I_PROCESS_CD", _process_cd, ComConst.DB_IN); db.DbPsetInt("@I_PTY_NO", _pty_no, ComConst.DB_IN); db.DbPsetString("@I_RESOURCE_CD", _resource_cd, ComConst.DB_IN); db.DbPsetDouble("@I_SETUP_TIME", _setup_time, ComConst.DB_IN); db.DbPsetDouble("@I_UNIT_TIME", _unit_time, ComConst.DB_IN); db.DbPsetDouble("@I_UNIT_QTY", _unit_qty, ComConst.DB_IN); db.DbPsetDouble("@I_TRANSFER_TIME", _transfer_time, ComConst.DB_IN); db.DbPsetDouble("@I_MFG_LOT_QTY", _mfg_lot_qty, ComConst.DB_IN); db.DbPsetString("@I_SPEC_CD", _spec_cd, ComConst.DB_IN); db.DbPsetString("@I_JIGU", _jigu, ComConst.DB_IN); db.DbPsetString("@I_DIE", _die, ComConst.DB_IN); db.DbPsetString("@I_CHG_PGM", _chg_pgm, ComConst.DB_IN); db.DbPsetString("@I_CHG_USER_ID", _chg_user_id, ComConst.DB_IN); db.DbPsetInt("@I_LANG", _lang, ComConst.DB_IN); db.DbPsetInt("@O_ERRCODE", _errcode, ComConst.DB_OUT); db.DbPsetString("@O_MSG", _errmsg, ComConst.DB_OUT); db.DbPsetInt("@O_SQLCODE", _sqlcode, ComConst.DB_OUT); db.DbPsetString("@O_SQLMSG", _dbmsg, ComConst.DB_OUT); db.DbPsetString("@O_PROC_NAME", _proc_name, ComConst.DB_OUT); db.DbBeginTrans(); rtn = db.DbStored("SP_ROUTINE_RESOURCE_UPDATE"); rtn = db.DbPgetInt("RET"); if (rtn == ComConst.SUCCEED) { db.DbCommit(); } else { _errcode = db.DbPgetInt("@O_ERRCODE"); _errmsg = db.DbPgetString("@O_MSG"); _sqlcode = db.DbPgetInt("@O_SQLCODE"); _dbmsg = db.DbPgetString("@O_SQLMSG"); _proc_name = db.DbPgetString("@O_PROC_NAME"); _strErr = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]"; db.DbRollback(); rtn = ComConst.FAILED; } return(rtn); }
/// <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 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); }
/// <summary> /// 資源の変更 /// /// 使用画面:MstResourceMnt /// </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_RESOURCE_DESC", _resource_desc, ComConst.DB_IN); db.DbPsetString("@I_RESOURCE_DESC2", _resource_desc2, ComConst.DB_IN); db.DbPsetInt("@I_RESOURCE_TYPE", _resource_type, ComConst.DB_IN); db.DbPsetString("@I_RESOURCE_GRP", _resource_grp, ComConst.DB_IN); db.DbPsetString("@I_WS_CD", _ws_cd, ComConst.DB_IN); db.DbPsetString("@I_PROCESS_CD", _process_cd, ComConst.DB_IN); db.DbPsetInt("@I_DISPLAY_SEQ", _display_seq, ComConst.DB_IN); db.DbPsetInt("@I_STD_WORKING_TIME", _std_working_time, ComConst.DB_IN); db.DbPsetString("@I_TIME_DESC", _time_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_RESOURCE_UPDATE"); rtn = db.DbPgetInt("RET"); if (rtn == ComConst.SUCCEED) { db.DbCommit(); } else { _errcode = db.DbPgetInt("@O_ERRCODE"); _errmsg = db.DbPgetString("@O_MSG"); _sqlcode = db.DbPgetInt("@O_SQLCODE"); _dbmsg = db.DbPgetString("@O_SQLMSG"); _proc_name = db.DbPgetString("@O_PROC_NAME"); _strErr = _errcode + ":" + _errmsg + "[" + _sqlcode + ":" + _dbmsg + "(" + _proc_name + ")]"; db.DbRollback(); rtn = ComConst.FAILED; } return(rtn); }
/// <summary> /// 製造工順の削除 /// /// 使用画面:MstRoutineMnt /// </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_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.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_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); }