Beispiel #1
0
        /// <summary>
        /// 修改用户组
        /// </summary>
        /// <param name="roleInfo">角色实例</param>
        /// <returns></returns>
        public int UpdateRole(OA.Model.RoleInfo roleInfo)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.AppendLine(" update OA_Role ");
            strSql.AppendLine(" set RoleCode=@RoleCode,RoleName=@RoleName ");
            strSql.AppendLine(" where RoleID=@RoleID ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@RoleID",   SqlDbType.VarChar,   36),
                new SqlParameter("@RoleCode", SqlDbType.NVarChar, 100),
                new SqlParameter("@RoleName", SqlDbType.NVarChar, 100)
            };
            parameters[0].Value = roleInfo.RoleID;
            parameters[1].Value = roleInfo.RoleCode;
            parameters[2].Value = roleInfo.RoleName;

            int obj = DBAccess.ExecuteNonQuery(DB.Type, DB.ConnectionString, CommandType.Text, strSql.ToString(), parameters);

            if (obj == 0)
            {
                return(0);
            }
            else
            {
                return(obj);
            }
        }
Beispiel #2
0
 /// <summary>
 /// 修改用户组
 /// </summary>
 /// <param name="roleInfo">角色实例</param>
 /// <returns></returns>
 public int UpdateRole(OA.Model.RoleInfo roleInfo)
 {
     return(iUserInfoDAL.UpdateRole(roleInfo));
 }
Beispiel #3
0
 /// <summary>
 /// 添加用户组
 /// </summary>
 /// <param name="roleInfo">角色实例</param>
 /// <returns></returns>
 public int AddRole(OA.Model.RoleInfo roleInfo)
 {
     return(iUserInfoDAL.AddRole(roleInfo));
 }