예제 #1
0
        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));
        }
예제 #3
0
 public static bool Add(RoleInfo roleInfo)
 {
     return(dal.Add(roleInfo));
 }
예제 #4
0
 public void Add(UserRole objUserRole)
 {
     UserRoleobj.Add(objUserRole);
 }