Esempio n. 1
0
        public object GetStationValue(string _MESDataType)
        {
            MESStationSession session = this.StationSession.Find(t => t.MESDataType == _MESDataType && t.SessionKey == "1");

            if (session != null)
            {
                return(session.Value);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 2
0
        public void MakeOutput()
        {
            StationOutputs.Clear();
            DisplayOutput.Clear();
            for (int i = 0; i < ROutputs.Count; i++)
            {
                R_Station_Output o  = ROutputs[i].GetDataObject();
                DisplayOutPut    o1 = new DisplayOutPut();
                o1.DisplayType = o.DISPLAY_TYPE;
                o1.Value       = "";
                o1.Name        = o.NAME;
                if (o1.Name.ToUpper() == "USER")
                {
                    o1.Value = this.LoginUser.EMP_NO;
                }
                if (o1.Name.ToUpper() == "LINE")
                {
                    o1.Value = this.Line;
                }

                MESStationSession s = StationSession.Find(t => t.MESDataType == o.SESSION_TYPE && o.SESSION_KEY == t.SessionKey);


                if (s != null)
                {
                    if (o.DISPLAY_TYPE != "Table")
                    {
                        if (s.Value != null)
                        {
                            o1.Value = s.Value.ToString();
                        }
                        else
                        {
                            o1.Value = s.Value;
                        }
                    }
                    else
                    {
                        o1.Value = s.Value;
                    }
                }


                StationOutputs.Add(o);
                DisplayOutput.Add(o1);
            }
        }