Example #1
0
        /// <summary>
        ///获取拥有的菜单权限
        /// </summary>
        /// <param name="innovator"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        public static Item GetMenuAuthByIdentity(Innovator innovator, string id)
        {
            string str = "";
            //获取权限字符串
            var enumDescriptions = EnumDescription.GetFieldTexts <SystemMenuList>(true);

            if (enumDescriptions != null && enumDescriptions.Count > 0)
            {
                for (int i = 0; i < enumDescriptions.Count; i++)
                {
                    if (i == (enumDescriptions.Count - 1))
                    {
                        str = str + "'" + enumDescriptions[i].FieldName + "'";
                    }
                    else
                    {
                        str = str + "'" + enumDescriptions[i].FieldName + "',";
                    }
                }
            }
            string amlStr = "<AML><Item type='ITEMTYPE' action='get'><keyed_name condition ='in'>" + str + "</keyed_name><Relationships><Item type='TOC Access' action='get'><related_id condition='in'>" + id + "</related_id></Item></Relationships></Item></AML>";
            //获取是否有角色管理访问权限
            //string strSql = "select g.KEYED_NAME from innovator.ITEMTYPE g inner join  innovator.TOC_ACCESS t on g.ID = t.SOURCE_ID inner join innovator.[IDENTITY] y on t.RELATED_ID = y.ID where y.ID = '" + id + "'";
            Item result = innovator.applyAML(amlStr);

            return(result);
        }
Example #2
0
 /// <summary>
 ///充值货币类型绑定
 /// </summary>
 private void DropDownDataBind()
 {
     ddlScoreType.DataSource     = EnumDescription.GetFieldTexts(typeof(AppConfig.PayScoreType));
     ddlScoreType.DataTextField  = "Description";
     ddlScoreType.DataValueField = "EnumValue";
     ddlScoreType.DataBind();
 }
Example #3
0
 /// <summary>
 /// 页面加载
 /// </summary>
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         txtStartDate.Text                 = DateTime.Now.ToString("yyyy-MM-") + "01";
         txtEndDate.Text                   = DateTime.Now.ToString("yyyy-MM-dd");
         ddlGlobalShareInfo.DataSource     = EnumDescription.GetFieldTexts(typeof(AppConfig.ShareType));
         ddlGlobalShareInfo.DataTextField  = "Description";
         ddlGlobalShareInfo.DataValueField = "EnumValue";
         ddlGlobalShareInfo.DataBind();
         ShareInfoDataBind();
     }
 }
 /// <summary>
 /// 页面加载
 /// </summary>
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack)
     {
         return;
     }
     ddlAwardType.DataSource     = EnumDescription.GetFieldTexts(typeof(AppConfig.AwardType));
     ddlAwardType.DataTextField  = "Description";
     ddlAwardType.DataValueField = "EnumValue";
     ddlAwardType.DataBind();
     ddlAwardType.Items.Insert(0, new ListItem("全部返利类型", "0"));
     BindData();
 }
        /// <summary>
        /// 获取需要填写信息
        /// </summary>
        public string GetNeedInfo(int NeedInfo)
        {
            string str = "";
            IList <EnumDescription> list = EnumDescription.GetFieldTexts(typeof(EnumerationList.MallNeedInfo));

            for (int i = 0; i < list.Count; i++)
            {
                EnumDescription em  = list[i];
                int             num = NeedInfo & (Convert.ToInt32(em.EnumValue));
                if (num == (Convert.ToInt32(em.EnumValue)))
                {
                    str = str + em.Description + "/";
                }
            }
            return(str == "" ? "不需要" : str.Substring(0, str.Length - 1));
        }
        /// <summary>
        /// 页面加载
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            base.moduleID = 1002;
            if (!IsPostBack)
            {
                ddlAwardType.DataSource     = EnumDescription.GetFieldTexts(typeof(AppConfig.AwardType));
                ddlAwardType.DataTextField  = "Description";
                ddlAwardType.DataValueField = "EnumValue";
                ddlAwardType.DataBind();
                ddlAwardType.Items.Insert(0, new ListItem("全部返利类型", "0"));

                txtStartDate.Text = DateTime.Now.ToString("yyyy-MM-dd");
                txtEndDate.Text   = DateTime.Now.ToString("yyyy-MM-dd");

                BindData();
            }
        }
Example #7
0
        /// <summary>
        /// 绑定商品类型
        /// </summary>
        private void DataMallType()
        {
            ///绑定商品类型
            DataSet ds = FacadeManage.aideNativeWebFacade.GetAllAwardType();

            ddlTypeID.DataSource     = ds.Tables[0];
            ddlTypeID.DataTextField  = "TypeName";
            ddlTypeID.DataValueField = "TypeID";
            ddlTypeID.DataBind();

            ///绑定需要填写信息
            IList <EnumDescription> NeedInfo = EnumDescription.GetFieldTexts(typeof(EnumerationList.MallNeedInfo));

            cbNeedInfo.DataSource     = NeedInfo;
            cbNeedInfo.DataValueField = "EnumValue";
            cbNeedInfo.DataTextField  = "Description";
            cbNeedInfo.DataBind();
            for (int i = 0; i < cbNeedInfo.Items.Count; i++)
            {
                cbNeedInfo.Items[i].Selected = true;
            }
        }
        /// <summary>
        /// 获取授权模块列表
        /// </summary>
        /// <returns></returns>
        public JsonResult GetAgentModuleList()
        {
            var retModel = new JsonReturnModel();

            try
            {
                var enumDescriptions = EnumDescription.GetFieldTexts <AgentModule>(true);
                var selectList       = new List <SelectListItem>();

                selectList.AddRange(
                    enumDescriptions.ToArray().Select(
                        m => new SelectListItem()
                {
                    Text = m.EnumDisplayText, Value = m.FieldName
                }));
                retModel.data = selectList;
            }
            catch (Exception ex)
            {
                retModel.AddError("errorMessage", ex.Message);
            }
            return(Json(retModel, JsonRequestBehavior.AllowGet));
        }
Example #9
0
 public static System.Collections.Generic.IList <EnumDescription> GetMemberOrderStatusList(System.Type t)
 {
     return(EnumDescription.GetFieldTexts(t));
 }
Example #10
0
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        public static IList <EnumDescription> GetServiceAreaList(Type t)
        {
            IList <EnumDescription> list = EnumDescription.GetFieldTexts(t);

            return(list);
        }
Example #11
0
 public static IList <EnumDescription> GetGamePropertyKindList(Type t)
 {
     return(EnumDescription.GetFieldTexts(t));
 }
Example #12
0
 public static System.Collections.Generic.IList <EnumDescription> GetGamePropertyKindList(System.Type t)
 {
     return(EnumDescription.GetFieldTexts(t));
 }
Example #13
0
 public static IList <EnumDescription> GetUserRightList(Type t)
 {
     return(EnumDescription.GetFieldTexts(t));
 }
Example #14
0
        /// <summary>
        /// 获取支持类型列表
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        public static IList <EnumDescription> GetSupporTypeList(Type t)
        {
            IList <EnumDescription> list = EnumDescription.GetFieldTexts(t);

            return(list);
        }
Example #15
0
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        public static IList <EnumDescription> GetNoticeLocationList(Type t)
        {
            IList <EnumDescription> list = EnumDescription.GetFieldTexts(t);

            return(list);
        }
 public static IList <EnumDescription> GetNoticeLocationList(Type t)
 {
     return(EnumDescription.GetFieldTexts(t));
 }
 public static IList <EnumDescription> GetIssueAreaList(Type t)
 {
     return(EnumDescription.GetFieldTexts(t));
 }
 public static System.Collections.Generic.IList <EnumDescription> GetIssueAreaList(System.Type t)
 {
     return(EnumDescription.GetFieldTexts(t));
 }
Example #19
0
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        public static IList <EnumDescription> GetMemberOrderStatusList(Type t)
        {
            IList <EnumDescription> list = EnumDescription.GetFieldTexts(t);

            return(list);
        }
Example #20
0
 public static System.Collections.Generic.IList <EnumDescription> GetPermissionList()
 {
     return(EnumDescription.GetFieldTexts(typeof(Permission)));
 }
 public static IList <EnumDescription> GetPermissionList()
 {
     return(EnumDescription.GetFieldTexts(typeof(Permission)));
 }
Example #22
0
        /// <summary>
        /// 获取管理权限集合
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        public static IList <EnumDescription> GetMasterRightList(Type t)
        {
            IList <EnumDescription> list = EnumDescription.GetFieldTexts(t);

            return(list);
        }
 public static IList <EnumDescription> GetSupporTypeList(Type t)
 {
     return(EnumDescription.GetFieldTexts(t));
 }