public void GetFacilityControlPoint(string facilityName, string traceCode)
        {
            string opStr = facilityName + "/Op";
            string opRefStr = facilityName + "/OpRef";

            XmlElement opPointXml = ObixHelper.Request_WebRequest(opStr);
            XmlNodeList opNodeList = opPointXml.ChildNodes;

            XmlElement opRefPointXml = ObixHelper.Request_WebRequest(opRefStr);
            XmlNodeList opRefNodeList = opRefPointXml.ChildNodes;

          
            
            MesScanControlPoint mscp = new MesScanControlPoint();
            mscp.ControlPoint = facilityName;
            mscp.CreateDate = DateTime.Now;
            mscp.Op = opNodeList[2].Attributes["val"].Value;
            mscp.OpReference = opRefNodeList[2].Attributes["val"].Value;     
            mscp.ProdItem = "";
            mscp.ScanDate = DateTime.Now.ToString("yyyyMMdd");
            mscp.ScanTime = DateTime.Now.ToString("HHmmss");
            mscp.Status = 0;
            mscp.Type = CodeMaster.FacilityParamaterType.Scan;
            //if (mscp.Op.Equals("1"))
            //{
            //    mscp.TraceCode = orderMgr.PrintTraceCode(orderNo);
            //}
            //else
            //{
            mscp.TraceCode = traceCode;
            //}
            genericMgr.Create(mscp);


        }
        public void GetFacilityParamater(string facilityName, string paramaterName, string name, string traceCode)
        {
            string opStr = facilityName + "/Op";
            string opRefStr = facilityName + "/OpRef";
            string paramaterStr = facilityName + "/" + paramaterName;

            XmlElement opPointXml = ObixHelper.Request_WebRequest(opStr);
            XmlNodeList opNodeList = opPointXml.ChildNodes;

            XmlElement opRefPointXml = ObixHelper.Request_WebRequest(opRefStr);
            XmlNodeList opRefNodeList = opRefPointXml.ChildNodes;

            XmlElement paramaterPointXml = ObixHelper.Request_WebRequest(paramaterStr);
            XmlNodeList paramaterNodeList = paramaterPointXml.ChildNodes;

            MesScanControlPoint mscp = new MesScanControlPoint();
            mscp.ControlPoint = facilityName;
            mscp.CreateDate = DateTime.Now;
            mscp.Op = opNodeList[2].Attributes["val"].Value;
            mscp.OpReference = opRefNodeList[2].Attributes["val"].Value;
            mscp.ProdItem = "";
            mscp.ScanDate = DateTime.Now.ToString("yyyyMMdd");
            mscp.ScanTime = DateTime.Now.ToString("HHmmss");
            mscp.Status = 0;
            mscp.Note = name;
            mscp.NoteValue = paramaterNodeList[2].Attributes["val"].Value;
            mscp.Type = CodeMaster.FacilityParamaterType.Paramater;
            mscp.TraceCode = traceCode;
            genericMgr.Create(mscp);
           

        }