Esempio n. 1
0
        private void InitPageObject()
        {
            XmlDocument xmlDoc = this.GetXMLDocument("OrgAttribute");
            XmlElement  root   = xmlDoc.DocumentElement;

            XmlElement classElem = (XmlElement)root.SelectSingleNode("Attributes[@NAME=\"ORG_CLASS\"]");

            foreach (XmlElement itemElem in classElem.ChildNodes)
            {
                ORG_CLASS.Items.Add(new ListItem(itemElem.GetAttribute("NAME"), itemElem.GetAttribute("ID")));
            }

            XmlElement typeElem = (XmlElement)root.SelectSingleNode("Attributes[@NAME=\"ORG_TYPE\"]");

            foreach (XmlElement itemElem in typeElem.ChildNodes)
            {
                ORG_TYPE.Items.Add(new ListItem(itemElem.GetAttribute("NAME"), itemElem.GetAttribute("ID")));
            }
            ORG_TYPE.SelectedIndex = 1;

            DataSet ds = OGUReader.GetRankDefine(1, 1);

            RANK_CODE.DataSource     = new DataView(ds.Tables[0]);
            RANK_CODE.DataTextField  = "NAME";
            RANK_CODE.DataValueField = "CODE_NAME";
            RANK_CODE.DataBind();
            RANK_CODE.Items.Insert(0, new ListItem("--", string.Empty));
        }
Esempio n. 2
0
        private void InitPageObject()
        {
            DataSet ds = OGUReader.GetRankDefine(2, 1);

            RANK_CODE.DataSource     = new DataView(ds.Tables[0]);
            RANK_CODE.DataTextField  = "NAME";
            RANK_CODE.DataValueField = "CODE_NAME";
            RANK_CODE.DataBind();
            RANK_CODE.Items.Insert(0, new ListItem("--", string.Empty));
        }