焊接管理,补充公司级树
This commit is contained in:
@@ -11,6 +11,22 @@ namespace FineUIPro.Web.HJGL.MaterialManage
|
||||
{
|
||||
public partial class UsingtMatSelect : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
@@ -21,18 +37,52 @@ namespace FineUIPro.Web.HJGL.MaterialManage
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
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 UsingMat.UsingMatId, UsingMat.ProjectId, UsingMat.UsePosition,
|
||||
UsingMat.WeldId,UsingMat.UsingPlanId,ISNULL(UsingMat.Amount,0) AS Amount,
|
||||
ISNULL(UsingMat.TwoAmount,0) AS TwoAmount,UsingMat.UsingMan, UsingMat.UsingDate,
|
||||
@@ -57,7 +107,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
|
||||
LEFT JOIN dbo.Weld_UnitStore unitStore ON unitStore.UnitStoreId = stockIn.UnitStoreId
|
||||
WHERE UsingMat.ProjectId=@ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
if (!string.IsNullOrEmpty(this.txtWelderCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND Welder.WED_Code LIKE @WelderCode";
|
||||
@@ -159,7 +209,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
|
||||
|
||||
protected void btnModify_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_UsingMatMenuId, BLL.Const.BtnModify))
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.CLGL_UsingMatMenuId, BLL.Const.BtnModify))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Grid1.SelectedRowID))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user