Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
ad241b2b
Commit
ad241b2b
authored
Oct 12, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
81b1e2b6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
1 deletion
+40
-1
ConvertHelper.cs
Edu.Common/Plugin/ConvertHelper.cs
+26
-0
RB_Role_ViewModel.cs
Edu.Model/ViewModel/System/RB_Role_ViewModel.cs
+14
-1
No files found.
Edu.Common/Plugin/ConvertHelper.cs
View file @
ad241b2b
...
...
@@ -55,5 +55,31 @@ namespace Edu.Common
}
return
timeStr
;
}
/// <summary>
/// 字符串转List
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public
static
List
<
int
>
StringToList
(
object
value
)
{
List
<
int
>
list
=
new
List
<
int
>();
if
(
value
!=
null
&&
!
string
.
IsNullOrEmpty
(
value
.
ToString
()))
{
var
tempArray
=
value
.
ToString
().
Split
(
','
);
if
(
tempArray
!=
null
&&
tempArray
.
Length
>
0
)
{
foreach
(
var
item
in
tempArray
)
{
Int32
.
TryParse
(
item
,
out
int
NewValue
);
if
(
NewValue
>
0
)
{
list
.
Add
(
NewValue
);
}
}
}
}
return
list
;
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/System/RB_Role_ViewModel.cs
View file @
ad241b2b
namespace
Edu.Model.ViewModel.System
using
System.Collections.Generic
;
namespace
Edu.Model.ViewModel.System
{
/// <summary>
/// 系统角色视图实体类
...
...
@@ -20,5 +22,16 @@
return
Common
.
ConvertHelper
.
FormatTime
(
this
.
CreateDate
);
}
}
/// <summary>
/// 选中的菜单列表
/// </summary>
public
List
<
int
>
CheckMenuList
{
get
{
return
Common
.
ConvertHelper
.
StringToList
(
this
.
RoleAuth
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment