Beispiel #1
0
 /// <summary>
 /// 更新T_SYS_ROLES
 /// </summary>
 public virtual bool Update(RolesOR roles)
 {
     string sql = "update T_SYS_ROLE set  ROLE_NAME = @ROLE_NAME,  ROLE_DESC = @ROLE_DESC where ROLE_ID= @ROLE_ID";
     return db.ExecuteNoQuery(sql,
         db.GetDataParameter("@ROLE_ID", roles.Guid),
         db.GetDataParameter("@ROLE_NAME", roles.RoleName),
         db.GetDataParameter("@ROLE_DESC", roles.RoleDesc)) > 0;
 }
Beispiel #2
0
        /// <summary>
        /// 插入T_SYS_ROLES
        /// </summary>
        public virtual bool Insert(RolesOR roles)
        {
            string sql = "insert into T_SYS_ROLE (ROLE_ID, ROLE_NAME, ROLE_DESC) values (@ROLE_ID, @ROLE_NAME, @ROLE_DESC)";

            return db.ExecuteNoQuery(sql,
                db.GetDataParameter("@ROLE_ID", Guid.NewGuid().ToString()),
                db.GetDataParameter("@ROLE_NAME", roles.RoleName),
                db.GetDataParameter("@ROLE_DESC", roles.RoleDesc))>0;
        }
Beispiel #3
0
 private RolesOR setValue()
 {
     RolesOR T_SY = new RolesOR();
     if (Request.QueryString["id"] != null)
         T_SY.Guid = Request.QueryString["id"].ToString();
     T_SY.RoleName = txtName.Text;//角色名称
     T_SY.RoleDesc = txtROLE_DESC.Text;//角色说明
     return T_SY;
 }