HPManage/BaseManage/Mate/OpenMate.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using System.Data;
using System.Web.UI.WebControls;
public partial class BaseManage_Mate_OpenMate : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
addnew.Visible = RoleControl("|1114_2|");//权限判断
DataBindData("");
BindTree(this.ListTreeView.Nodes, 0);
}
}
protected void DataBindData(string Contion)
{
try
{
BLL.MaterialInfor SIBll = new BLL.MaterialInfor();
StringBuilder strSql = new StringBuilder();
strSql.Append(" MatState<>2 ");
strSql.Append(" and MatName like '%" + txtMatName.Value.Trim() + "%' ");
if (Request.QueryString["Type"] != null)
{
strSql.Append(" and MatNatrue=" + Request.QueryString["Type"].ToString());
}
if (Contion != "")
{
strSql.Append(Contion);
}
DataSet ds_Cus = SIBll.GetList(strSql.ToString());
DataTable dt = ds_Cus.Tables[0];
AddPages(rpt, AspNetPager1, dt);
}
catch (Exception ex)
{
Common.WriteLog.CreateLog(ex, "BaseManage_Mate_OpenMate", "DataBindData", Session["TrueName"].ToString());
}
}
protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
{
this.AspNetPager1.CurrentPageIndex = e.NewPageIndex;
DataBindData("");
}
//查询
protected void btnQuery_Click(object sender, EventArgs e)
{
DataBindData("");
}
private void BindTree(TreeNodeCollection Nds, int IDStr)
{
try
{
BLL.MateTypeInfor depart = new BLL.MateTypeInfor();
DataSet dtDepart = depart.GetList("MTParentID=" + IDStr.ToString() + " and (MTState=0 or MTState=1) order by MTypeNumber asc");
DataTable dt = dtDepart.Tables[0];
foreach (DataRow item in dt.Rows)
后面还有 27 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
