MyLesson/ServiceUser/qingjia_List.aspx.cs
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;
namespace MyLesson.ServiceUser
{
public partial class qingjia_List : UserForm
{
string str = ConfigurationManager.ConnectionStrings["PersonResourceConnectionString"].ConnectionString;
protected void Page_Load(object sender, EventArgs e)
{
this.ValidateLogin();
if (!this.IsPostBack)
{
this.InitForm();
}
}
#region 窗体内部函数
/// <summary>
/// 初始化窗体内容
/// </summary>
public void InitForm()
{
this.InitGridForm();
}
/// <summary>
/// 初始化列表信息 若使用的话不能删除此函数
/// </summary>
private void InitGridForm()
{
//PRDataContext pr = new PRDataContext();
//var DataSource = pr.Inf_Dept.Where(s => s.DeptID.Contains(this.txtDeptID.Text.Trim()) && s.DeptName.Contains(this.txtDeptName.Text.Trim()));
//this.InitAdoPage(DataSource.Count());
//DataSource = DataSource.Skip(int.Parse(this.Ado_PageSize.Value) * (int.Parse(this.Ado_PageIndex.Text) - 1)).Take(int.Parse(this.Ado_PageSize.Value));
//this.dgList.DataSource = DataSource;
//this.dgList.DataBind();
SqlConnection conn = new SqlConnection(str);
conn.Open();
string sql = "select * from tb_qingjia where bm='" + Session["deptid"].ToString() + "' ";
if (!string.IsNullOrEmpty(Request.QueryString["id"]))
{ sql = "select * from tb_qingjia where bm='" + Session["deptid"].ToString() + "'"; }
SqlCommand cmd = new SqlCommand(sql, conn);
DataSet ds = new DataSet();
SqlDataAdapter sdr = new SqlDataAdapter(cmd);
sdr.Fill(ds);
dgList.DataSource = ds;
后面还有 148 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
