private void Button_Click_4(object sender, RoutedEventArgs e) { role r = new role() { roleDM = "123", roleName = "test", system = "1", guid = Guid.NewGuid().ToString() }; MessageBox.Show(UserRole.Add(r).ToString()); }
bool Save(role r) { List <system> ss = Project.selectByname("智能扭矩校验台"); if (ss == null || ss.Count <= 0) { MessageAlert.Error("该系统名称尚未添加到数据库!\n 请联系管理员!"); return(false); } r.system = ss.FirstOrDefault().id.ToString(); r.guid = Guid.NewGuid().ToString(); return(UserRole.Add(r)); }
public static bool Add(RoleInfo roleInfo) { return(dal.Add(roleInfo)); }
public void Add(UserRole objUserRole) { UserRoleobj.Add(objUserRole); }