public int Add(Model.tab_roles roles) { StringBuilder strsql = new StringBuilder(); strsql.Append("insert into tab_roles(RoleInfo,RoleName) values( "); strsql.AppendFormat("'{0}',", roles.RoleInfo); strsql.AppendFormat("'{0}')", roles.RoleName); return(sql.ExecuteNonQuery(strsql.ToString())); }
public System.Data.DataTable GetAny(Model.tab_roles roles) { StringBuilder strsql = new StringBuilder(); strsql.Append("select * from tab_roles where "); strsql.AppendFormat("RoleID='{0}'", roles.RoleID); strsql.AppendFormat("or RoleInfo='{0}'", roles.RoleInfo); strsql.AppendFormat("or RoleName='{0}'", roles.RoleName); return(sql.ExecuteDataSet(strsql.ToString()).Tables[0]); }
public int update(Model.tab_roles roles) { StringBuilder strsql = new StringBuilder(); strsql.Append("update tab_roles set "); strsql.AppendFormat("roleName='{0}',", roles.RoleName); strsql.AppendFormat("roleContent='{0}',", roles.RoleContent); strsql.AppendFormat("roleInfo='{0}' ", roles.RoleInfo); strsql.AppendFormat("where roleID={0}", roles.RoleID); return(sql.ExecuteNonQuery(strsql.ToString())); }
public int update(Model.tab_roles ro) { return(itu.update(ro)); }
/// <summary> /// 添加权限 /// </summary> /// <param name="roles"></param> /// <returns></returns> public int Add(Model.tab_roles roles) { return(itu.Add(roles)); }
/// <summary> /// 根据选择查看不同的权限信息 /// </summary> /// <param name="roles"></param> /// <returns></returns> public DataTable GetAny(Model.tab_roles roles) { return(itu.GetAny(roles)); }