예제 #1
0
        private void getDIList()
        {
            if (cidiagcard == null)
            {
                cidiagcard = new OverViewTableCard();
                //大屏下诊断放到第一列
                if (RelativeUIParam.ScreenSize == ScreenSize.Large)
                {
                    this.FirstCols.AddRender(cidiagcard);
                    cidiagcard.Size = new Size(cidiagcard.Size.Width, 364);
                }
                else
                {
                    //小屏下诊断放到第二列
                    SecCols.AddRender(cidiagcard);
                    cidiagcard.Size = new Size(cidiagcard.Size.Width, 300);
                }
            }

            cidiagcard.Text = "诊断";

            List <string> fieldNameList = new List <string>();

            fieldNameList.Add("name");
            BindingList <object> valueList = new BindingList <object>();

            if (ent4BannerDto != null && ent4BannerDto.Id_ent != null)
            {
                XapDataList <IpViewDiagDTO> listCiDi = this.model.GetDiagDataList(ent4BannerDto.Id_ent);
                if (listCiDi != null && listCiDi.Count > 0)
                {
                    var tmpDiList = listCiDi.OrderBy(u => (u as IpViewDiagDTO).Sortno);
                    foreach (IpViewDiagDTO item in tmpDiList)
                    {
                        valueList.Add(item);
                    }
                }
            }
            cidiagcard.SetData(fieldNameList, valueList, null);

            cidiagcard.MouseDoubleClick += new MouseEventHandler(cidiagcard_MouseDoubleClick);
        }