This commit is contained in:
parent
b60a408dd5
commit
710db11e43
|
@ -106,6 +106,18 @@ namespace BLL
|
||||||
return pUnit;
|
return pUnit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据项目id和单位id获取单位是否在项目中
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId"></param>
|
||||||
|
/// <param name="unitId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.Project_Unit GetProject_UnitByUnitId(string unitId)
|
||||||
|
{
|
||||||
|
var pUnit = Funs.DB.Project_Unit.FirstOrDefault(x => x.UnitId == unitId && x.UnitType != null && x.UnitType != "");
|
||||||
|
return pUnit;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据项目id获取项目单位信息
|
/// 根据项目id获取项目单位信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -260,7 +260,7 @@ namespace BLL
|
||||||
pUnit.ProjectId = projectid;
|
pUnit.ProjectId = projectid;
|
||||||
pUnit.UnitId = item.UnitId;
|
pUnit.UnitId = item.UnitId;
|
||||||
//单位类型
|
//单位类型
|
||||||
var bresult = bUnit.FirstOrDefault(x => x.UnitId == item.UnitId);
|
var bresult = bUnit.FirstOrDefault(x => x.UnitId == item.UnitId && x.UnitType!=null && x.UnitType!="");
|
||||||
if (bresult != null)
|
if (bresult != null)
|
||||||
{
|
{
|
||||||
pUnit.UnitType = bresult.UnitType;
|
pUnit.UnitType = bresult.UnitType;
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<Rows>
|
<Rows>
|
||||||
<f:FormRow ColumnWidths="25% 25% 20%">
|
<f:FormRow ColumnWidths="25% 25% 20%">
|
||||||
<Items>
|
<Items>
|
||||||
<f:DropDownList ID="drpProject" runat="server" LabelWidth="80px" Label="项目" EnableCheckBoxSelect="true" EnableMultiSelect="true">
|
<f:DropDownList ID="drpProject" runat="server" LabelWidth="80px" Label="项目" EnableCheckBoxSelect="true" EnableEdit="true" EnableMultiSelect="true">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
<f:TextBox ID="txtIsoNo" runat="server" Label="管线号">
|
<f:TextBox ID="txtIsoNo" runat="server" Label="管线号">
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<FineUIPro DebugMode="false" Theme="Cupertino"/>
|
<FineUIPro DebugMode="false" Theme="Cupertino"/>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<!--连接字符串-->
|
<!--连接字符串-->
|
||||||
<add key="ConnectionString" value="Server=.\SQL2019;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
|
<add key="ConnectionString" value="Server=.\MSSQLSERVER01;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
|
||||||
<!--系统名称-->
|
<!--系统名称-->
|
||||||
<add key="SystemName" value="诺必达焊接管理系统"/>
|
<add key="SystemName" value="诺必达焊接管理系统"/>
|
||||||
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
||||||
|
|
|
@ -200,6 +200,11 @@ namespace FineUIPro.Web.common.BaseInfo
|
||||||
newUnit.ProjectId = newProjectId;
|
newUnit.ProjectId = newProjectId;
|
||||||
newUnit.UnitId = this.CurrUser.UnitId;
|
newUnit.UnitId = this.CurrUser.UnitId;
|
||||||
newUnit.InTime = System.DateTime.Now;
|
newUnit.InTime = System.DateTime.Now;
|
||||||
|
Model.Project_Unit pu = BLL.Project_UnitService.GetProject_UnitByUnitId(newUnit.UnitId);
|
||||||
|
if (pu != null)
|
||||||
|
{
|
||||||
|
newUnit.UnitType = pu.UnitType;
|
||||||
|
}
|
||||||
BLL.Project_UnitService.AddProject_Unit(newUnit);
|
BLL.Project_UnitService.AddProject_Unit(newUnit);
|
||||||
|
|
||||||
// 给新项目项目用户插入当前用户
|
// 给新项目项目用户插入当前用户
|
||||||
|
@ -266,6 +271,7 @@ namespace FineUIPro.Web.common.BaseInfo
|
||||||
Model.Project_Unit nUnit = new Model.Project_Unit();
|
Model.Project_Unit nUnit = new Model.Project_Unit();
|
||||||
nUnit.UnitId = this.drpCheckUnit.SelectedValue;
|
nUnit.UnitId = this.drpCheckUnit.SelectedValue;
|
||||||
nUnit.ProjectId = project.ProjectId;
|
nUnit.ProjectId = project.ProjectId;
|
||||||
|
nUnit.UnitType = BLL.Const.UnitType_8;
|
||||||
BLL.Project_UnitService.AddProject_Unit(nUnit);
|
BLL.Project_UnitService.AddProject_Unit(nUnit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue