コード例 #1
0
        protected List <DTO.DataItem> GetMemberTypeFor(string MemberType)
        {
            DataCenterBiz       biz  = new DataCenterBiz();
            List <DTO.DataItem> item = new List <DTO.DataItem>();
            List <DTO.DataItem> res  = biz.GetMemberType("", false);

            switch (MemberType)
            {
            case "1":
                item = res.Where(x => x.Id == "1").ToList();
                break;

            case "2":
            case "3":
            case "7":
                item = res.Where(x => x.Id == "2" || x.Id == "3" || x.Id == "7").ToList();
                break;

            case "4":
            /*item = res.Where(x => x.Id == "4").ToList();
             * break;*/
            case "5":
            case "6":
                item = res.Where(x => x.Id == "5" || x.Id == "6" || x.Id == "4").ToList();
                break;

            default:
                item = res;
                break;
            }
            return(item);
        }
コード例 #2
0
        protected void SetMemberType()
        {
            DataCenterBiz biz = new DataCenterBiz();
            var           ls  = biz.GetMemberType("ทั้งหมด", false);

            ls[1].Name = NameMemberType1;
            BindToDDL(ddlUserType, ls.ToArray());
        }