public int RemoveAttributeForAll(string stationNumber, int objectType, string objectNumber, string objectDetail, string attributeCode)
        {
            int error = imsapi.attribRemoveAttributeValue(sessionContext, stationNumber, objectType, objectNumber, objectDetail, attributeCode, "-1");

            LogHelper.Info("api attribRemoveAttributeValue (object type =" + objectType + ",object number =" + objectNumber + ",attribute code =" + attributeCode + ", error code =" + error + ")");
            return(error);
        }
        public int RemoveAttriValue(string attributeCode, string workorder)
        {
            int error = 0;

            LogHelper.Info("begin api attribRemoveAttributeValue (station number =" + init.configHandler.StationNumber + ",attribute code=" + attributeCode + ")");
            error = imsapi.attribRemoveAttributeValue(sessionContext, init.configHandler.StationNumber, 1, workorder, "-1", attributeCode, "-1");
            LogHelper.Info("end api attribRemoveAttributeValue (result code = " + error + ")");
            if (error == 0)
            {
                //view.errorHandler(0, init.lang.ERROR_API_CALL_ERROR + " attribRemoveAttributeValue " + error, "");
            }
            else
            {
                string errorString = UtilityFunction.GetZHSErrorString(error, init, sessionContext);
                view.errorHandler(2, init.lang.ERROR_API_CALL_ERROR + " attribRemoveAttributeValue " + error + "(" + errorString + ")", "");
            }
            return(error);
        }
예제 #3
0
        public int RemoveContainerAttribute(string materialBinNumber, string attributeCode)
        {
            int    error    = 0;
            string errorMsg = "";

            LogHelper.Info("begin attribRemoveAttributeValue (material bin number =" + materialBinNumber + ",ATTRIBUTE_CODE =" + attributeCode + ")");
            error = imsapi.attribRemoveAttributeValue(sessionContext, init.configHandler.StationNumber, 2, materialBinNumber, "-1", attributeCode, "-1");
            imsapi.imsapiGetErrorText(sessionContext, error, out errorMsg);
            LogHelper.Info("end attribRemoveAttributeValue error=" + error + "");
            if (error == 0)
            {
                view.errorHandler(0, init.lang.ERROR_API_CALL_ERROR + " attribRemoveAttributeValue " + error, "");
            }
            else
            {
                view.errorHandler(3, init.lang.ERROR_API_CALL_ERROR + " attribRemoveAttributeValue " + error + "(" + errorMsg + ")", "");
            }
            return(error);
        }