示例#1
0
        /// <summary>
        /// 初始化添加/编辑表单
        /// </summary>
        public void Initialize()
        {
            btnAdd.Visible  = false;
            btnEdit.Visible = false;
            btnDel.Visible  = false;


            CreatedByIp.Text   = GlobalHelper.IP;
            CreatedByUser.Text = GlobalHelper.User;
            CreatedByDate.Text = GlobalHelper.Time.ToString();
            try
            {
                ZhuJi.UUMS.IDAL.IRoles          roles     = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.UUMS.NHibernateDAL.Roles)) as ZhuJi.UUMS.IDAL.IRoles;
                IList <ZhuJi.UUMS.Domain.Roles> listRoles = roles.GetObjects();
                foreach (ZhuJi.UUMS.Domain.Roles domainRoles in listRoles)
                {
                    RolesId.Items.Add(new ListItem(domainRoles.RoleName.ToString(), domainRoles.Id.ToString()));
                }
            }
            catch (Exception ex)
            {
                ShowMessage(ex);
            }

            switch (_command)
            {
            case "ADD":
                Add();
                break;

            case "EDIT":
                Edit();
                break;
            }
        }
示例#2
0
 /// <summary>
 /// 初始化查询列表
 /// </summary>
 public void BindGrid()
 {
     try
     {
         ZhuJi.UUMS.IDAL.IRoles roles = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.UUMS.NHibernateDAL.Roles)) as ZhuJi.UUMS.IDAL.IRoles;
         gvList.DataSource = roles.GetObjects(base.Where, base.OrderNo);
         gvList.DataBind();
     }
     catch (Exception ex)
     {
         ShowMessage(ex);
     }
 }
        /// <summary>
        /// 初始化添加/编辑表单
        /// </summary>
        public void Initialize()
        {
            btnAdd.Visible  = false;
            btnEdit.Visible = false;
            btnDel.Visible  = false;
            try
            {
                ZhuJi.UUMS.IDAL.IRoles          roles     = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.UUMS.NHibernateDAL.Roles)) as ZhuJi.UUMS.IDAL.IRoles;
                IList <ZhuJi.UUMS.Domain.Roles> listRoles = roles.GetObjects();
                foreach (ZhuJi.UUMS.Domain.Roles domainRoles in listRoles)
                {
                    RolesId.Items.Add(new ListItem(domainRoles.RoleName.ToString(), domainRoles.Id.ToString()));
                }

                ZhuJi.UUMS.IDAL.IMethodExplain          methodExplain     = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.UUMS.NHibernateDAL.MethodExplain)) as ZhuJi.UUMS.IDAL.IMethodExplain;
                IList <ZhuJi.UUMS.Domain.MethodExplain> listMethodExplain = methodExplain.GetObjects();
                foreach (ZhuJi.UUMS.Domain.MethodExplain domainMethodExplain in listMethodExplain)
                {
                    ExplainId.Items.Add(new ListItem(domainMethodExplain.Title.ToString(), domainMethodExplain.Id.ToString()));
                }
            }
            catch (Exception ex)
            {
                ShowMessage(ex);
            }

            switch (_command)
            {
            case "ADD":
                Add();
                break;

            case "EDIT":
                Edit();
                break;
            }
        }