Meeting/Admin/Models/getclass.ashx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
namespace WebApplication.Admin.Models
{
/// <summary>
/// getclass 的摘要说明
/// </summary>
public class getclass : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
try
{
string html = string.Empty;
html += "<option value='0'>-无(作为一级栏目)-</option>";
if (context.Request["id"] != null)
{
BLL.Models.GZXX_Class cbll = new BLL.Models.GZXX_Class();
SqlParameter[] param = new SqlParameter[]{
new SqlParameter("@ChannelID",SqlDbType.Int)
};
param[0].Value = int.Parse(context.Request["id"].ToString());
DataTable dt = cbll.GetDataTable(" where channelid = @ChannelID and ParentClassID = 0", param);
for (int i = 0; i < dt.Rows.Count; i++)
{
html += "<option value='" + dt.Rows[i]["ClassID"].ToString() + "'>" + dt.Rows[i]["ClassName"].ToString() + "</option>";
}
}
context.Response.Write("操作成功!@@@" + html);
}
catch (Exception)
{
context.Response.Write("error@@@");
}
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
