Exemple #1
0
        /// <summary>
        /// 取得所有權限資料
        /// </summary>
        protected void GetAllData()
        {
            //取得mapping資料
            var authService = new AuthClient();

            ViewState["mappings"] = temp = authService.GetAuthMappings(type).ToList();
            //List<OBShopWeb.AuthService.AuthMapping> aa = authService.GetAuthMappings(type);

            //取得function資料0預設為物流系統
            ViewState["functions"] = authService.GetAuthFunctions(type).OrderBy(x => x.Title).ToList();

            if (!CB_顯示姓名.Checked)
            {
                ltbMapping.DataSource = ViewState["mappings"];
                ltbMapping.DataBind();
            }
            else
            {
                ltbMapping.Items.Clear();

                //增加顯示姓名(2013-1104新增)-----------------------
                foreach (var i in temp)
                {
                    var ADI = ADVC.Verify("OBDesign.com.tw", i.Account, "");

                    ListItem aa = new ListItem();
                    aa.Value = i.Account;
                    aa.Text  = i.Account + " (" + ADI.Fullname + ")";
                    ltbMapping.Items.Add(aa);
                }
                //----------------------------------------------
            }

            ltbFunction.DataSource = ViewState["functions"];
            ltbFunction.DataBind();
        }