public int lockObjects(string mbn) { int error = 0; string errorMsg = ""; string[] objectUploadKeys = new string[] { "ERROR_CODE", "MATERIAL_BIN_NUMBER", "MATERIAL_BIN_STATE" }; string[] objectUploadValues = new string[] { "0", mbn, "B" }; string[] objectResultValues = new string[] { }; error = imsapi.lockObjects(sessionContext, init.configHandler.StationNumber, 1, mbn, mbn, -1, 0, objectUploadKeys, objectUploadValues, out objectResultValues); imsapi.imsapiGetErrorText(sessionContext, error, out errorMsg); LogHelper.Info("Api lockObjects MBN=" + mbn + ",material bin state = B,result code = " + error + "(" + errorMsg + ")"); return(error); }
public int LockObjects(int objectType, string lockGroupName, string lockInformation, string materialBinNo) { string[] objectUploadKeys = new string[] { "ERROR_CODE", "MATERIAL_BIN_NUMBER" }; string[] objectUploadValues = new string[] { "0", materialBinNo }; string[] objectResultValues = new string[] { }; int errorCode = imsapi.lockObjects(sessionContext, init.configHandler.StationNumber, objectType, lockGroupName, lockInformation, -1, 0, objectUploadKeys, objectUploadValues, out objectResultValues); LogHelper.Info("Api lockObjects object type =" + objectType + ", lock group name =" + lockGroupName + ", material bin number =" + materialBinNo + ", result code =" + errorCode); return(errorCode); }