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
2319f103
Commit
2319f103
authored
Sep 21, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
81c955cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
12 deletions
+59
-12
AccountModule.cs
Edu.Module.User/AccountModule.cs
+22
-7
ManagerModule.cs
Edu.Module.User/ManagerModule.cs
+37
-5
No files found.
Edu.Module.User/AccountModule.cs
View file @
2319f103
...
...
@@ -3,6 +3,7 @@ using Edu.Repository.User;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Module.User
{
...
...
@@ -26,7 +27,6 @@ namespace Edu.Module.User
return
accountRepository
.
GetAccountListRepository
(
query
);
}
/// <summary>
/// 获取账号分页列表
/// </summary>
...
...
@@ -43,15 +43,30 @@ namespace Edu.Module.User
/// <summary>
/// 添加修改账号
/// </summary>
/// <param name="
extM
odel"></param>
/// <param name="
m
odel"></param>
/// <returns></returns>
public
bool
SetAccount
(
RB_Account_ViewModel
extM
odel
)
public
bool
SetAccount
Module
(
RB_Account_ViewModel
m
odel
)
{
bool
flag
=
false
;
if
(
model
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Account_ViewModel
.
Account
),
model
.
Account
.
Trim
()
},
{
nameof
(
RB_Account_ViewModel
.
AccountType
),
model
.
AccountType
},
{
nameof
(
RB_Account_ViewModel
.
AccountId
),
model
.
AccountId
},
{
nameof
(
RB_Account_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Account_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
};
flag
=
accountRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Account_ViewModel
.
Id
),
model
.
Id
));
}
else
{
var
newId
=
accountRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
flag
=
newId
>
0
;
}
return
flag
;
}
}
}
}
\ No newline at end of file
Edu.Module.User/ManagerModule.cs
View file @
2319f103
using
Edu.Model.ViewModel.User
;
using
Edu.Common.Enum
;
using
Edu.Model.ViewModel.User
;
using
Edu.Repository.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Module.User
{
...
...
@@ -46,18 +46,50 @@ namespace Edu.Module.User
/// <returns></returns>
public
bool
SetManagerModule
(
RB_Manager_ViewModel
model
)
{
bool
flag
=
false
;
bool
flag
;
if
(
model
.
MId
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Manager_ViewModel
.
MName
),
model
.
MName
.
Trim
()},
{
nameof
(
RB_Manager_ViewModel
.
MTel
),
model
.
MTel
.
Trim
()},
{
nameof
(
RB_Manager_ViewModel
.
MHead
),
model
.
MHead
},
{
nameof
(
RB_Manager_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
};
flag
=
managerRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Manager_ViewModel
.
MId
),
model
.
MId
));
}
else
{
var
newId
=
managerRepository
.
Insert
(
model
);
model
.
MId
=
newId
;
flag
=
newId
>
0
;
}
return
flag
;
}
/// <summary>
/// 根据编号获取管理者实体
/// </summary>
/// <param name="MId"></param>
/// <returns></returns>
public
RB_Manager_ViewModel
GetManagerModule
(
object
MId
)
{
return
managerRepository
.
GetEntity
<
RB_Manager_ViewModel
>(
MId
);
}
/// <summary>
/// 删除管理者
/// </summary>
/// <param name="Mid"></param>
/// <returns></returns>
public
bool
RemoveManagerModule
(
int
Mid
)
{
return
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Manager_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Delete
}
};
bool
flag
=
managerRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Manager_ViewModel
.
MId
),
Mid
));
return
flag
;
}
}
}
\ No newline at end of file
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