コード例 #1
0
        private void LoadConfig()
        {
            this.ddlSet.Items.Add(new ListItem("กรุณาเลือก", "-1"));
            this.ddlEquipmentList.Items.Add(new ListItem("กรุณาเลือก", "-1"));

            Equipment_SET[] Equipment_SETs = null;
            ClassSet.GetDate_Equipment_SET(out Equipment_SETs, null);
            if (Equipment_SETs != null && Equipment_SETs.Any())
            {
                Equipment_SETs = Equipment_SETs.OrderBy(x => x.SETName).ToArray();
                foreach (Equipment_SET en in Equipment_SETs)
                {
                    this.ddlSet.Items.Add(new ListItem(en.SETName, en.SET_ID.ToString()));
                }

                ddlSet.SelectedIndex = 0;
            }

            ListItem[] lts = null;
            ClassPackage.GetEQForDDL_All(out lts);

            if (lts != null && lts.Any())
            {
                foreach (ListItem lt in lts)
                {
                    this.ddlEquipmentList.Items.Add(lt);
                }
                this.ddlEquipmentList.SelectedIndex = 0;
            }
        }
コード例 #2
0
ファイル: EquiptmentSET.aspx.cs プロジェクト: hmooza/T-REC
        private void initial(int?Set_id = null)
        {
            Equipment_SET[] Equipment_SETs = null;
            ClassSet.GetDate_Equipment_SET(out Equipment_SETs, Set_id);

            grid_SetName.DataSource = Equipment_SETs;
            grid_SetName.DataBind();
        }