Ejemplo n.º 1
0
 /// <summary>
 ///  创建权限类
 /// </summary>
 /// <param name="code">权限编码</param>
 /// <param name="type">操作类型</param>
 /// <param name="permissionenum">权限枚举</param>
 /// <param name="content">备注</param>
 private QcPermissionEnum(string permissionenum, string type = "", string content = "") :
     base(null, "QC_USE_PERMISSIONENUM")
 {
     PermisssionCode = QcPermissionEnum.GetNextCode();
     OperationType   = type;
     PermisssionEnum = permissionenum;
     Content         = content;
 }
Ejemplo n.º 2
0
        public override bool Update(QcDbTransaction trans = null)
        {
            if (IsNew())
            {
                this.Code = QcPermissionEnum.GetNextCode();
            }
            bool ret = base.Update(trans);

            if (ret == false && IsNew())
            {
                this.Code = "";
            }
            //新建的加入到列表
            if (ret && !Permissions.Contains(this))
            {
                Permissions.Add(this);
            }
            return(ret);
        }