Exemplo n.º 1
0
        private void RefreshSample()
        {
            //预警样例
            string currsample = null;

            if (this.lbxSample.SelectedItem != null)
            {
                currsample = this.lbxSample.SelectedItem.ToString();
            }

            this.lbxSample.Items.Clear();
            BenQGuru.eMES.AlertModel.AlertFacade facade = new BenQGuru.eMES.AlertModel.AlertFacade(DataProvider);
            object[] objs = facade.QueryAlertSample();
            if (objs == null)
            {
                return;
            }
            foreach (object obj in objs)
            {
                BenQGuru.eMES.Domain.Alert.AlertSample sample = obj as BenQGuru.eMES.Domain.Alert.AlertSample;
                if (sample != null)
                {
                    this.lbxSample.Items.Add(sample.SampleDesc);
                }
            }

            if (currsample != null && currsample != string.Empty)
            {
                this.lbxSample.SelectedItem = currsample;
            }
        }
Exemplo n.º 2
0
        protected override Infragistics.WebUI.UltraWebGrid.UltraGridRow GetGridRow(object obj)
        {
            BenQGuru.eMES.Domain.Alert.AlertSample sample = obj as BenQGuru.eMES.Domain.Alert.AlertSample;
            if (sample != null)
            {
                Infragistics.WebUI.UltraWebGrid.UltraGridRow row = new Infragistics.WebUI.UltraWebGrid.UltraGridRow(
                    new object[] { "false",
                                   sample.SampleDesc });

                return(row);
            }
            else
            {
                return(null);
            }
        }