public void DeleteCSeqno(Newtonsoft.Json.Linq.JObject requestValue, Newtonsoft.Json.Linq.JObject Data, MESStationReturn StationReturn) { T_C_SEQNO SEQNO = null; OleExec sfcdb = null; try { sfcdb = this.DBPools["SFCDB"].Borrow(); SEQNO = new T_C_SEQNO(sfcdb, DB_TYPE_ENUM.Oracle); Row_C_SEQNO r = (Row_C_SEQNO)SEQNO.GetObjByID((Data["ID"].ToString()).Trim(), sfcdb); string strRet = sfcdb.ExecSQL(r.GetDeleteString(DB_TYPE_ENUM.Oracle)); if (Convert.ToInt32(strRet) > 0) { StationReturn.Message = "刪除成功!!"; StationReturn.Status = StationReturnStatusValue.Pass; StationReturn.Data = ""; } else { StationReturn.MessageCode = "MES00000036"; StationReturn.Status = StationReturnStatusValue.Fail; StationReturn.Data = ""; } this.DBPools["SFCDB"].Return(sfcdb); } catch (Exception e) { this.DBPools["SFCDB"].Return(sfcdb); throw e; } }
public void UpdateCSeqno(Newtonsoft.Json.Linq.JObject requestValue, Newtonsoft.Json.Linq.JObject Data, MESStationReturn StationReturn) { T_C_SEQNO SEQNO = null; OleExec sfcdb = null; try { sfcdb = this.DBPools["SFCDB"].Borrow(); SEQNO = new T_C_SEQNO(sfcdb, DB_TYPE_ENUM.Oracle); Row_C_SEQNO r = (Row_C_SEQNO)SEQNO.GetObjByID((Data["ID"].ToString()).Trim(), sfcdb); r.SEQ_NAME = (Data["SEQ_NAME"].ToString()).Trim(); r.SEQ_NO = (Data["SEQ_NO"].ToString()).Trim(); r.DIGITS = (Data["DIGITS"].ToString()).Trim() == "" ? 0 : (Convert.ToDouble((Data["DIGITS"].ToString()).Trim())); r.BASE_CODE = (Data["BASE_CODE"].ToString()).Trim(); r.MINIMUM = (Data["MINIMUM"].ToString()).Trim(); r.MAXIMUM = (Data["MAXIMUM"].ToString()).Trim(); r.PREFIX = (Data["PREFIX"].ToString()).Trim(); r.SEQ_FORM = (Data["SEQ_FORM"].ToString()).Trim(); r.EDIT_EMP = this.LoginUser.EMP_NO; r.EDIT_TIME = GetDBDateTime(); string strRet = sfcdb.ExecSQL(r.GetUpdateString(DB_TYPE_ENUM.Oracle)); if (Convert.ToInt32(strRet) > 0) { StationReturn.Message = "修改成功!!"; StationReturn.Status = StationReturnStatusValue.Pass; StationReturn.Data = ""; } else { StationReturn.MessageCode = "MES00000036"; StationReturn.Status = StationReturnStatusValue.Fail; StationReturn.Data = ""; } this.DBPools["SFCDB"].Return(sfcdb); } catch (Exception e) { this.DBPools["SFCDB"].Return(sfcdb); throw e; } }