焊接管理,补充公司级树
This commit is contained in:
@@ -9,6 +9,22 @@ namespace FineUIPro.Web.HJGL.MaterialManage
|
||||
{
|
||||
public partial class RecycleMat : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
@@ -19,18 +35,51 @@ namespace FineUIPro.Web.HJGL.MaterialManage
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
//this.GetButtonPower();
|
||||
}
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
//绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
|
||||
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
//{
|
||||
// btnNew.Hidden = true;
|
||||
//}
|
||||
//this.GetButtonPower();
|
||||
this.BindGrid();
|
||||
}
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
string strSql = @"SELECT m.UsingMatId, m.ProjectId, m.UsePosition, m.WeldId,weld.ConsumablesCode,weld.ConsumablesName,weld.SteelFormat, m.UsingPlanId,
|
||||
m.Amount,m.TwoAmount,usingMat.WED_Code AS UsingMan, m.UsingDate,m.Warrantybook,m.Number,r.RecycleAmount,
|
||||
r.RecycleDate,storeman.UserName as StoreName,welder.WED_Name AS RecycleMan,r.ReturnMatTop,
|
||||
@@ -50,7 +99,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
|
||||
listStr.Add(new SqlParameter("@WelderCode", "%" + this.txtWelderCode.Text.Trim() + "%"));
|
||||
}
|
||||
strSql += " AND m.ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
if (!string.IsNullOrEmpty(this.txtWelderCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND weld.ConsumablesCode LIKE @ConsumablesCode";
|
||||
|
||||
Reference in New Issue
Block a user