コード例 #1
0
ファイル: Create.aspx.cs プロジェクト: enamewang/pms
        //private void BindDropDownListDoMain()
        //{
        //    try
        //    {
        //        BaseDataDomainBiz baseDataDomainBiz = new BaseDataDomainBiz();
        //        IList<BaseDataDomain> baseDataDomainList = baseDataDomainBiz.SelectBaseDataDomain(null);

        //        dropdownlistDomain.DataSource = baseDataDomainList;
        //        dropdownlistDomain.DataTextField = "Name";
        //        dropdownlistDomain.DataValueField = "Id";
        //        dropdownlistDomain.DataBind();
        //        dropdownlistDomain.SelectedIndex = 0;

        //        //dropdownlistDomain.Items.Insert(0, new ListItem());
        //        //dropdownlistDomain.Items[0].Text = "";
        //        //dropdownlistDomain.Items[0].Value = "";
        //    }
        //    catch
        //    {
        //        ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "alert('Bind Domain failure');", true);
        //    }
        //}

        private void BindDropDownListPriority()
        {
            try
            {
                //PmsSys pmsSys = new PmsSys();
                //pmsSys.Vid = "PM";
                //pmsSys.Type = "Priority";

                PmsSysBiz      pmsSysBiz  = new PmsSysBiz();
                IList <PmsSys> pmsSysList = pmsSysBiz.SelectData1ByType("PM", "Priority");

                dropdownlistPriority.DataSource     = pmsSysList;
                dropdownlistPriority.DataTextField  = "Data1";
                dropdownlistPriority.DataValueField = "Data1";
                dropdownlistPriority.DataBind();

                QWeb.SelectItem(dropdownlistPriority, "Normal");

                //dropdownlistPriority.Items.Insert(0, new ListItem());
                //dropdownlistPriority.Items[0].Text = "";
                //dropdownlistPriority.Items[0].Value = "";
            }
            catch
            {
                Msgbox("Bind Priority failure!");
            }
        }
コード例 #2
0
ファイル: CreateService.aspx.cs プロジェクト: enamewang/pms
        private void BindDropDownListPriority()
        {
            try
            {
                PmsSysBiz      pmsSysBiz  = new PmsSysBiz();
                IList <PmsSys> pmsSysList = pmsSysBiz.SelectData1ByType("PM", "Priority");

                dropdownlistPriority.DataSource     = pmsSysList;
                dropdownlistPriority.DataTextField  = "Data1";
                dropdownlistPriority.DataValueField = "Data1";
                dropdownlistPriority.DataBind();
                QWeb.SelectItem(dropdownlistPriority, "Normal");
            }
            catch
            {
                Msgbox("Bind Priority failure!");
            }
        }