コード例 #1
0
        public TagInformation GetTagInformationFormLocalDatabase(string sTagetUID)
        {
            string sQuery = "SELECT * FROM " + LOCAL_REGISTRATION_TABLE + " WHERE UID='" + sTagetUID + "'";;

            string[] asData = GetItemsFromDatabase(sLocalConnection, sQuery);
            if (asData != null)
            {
                TagInformation tagInfo = new TagInformation();
                tagInfo.sWorkOrder = asData[1];
                ProductionParameters proParam = GetProductionParamFromServerDatabase(tagInfo.sWorkOrder);
                if (proParam != null)
                {
                    tagInfo.sUID            = asData[0];
                    tagInfo.sWorkOrder      = asData[1];
                    tagInfo.sBoxNumber      = asData[2];
                    tagInfo.sQuantityPerBox = proParam.iQuantityPerBox.ToString();
                    tagInfo.sPartialBox     = "0";
                    tagInfo.sMachineNumber  = asData[3];
                    tagInfo.sTrimFrequency  = asData[4];
                    tagInfo.sTrimValue      = asData[5];
                    tagInfo.sF1             = asData[6];
                    tagInfo.sF2             = asData[7];
                    tagInfo.sF1_RST         = asData[8];
                    tagInfo.sF2_RST         = asData[9];
                    tagInfo.sTemperature    = asData[10];
                    tagInfo.sDateTime       = asData[11];
                    proParam = null;
                }
                asData = null;
                return(tagInfo);
            }
            return(null);
        }
コード例 #2
0
        public TagInformation GetTagInformationFormServerDatabase(string sTagetUID)
        {
            string sQuery = "SELECT dbo.registration11.UID,dbo.registration11.WorkOrder,dbo.registration11.BoxNumber,dbo.registration11_Box.QuantityPerBox," +
                            "dbo.registration11.PartialBox,dbo.registration11.MachineNumber, dbo.registration11.TrimFrequency, dbo.registration11.TrimValue," +
                            "dbo.registration11.F1, dbo.registration11.F2,dbo.registration11.F1_RST,dbo.registration11.F2_RST,dbo.registration11.Temperature,dbo.registration11.DateTime " +
                            "FROM dbo.registration11 INNER JOIN dbo.registration11_Box ON dbo.registration11.BoxNumber = dbo.registration11_Box.BoxNumber " +
                            "WHERE UID='" + sTagetUID + "'";

            string[] asData = GetItemsFromDatabase(sServerConnection, sQuery);
            if (asData != null)
            {
                TagInformation tagInfo = new TagInformation();
                tagInfo.sUID            = asData[0];
                tagInfo.sWorkOrder      = asData[1];
                tagInfo.sBoxNumber      = asData[2];
                tagInfo.sQuantityPerBox = asData[3];
                tagInfo.sPartialBox     = asData[4];
                tagInfo.sMachineNumber  = asData[5];
                tagInfo.sTrimFrequency  = asData[6];
                tagInfo.sTrimValue      = asData[7];
                tagInfo.sF1             = asData[8];
                tagInfo.sF2             = asData[9];
                tagInfo.sF1_RST         = asData[10];
                tagInfo.sF2_RST         = asData[11];
                tagInfo.sTemperature    = asData[12];
                tagInfo.sDateTime       = asData[13];
                asData = null;
                return(tagInfo);
            }
            return(null);
        }