internal static String updatePartNumber() { String resultReturn = ""; try { RPCServicesClient RPC = new RPCServices_CogiscanManager.RPCServicesClient(); executeCommandRequest updatePartNumber = new executeCommandRequest("updatePartNumber", @" <Parameters> <Parameter name=""partNumber"">344-876-87</Parameter> <Parameter name=""description"">IC</Parameter> <Parameter name=""containerType""></Parameter> <Parameter name=""supplier""></Parameter> <Parameter name=""msLevel""></Parameter> <Parameter name=""bodyThickness""></Parameter> <Parameter name=""bgaPackage""></Parameter> <Parameter name=""stackedDie""></Parameter> <Parameter name=""feedPitch""></Parameter> </Parameters>"); executeCommandResponse res = RPC.executeCommand(updatePartNumber); } catch { } return(resultReturn); }
/// <summary> /// This method brings the materials with low level. /// </summary> /// <returns></returns> #region GetLowLevelsOfMaterials internal static List <EntityMaterialRequest> StartSendingLowLevelToPizzarra() { RPCServicesClient RPC = new RPCServices_CogiscanManager.RPCServicesClient(); executeCommandRequest param = new executeCommandRequest("getComponentLowLevelWarnings", "<Parameters></Parameters>"); executeCommandResponse res = RPC.executeCommand(param); XDocument arr = XDocument.Parse(res.result, LoadOptions.None); XElement root = arr.Element("LowLevelWarnings"); IEnumerable <XElement> list = root.Elements(); List <EntityMaterialRequest> listMaterialRequest = new List <EntityMaterialRequest>(); foreach (XElement element in list) { string idTool = element.Attribute("id").Value; //string location = element.Element("Mapping").Value; IEnumerable <XElement> partList = element.Elements(); foreach (XElement partes in partList) { EntityMaterialRequest rmr = new EntityMaterialRequest(); rmr.idMaquina = idTool; rmr.status = partes.Attribute("status").Value; rmr.minutos = partes.Attribute("remainingTimeMinutes").Value; rmr.remainingBoards = partes.Attribute("remainingBoards").Value; rmr.partNumber = partes.Attribute("partNumber").Value; rmr.rawMaterialId = partes.Attribute("rawMaterialId").Value; rmr.location = partes.Attribute("location").Value; rmr.productPartNumber = partes.Attribute("productPartNumber").Value; rmr.timeStampRegistro = DateTime.Now.ToString("dd/MM/yyy HH:mm:ss tt", System.Globalization.DateTimeFormatInfo.InvariantInfo); listMaterialRequest.Add(rmr); } } return(listMaterialRequest); }
internal static String InitRawMaterial(Entity.EntityInitRawMaterial q) { String resultReturn = ""; try { DataTable queryTable = new DataTable(); String queryString = "select * from materiales where num_pallet='" + q.Num_Pallet + "'"; String connectionStringFromAppConfig = "ConnectToMySQL"; queryTable = Conectivity.ConnectItAndExecuteMYSQL(queryString, connectionStringFromAppConfig); if (queryTable.Rows.Count == 0) { RPCServicesClient RPC = new RPCServices_CogiscanManager.RPCServicesClient(); String partNumber = SQLDataManager.selectValuesFromMateriales(q.NumMaterial); executeCommandRequest paramInitRawMat = new executeCommandRequest("initializeRawMaterial", @" <Parameters> <Parameter name=""itemId"">" + q.Num_Pallet + @"</Parameter> <Parameter name=""partNumber"">" + partNumber + @"</Parameter> <Parameter name=""msLevel"">1</Parameter>k <Parameter name=""containerType"">REEL</Parameter> <Parameter name=""supplierId"">Default</Parameter> <Parameter name=""quantity"">" + q.Orig_Cant + @"</Parameter> <Parameter name=""tagId""></Parameter> <Parameter name=""tagModel""></Parameter> </Parameters>"); executeCommandResponse res = RPC.executeCommand(paramInitRawMat); LogThis.LogThisValue("Material Inicializado: " + q.Num_Pallet); takeTheThreadFlag(Form1.logRTBInitRaw, true, q.Num_Pallet); resultReturn = CleanInput(res.result); } else { return(null); } } catch (Exception e) { LogThis.LogThisValue(e); return(e.Message); } return(resultReturn); }