Ejemplo n.º 1
0
    private void selSysModID()
    {
        string          strSysModID = "";
        MipSystemModule mip         = new MipSystemModule();

        mip.SQL  = " select * from SystemModule ORDER BY iOrder ";
        mip.KEY  = "SysModID";
        mip.NAME = "ModuleDesc";
        if (!string.IsNullOrEmpty(Request.QueryString["_selSystemModule"]))
        {
            strSysModID = MDS.Utility.NUtility.trimBad(Request.QueryString["_selSystemModule"]);
        }
        List <CodeVo> codeVoList = mip.getCodeListByLevel();

        //設定模組
        _selSystemModule.Items.Add(new ListItem("全部", ""));

        foreach (CodeVo codeVo in codeVoList)
        {
            string   codeVo_name = MDS.Utility.NUtility.HtmlEncode(MDS.Utility.NUtility.trimBad(codeVo.name));
            string   codeVo_key  = MDS.Utility.NUtility.HtmlEncode(MDS.Utility.NUtility.trimBad(codeVo.key));
            ListItem listItem    = new ListItem(
                codeVo_name,
                codeVo_key
                );

            _selSystemModule.Items.Add(listItem);
        }

        if (!string.IsNullOrEmpty(Request.QueryString["_selSystemModule"]))
        {
            _selSystemModule.Items.FindByValue((Request.QueryString["_selSystemModule"])).Selected = true;
        }
    }
    private void selSystemModule()
    {
        mip      = new MipSystemModule();
        mip.SQL  = " select * from SystemModule ORDER BY iOrder ";
        mip.KEY  = "SysModID";
        mip.NAME = "ModuleDesc";
        List <CodeVo> codeVoList = mip.getCodeListByLevel();

        _sysModID.Items.Add(new ListItem(MDS.Utility.NUtility.HtmlEncode("請選擇"), MDS.Utility.NUtility.HtmlEncode("")));
        foreach (CodeVo codeVo in codeVoList)
        {
            ListItem listItem = new ListItem(MDS.Utility.NUtility.HtmlEncode(codeVo.name), MDS.Utility.NUtility.HtmlEncode(codeVo.key));
            if (codeVo.key.Equals(strSysModID))
            {
                listItem.Selected = true;
            }
            _sysModID.Items.Add(listItem);
        }
    }
    private void selPic()
    {
        mip     = new MipSystemModule();
        mip.SQL = " select DISTINCT Pic , (case when Pic IS NULL  then '無' else Pic end)as Picc from SystemFunction ";

        mip.KEY  = "Pic";
        mip.NAME = "Picc";

        List <CodeVo> codeVoList = mip.getCodeListByLevel();

        _pic.Items.Add(new ListItem(MDS.Utility.NUtility.HtmlEncode("請選擇"), MDS.Utility.NUtility.HtmlEncode("")));
        foreach (CodeVo codeVo in codeVoList)
        {
            ListItem listItem = new ListItem(MDS.Utility.NUtility.HtmlEncode(codeVo.name), MDS.Utility.NUtility.HtmlEncode(codeVo.key));
            if (codeVo.key.Equals(strPic))
            {
                listItem.Selected = true;
            }
            _pic.Items.Add(listItem);
        }
    }
Ejemplo n.º 4
0
    private void selIdisPlay()
    {
        mip     = new MipSystemModule();
        mip.SQL = " select DISTINCT iDisplay ,(case when iDisplay = 1 then '是' else '否' end)as iDisplayy   from SystemFunction ORDER BY iDisplay Desc  ";

        mip.KEY  = "iDisplay";
        mip.NAME = "iDisplayy";

        List <CodeVo> codeVoList = mip.getCodeListByLevel();

        _iDisplay.Items.Add(new ListItem(MDS.Utility.NUtility.HtmlEncode("請選擇"), MDS.Utility.NUtility.HtmlEncode("")));
        foreach (CodeVo codeVo in codeVoList)
        {
            ListItem listItem = new ListItem(MDS.Utility.NUtility.HtmlEncode(codeVo.name), MDS.Utility.NUtility.HtmlEncode(codeVo.key));
            if (codeVo.key.Equals(striDisplay))
            {
                listItem.Selected = true;
            }
            _iDisplay.Items.Add(listItem);
        }
    }