Commit 2319f103 authored by 黄奎's avatar 黄奎

页面修改

parent 81c955cb
......@@ -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="extModel"></param>
/// <param name="model"></param>
/// <returns></returns>
public bool SetAccount(RB_Account_ViewModel extModel)
public bool SetAccountModule(RB_Account_ViewModel model)
{
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
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment