示例#1
0
文件: Rest.cs 项目: zicjin/Board
 public int RoleAdd(mRole newrole)
 {
     try {
         return user_sub.RoleAdd(newrole);
     } catch (Exception) {
         return 0;
     }
 }
示例#2
0
        public mRole RoleUpdate(mRole mrole)
        {
            Role role = role_repo.Get(d => d.id == mrole.Id);

            mrole.ToDb(role);
            SubmitChanges();
            return(new mRole(role));
        }
示例#3
0
        public int RoleAdd(mRole mrole)
        {
            Role role = new Role();

            role_repo.Add(mrole.ToDb(role));
            SubmitChanges();
            return(role.id);
        }
示例#4
0
文件: Rest.cs 项目: itiki/Board
 public mRole RoleUpdate(mRole uprole)
 {
     try {
         return(user_sub.RoleUpdate(uprole));
     } catch (Exception) {
         return(null);
     }
 }
示例#5
0
文件: Rest.cs 项目: itiki/Board
 public int RoleAdd(mRole newrole)
 {
     try {
         return(user_sub.RoleAdd(newrole));
     } catch (Exception) {
         return(0);
     }
 }
示例#6
0
文件: Rest.cs 项目: zicjin/Board
 public mRole RoleUpdate(mRole uprole)
 {
     try {
         return user_sub.RoleUpdate(uprole);
     } catch (Exception) {
         return null;
     }
 }
示例#7
0
 public mRole RoleUpdate(mRole mrole)
 {
     Role role = role_repo.Get(d => d.id == mrole.Id);
     mrole.ToDb(role);
     SubmitChanges();
     return new mRole(role);
 }
示例#8
0
 public int RoleAdd(mRole mrole)
 {
     Role role = new Role();
     role_repo.Add(mrole.ToDb(role));
     SubmitChanges();
     return role.id;
 }