/// <summary> /// 插入数据 /// </summary> /// <param name="roleFunctionEntities">数据实体</param> public void BatchInserFunction(RoleFunctionVO roleFunction) { using (ITransaction transaction = TransactionManager.Create()) { this.BatchDeleteFunction(roleFunction.RoleId); List <RoleFunctionEntity> roleFunctionEntities = new List <RoleFunctionEntity>(); if (roleFunction.FunctionList != null && roleFunction.FunctionList.Count > 0) { foreach (var item in roleFunction.FunctionList) { roleFunctionEntities.Add(new RoleFunctionEntity() { RoleId = roleFunction.RoleId, FunctionId = item, Creator = roleFunction.Creator, CreateTime = DateTime.Now }); } RoleFunctionDA.BatchInserFunction(roleFunctionEntities); } transaction.Complete(); } }
public JsonResult BatchInsertRoleFunctionList(RoleFunctionVO roleFunction) { roleFunction.Creator = AuthManager.ReadUserInfo().UserSysNo; RoleFunctionService.BatchInserFunction(roleFunction); return(Json(this.Ok(true))); }