焊接管理,补充公司级树

This commit is contained in:
2025-04-14 15:31:57 +08:00
parent c8b553efc6
commit bb10b1f54e
111 changed files with 6980 additions and 4039 deletions
@@ -8,6 +8,22 @@ namespace FineUIPro.Web.HJGL.MaterialManage
{
public partial class UnitStore : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@@ -18,14 +34,48 @@ 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.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
BindUnit(drpUnit);
BindUnit(drpUnitId);
// 绑定表格
BindGrid();
}
}
private void InitDropDownList()
{
BindUnit(drpUnit);
BindUnit(drpUnitId);
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
//this.GetButtonPower();
this.BindGrid();
}
#endregion
#region
@@ -33,7 +83,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
{
dropName.DataTextField = "UnitName";
dropName.DataValueField = "UnitId";
dropName.DataSource = UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, string.Empty);
dropName.DataSource = UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, string.Empty);
dropName.DataBind();
Funs.FineUIPleaseSelect(dropName);
}
@@ -45,12 +95,16 @@ namespace FineUIPro.Web.HJGL.MaterialManage
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT s.UnitStoreId,s.UnitId,s.UnitStoreCode,s.UnitStoreName,s.StorePosition ,u.UnitName
FROM dbo.Weld_UnitStore s
LEFT JOIN dbo.Base_Unit u ON u.UnitId = s.UnitId
WHERE ProjectId=@ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (this.drpUnit.SelectedValue != BLL.Const._Null)
{
strSql += " AND s.UnitId = @UnitId";
@@ -125,7 +179,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
/// <param name="e"></param>
protected void btnDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_UnitStoreMenuId, Const.BtnDelete))
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_UnitStoreMenuId, Const.BtnDelete))
{
if (judgementDelete(hfFormID.Text, true))
{
@@ -151,7 +205,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_UnitStoreMenuId, Const.BtnDelete))
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_UnitStoreMenuId, Const.BtnDelete))
{
this.DeleteData();
}
@@ -200,7 +254,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_UnitStoreMenuId, Const.BtnModify))
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_UnitStoreMenuId, Const.BtnModify))
{
this.EditData();
}
@@ -247,7 +301,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_UnitStoreMenuId, Const.BtnSave))
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_UnitStoreMenuId, Const.BtnSave))
{
string strRowID = hfFormID.Text;
if (this.drpUnitId.SelectedValue == BLL.Const._Null)
@@ -262,7 +316,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
}
Model.Weld_UnitStore store = new Model.Weld_UnitStore();
store.ProjectId = this.CurrUser.LoginProjectId;
store.ProjectId = this.ProjectId;
store.UnitId = this.drpUnitId.SelectedValue;
store.UnitStoreCode = this.txtUnitStoreCode.Text.Trim();
store.UnitStoreName = this.txtUnitStoreName.Text.Trim();