This commit is contained in:
杨红卫 2021-08-19 18:41:33 +08:00
commit f7f5a70066
11 changed files with 152 additions and 206 deletions

View File

@ -0,0 +1,2 @@
alter table dbo.Comprehensive_DesignDrawings drop constraint FK_Comprehensive_DesignDrawings_Base_CNProfessional
GO

View File

@ -225,44 +225,10 @@ namespace BLL
/// <param name="inspectionManagement"></param> /// <param name="inspectionManagement"></param>
public static void AddInspectionManagement(Model.ProcessControl_InspectionManagement inspectionManagement) public static void AddInspectionManagement(Model.ProcessControl_InspectionManagement inspectionManagement)
{ {
Model.SGGLDB db = Funs.DB; using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
Model.ProcessControl_InspectionManagement newInspectionManagement = new Model.ProcessControl_InspectionManagement();
newInspectionManagement.InspectionId = inspectionManagement.InspectionId;
newInspectionManagement.ProjectId = inspectionManagement.ProjectId;
newInspectionManagement.UnitId = inspectionManagement.UnitId;
newInspectionManagement.CNProfessionalId = inspectionManagement.CNProfessionalId;
newInspectionManagement.InspectionCode = inspectionManagement.InspectionCode;
newInspectionManagement.UnitWorkId = inspectionManagement.UnitWorkId;
newInspectionManagement.Branch = inspectionManagement.Branch;
newInspectionManagement.ControlPointType = inspectionManagement.ControlPointType;
newInspectionManagement.AcceptanceSite = inspectionManagement.AcceptanceSite;
newInspectionManagement.IsOnceQualified = inspectionManagement.IsOnceQualified;
newInspectionManagement.InspectionDate = inspectionManagement.InspectionDate;
newInspectionManagement.AttachUrl = inspectionManagement.AttachUrl;
newInspectionManagement.AttachUrl2 = inspectionManagement.AttachUrl2;
newInspectionManagement.NoticeCode = inspectionManagement.NoticeCode;
newInspectionManagement.ParentDivisionProjectId = inspectionManagement.ParentDivisionProjectId;
newInspectionManagement.CheckDate = inspectionManagement.CheckDate;
newInspectionManagement.CheckMan = inspectionManagement.CheckMan;
newInspectionManagement.CompileMan = inspectionManagement.CompileMan;
newInspectionManagement.CompileDate = inspectionManagement.CompileDate;
newInspectionManagement.UnqualifiedReason = inspectionManagement.UnqualifiedReason;
newInspectionManagement.AcceptanceCheckMan = inspectionManagement.AcceptanceCheckMan;
newInspectionManagement.FileType = inspectionManagement.FileType;
db.ProcessControl_InspectionManagement.InsertOnSubmit(newInspectionManagement);
db.SubmitChanges();
}
/// <summary>
/// 修改检验批管理
/// </summary>
/// <param name="inspectionManagement"></param>
public static void UpdateInspectionManagement(Model.ProcessControl_InspectionManagement inspectionManagement)
{
Model.SGGLDB db = Funs.DB;
Model.ProcessControl_InspectionManagement newInspectionManagement = db.ProcessControl_InspectionManagement.FirstOrDefault(e => e.InspectionId == inspectionManagement.InspectionId);
if (newInspectionManagement != null)
{ {
Model.ProcessControl_InspectionManagement newInspectionManagement = new Model.ProcessControl_InspectionManagement();
newInspectionManagement.InspectionId = inspectionManagement.InspectionId;
newInspectionManagement.ProjectId = inspectionManagement.ProjectId; newInspectionManagement.ProjectId = inspectionManagement.ProjectId;
newInspectionManagement.UnitId = inspectionManagement.UnitId; newInspectionManagement.UnitId = inspectionManagement.UnitId;
newInspectionManagement.CNProfessionalId = inspectionManagement.CNProfessionalId; newInspectionManagement.CNProfessionalId = inspectionManagement.CNProfessionalId;
@ -277,12 +243,50 @@ namespace BLL
newInspectionManagement.AttachUrl2 = inspectionManagement.AttachUrl2; newInspectionManagement.AttachUrl2 = inspectionManagement.AttachUrl2;
newInspectionManagement.NoticeCode = inspectionManagement.NoticeCode; newInspectionManagement.NoticeCode = inspectionManagement.NoticeCode;
newInspectionManagement.ParentDivisionProjectId = inspectionManagement.ParentDivisionProjectId; newInspectionManagement.ParentDivisionProjectId = inspectionManagement.ParentDivisionProjectId;
newInspectionManagement.CheckDate = inspectionManagement.CheckDate;
newInspectionManagement.CheckMan = inspectionManagement.CheckMan;
newInspectionManagement.CompileMan = inspectionManagement.CompileMan;
newInspectionManagement.CompileDate = inspectionManagement.CompileDate;
newInspectionManagement.UnqualifiedReason = inspectionManagement.UnqualifiedReason; newInspectionManagement.UnqualifiedReason = inspectionManagement.UnqualifiedReason;
newInspectionManagement.AcceptanceCheckMan = inspectionManagement.AcceptanceCheckMan; newInspectionManagement.AcceptanceCheckMan = inspectionManagement.AcceptanceCheckMan;
newInspectionManagement.FileType = inspectionManagement.FileType;
db.ProcessControl_InspectionManagement.InsertOnSubmit(newInspectionManagement);
db.SubmitChanges(); db.SubmitChanges();
} }
} }
/// <summary>
/// 修改检验批管理
/// </summary>
/// <param name="inspectionManagement"></param>
public static void UpdateInspectionManagement(Model.ProcessControl_InspectionManagement inspectionManagement)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.ProcessControl_InspectionManagement newInspectionManagement = db.ProcessControl_InspectionManagement.FirstOrDefault(e => e.InspectionId == inspectionManagement.InspectionId);
if (newInspectionManagement != null)
{
newInspectionManagement.ProjectId = inspectionManagement.ProjectId;
newInspectionManagement.UnitId = inspectionManagement.UnitId;
newInspectionManagement.CNProfessionalId = inspectionManagement.CNProfessionalId;
newInspectionManagement.InspectionCode = inspectionManagement.InspectionCode;
newInspectionManagement.UnitWorkId = inspectionManagement.UnitWorkId;
newInspectionManagement.Branch = inspectionManagement.Branch;
newInspectionManagement.ControlPointType = inspectionManagement.ControlPointType;
newInspectionManagement.AcceptanceSite = inspectionManagement.AcceptanceSite;
newInspectionManagement.IsOnceQualified = inspectionManagement.IsOnceQualified;
newInspectionManagement.InspectionDate = inspectionManagement.InspectionDate;
newInspectionManagement.AttachUrl = inspectionManagement.AttachUrl;
newInspectionManagement.AttachUrl2 = inspectionManagement.AttachUrl2;
newInspectionManagement.NoticeCode = inspectionManagement.NoticeCode;
newInspectionManagement.ParentDivisionProjectId = inspectionManagement.ParentDivisionProjectId;
newInspectionManagement.UnqualifiedReason = inspectionManagement.UnqualifiedReason;
newInspectionManagement.AcceptanceCheckMan = inspectionManagement.AcceptanceCheckMan;
db.SubmitChanges();
}
}
}
/// <summary> /// <summary>
/// 根据主键删除检验批管理 /// 根据主键删除检验批管理
/// </summary> /// </summary>

View File

@ -18,7 +18,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// 上传预设的虚拟路径 /// 上传预设的虚拟路径
/// </summary> /// </summary>
private string initPath = Const.ExcelUrl; private string initPath = Const.ExcelUrl;
/// <summary> /// <summary>
/// 错误集合 /// 错误集合
@ -165,84 +165,106 @@ namespace FineUIPro.Web.CQMS.Comprehensive
select x; select x;
var cns = from x in Funs.DB.Base_CNProfessional select x; var cns = from x in Funs.DB.Base_CNProfessional select x;
var installations = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x; var installations = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x;
for (int i = 0; i < ir; i++) for (int i = 0; i < ir; i++)
{ {
string row0 = pds.Rows[i][0].ToString().Trim(); string row0 = pds.Rows[i][0].ToString().Trim();
if (!string.IsNullOrEmpty(row0)) if (string.IsNullOrEmpty(row0))
{ {
var cn = cns.Where(x => x.ProfessionalName == row0.Trim()).FirstOrDefault(); result += (i + 2).ToString() + "," + "文件编号为必填项!" + "|";
if (cn == null)
{
result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row0 + "]不存在!" + "|";
}
} }
string row1 = pds.Rows[i][1].ToString();
if (!string.IsNullOrEmpty(row1)) string row1 = pds.Rows[i][1].ToString().Trim();
if (string.IsNullOrEmpty(row1))
{ {
var ins = installations.Where(x => x.UnitWorkName == row1.Trim()).FirstOrDefault(); result += (i + 2).ToString() + "," + "文件名称为必填项!" + "|";
if (ins == null)
{
result += (i + 2).ToString() + "," + "装置/单元名称" + "," + "[" + row1 + "]不存在!" + "|";
}
} }
string row2 = pds.Rows[i][2].ToString(); string row2 = pds.Rows[i][2].ToString();
if (string.IsNullOrEmpty(row2)) if (!string.IsNullOrEmpty(row2))
{ {
result += (i + 2).ToString() + "," + "变更单号" + "," + "此项为必填项!" + "|"; try
{
DateTime date = Convert.ToDateTime(row2.Trim());
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "发放日期" + "," + "[" + row2 + "]错误!" + "|";
}
}
else
{
result += (i + 2).ToString() + "," + "发放日期为必填项!" + "|";
} }
string row3 = pds.Rows[i][3].ToString().Trim();
if (!string.IsNullOrEmpty(row3))
{
var cn = cns.Where(x => x.ProfessionalName == row3.Trim()).FirstOrDefault();
if (cn == null)
{
result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row3 + "]不存在!" + "|";
}
}
string row5 = pds.Rows[i][5].ToString(); string row5 = pds.Rows[i][5].ToString().Trim();
if (!string.IsNullOrEmpty(row5)) if (!string.IsNullOrEmpty(row5))
{ {
try string[] reunit = row5.Split(',');
foreach (string unit in reunit)
{ {
DateTime date = Convert.ToDateTime(row5.Trim()); var u = units.Where(x => x.UnitName == unit).FirstOrDefault();
} if (u == null)
catch (Exception) {
{ result += (i + 2).ToString() + "," + "发件单位" + "," + "[" + unit + "]不存在!" + "|";
result += (i + 2).ToString() + "," + "下发日期" + "," + "[" + row5 + "]错误!" + "|"; }
}
}
string row6 = pds.Rows[i][6].ToString();
if (!string.IsNullOrEmpty(row6))
{
try
{
DateTime date = Convert.ToDateTime(row6.Trim());
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "业主批准时间" + "," + "[" + row6 + "]错误!" + "|";
} }
} }
string row7 = pds.Rows[i][7].ToString().Trim(); string row7 = pds.Rows[i][7].ToString().Trim();
if (!string.IsNullOrEmpty(row7)) if (!string.IsNullOrEmpty(row7))
{ {
string[] reunit = row7.Split(','); if (row7 != "纸质" && row7 != "电子")
foreach (string unit in reunit)
{ {
var u = units.Where(x => x.UnitName == unit).FirstOrDefault(); result += (i + 2).ToString() + "," + "文件形式" + "," + "[" + row7 + "]错误!" + "|";
if (u == null)
{
result += (i + 2).ToString() + "," + "单位名称" + "," + "[" + unit + "]不存在!" + "|";
}
}
}
string row9 = pds.Rows[i][9].ToString().Trim();
if (!string.IsNullOrEmpty(row9))
{
if (row9 != "未实施" && row9 != "进行中" && row9 != "已完成")
{
result += (i + 2).ToString() + "," + "处理状态" + "," + "[" + row9 + "]错误!" + "|";
} }
} }
string row8 = pds.Rows[i][8].ToString().Trim();
if (!string.IsNullOrEmpty(row8))
{
try
{
int a = Convert.ToInt32(row8.Trim());
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "份数" + "," + "[" + row8 + "]错误!" + "|";
}
}
string row9 = pds.Rows[i][9].ToString().Trim();
if (!string.IsNullOrEmpty(row9))
{
if (row9 != "是" && row9 != "否")
{
result += (i + 2).ToString() + "," + "是否需回复" + "," + "[" + row9 + "]错误!" + "|";
}
}
string row11 = pds.Rows[i][11].ToString();
if (!string.IsNullOrEmpty(row11))
{
try
{
DateTime date = Convert.ToDateTime(row11.Trim());
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "回复日期" + "," + "[" + row11 + "]错误!" + "|";
}
}
} }
if (!string.IsNullOrEmpty(result)) if (!string.IsNullOrEmpty(result))
{ {
@ -390,63 +412,50 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var oldViewInfo = oldViewInfos.Where(x => x.ChangeOrderCode == pds.Rows[i][2].ToString().Trim()).FirstOrDefault(); var oldViewInfo = oldViewInfos.Where(x => x.ChangeOrderCode == pds.Rows[i][2].ToString().Trim()).FirstOrDefault();
if (oldViewInfo == null) if (oldViewInfo == null)
{ {
Model.Comprehensive_DesignChangeOrder Ins = new Model.Comprehensive_DesignChangeOrder(); Model.Comprehensive_DataDistribution Ins = new Model.Comprehensive_DataDistribution();
Ins.FileCode = pds.Rows[i][0].ToString().Trim();
Ins.FileName = pds.Rows[i][1].ToString().Trim();
Ins.SendDate = Funs.GetNewDateTime(pds.Rows[i][2].ToString().Trim());
Ins.ProjectId = this.CurrUser.LoginProjectId; Ins.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim())) if (!string.IsNullOrEmpty(pds.Rows[i][3].ToString().Trim()))
{ {
Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][0].ToString().Trim()).CNProfessionalId; Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][3].ToString().Trim()).CNProfessionalId;
} }
Ins.SendMan = pds.Rows[i][4].ToString().Trim();
if (!string.IsNullOrEmpty(pds.Rows[i][1].ToString().Trim()))
{
Ins.UnitWorkId = Funs.DB.WBS_UnitWork.First(e => e.UnitWorkName == pds.Rows[i][1].ToString().Trim()).UnitWorkId;
}
Ins.ChangeOrderCode = pds.Rows[i][2].ToString().Trim();
Ins.ChangeReason = pds.Rows[i][3].ToString().Trim();
Ins.Contents = pds.Rows[i][4].ToString().Trim();
if (!string.IsNullOrEmpty(pds.Rows[i][5].ToString().Trim())) if (!string.IsNullOrEmpty(pds.Rows[i][5].ToString().Trim()))
{ {
Ins.IssuedDate = Convert.ToDateTime(pds.Rows[i][5].ToString().Trim()); Ins.ReceivingUnit = BLL.UnitService.GetUnitIds(pds.Rows[i][5].ToString().Trim());
} }
Ins.ReceivingMan = pds.Rows[i][6].ToString().Trim();
if (!string.IsNullOrEmpty(pds.Rows[i][6].ToString().Trim())) string row7 = pds.Rows[i][7].ToString().Trim();
if (!string.IsNullOrEmpty(row7))
{ {
Ins.ApprovalDate = Convert.ToDateTime(pds.Rows[i][6].ToString().Trim()); Ins.FileType = row7 == "纸质" ? "1" : "2";
} }
string row8 = pds.Rows[i][8].ToString().Trim();
if (!string.IsNullOrEmpty(pds.Rows[i][7].ToString().Trim())) if (!string.IsNullOrEmpty(row8))
{ {
Ins.UnitId = BLL.UnitService.GetUnitIds(pds.Rows[i][7].ToString().Trim()); Ins.CopiesCount = Funs.GetNewInt(row8);
} }
Ins.ImplementationFrontState = pds.Rows[i][8].ToString().Trim();
string row9 = pds.Rows[i][9].ToString().Trim(); string row9 = pds.Rows[i][9].ToString().Trim();
if (!string.IsNullOrEmpty(row9)) if (!string.IsNullOrEmpty(row9))
{ {
if (row9 == "未实施") Ins.IsReply = row9 == "是" ? true : false;
{
Ins.HandleState = "1";
}
if (row9 == "进行中")
{
Ins.HandleState = "2";
}
if (row9 == "已完成")
{
Ins.HandleState = "3";
}
} }
Ins.ReplyCode = pds.Rows[i][10].ToString().Trim();
if (!string.IsNullOrEmpty(pds.Rows[i][11].ToString().Trim()))
{
Ins.ReplyDate = Convert.ToDateTime(pds.Rows[i][11].ToString().Trim());
}
Ins.Remark = pds.Rows[i][12].ToString().Trim();
Ins.DesignChangeOrderId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignChangeOrder)); Ins.DataDistributionId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataDistribution));
Ins.CompileMan = this.CurrUser.UserId; Ins.CompileMan = this.CurrUser.UserId;
Ins.CompileDate = DateTime.Now.Date; Ins.CompileDate = DateTime.Now.Date;
BLL.DesignChangeOrderService.AddDesignChangeOrder(Ins); BLL.DataDistributionService.AddDataDistribution(Ins);
} }
} }
} }
else else
{ {

View File

@ -22,7 +22,7 @@ namespace FineUIPro.Web.Comprehensive
if (!IsPostBack) if (!IsPostBack)
{ {
GetButtonPower(); GetButtonPower();
BLL.CNProfessionalService.InitCNProfessionalDownList(this.sdrpCNProfessionalId, true); BLL.DesignProfessionalService.InitDesignProfessionalDownList(this.sdrpCNProfessionalId, true);
BindGrid(); BindGrid();
} }
} }
@ -46,10 +46,10 @@ namespace FineUIPro.Web.Comprehensive
C.Remark, C.Remark,
C.RemarkCode, C.RemarkCode,
C.UnitWorkId, C.UnitWorkId,
CN.ProfessionalName" CN.ProfessionalName"
+@" FROM Comprehensive_DesignDrawings C " + @" FROM Comprehensive_DesignDrawings C "
+@" LEFT JOIN Base_CNProfessional CN ON C.CNProfessionalId=CN.CNProfessionalId" + @" LEFT JOIN Base_DesignProfessional CN ON C.CNProfessionalId=CN.DesignProfessionalId"
+@" WHERE C.ProjectId = @ProjectId"; + @" WHERE C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (sdrpCNProfessionalId.SelectedValue != BLL.Const._Null) if (sdrpCNProfessionalId.SelectedValue != BLL.Const._Null)

View File

@ -168,7 +168,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
where y.ProjectId == this.CurrUser.LoginProjectId where y.ProjectId == this.CurrUser.LoginProjectId
select x; select x;
var cns = from x in Funs.DB.Base_CNProfessional select x; var cns = from x in Funs.DB.Base_DesignProfessional select x;
for (int i = 0; i < ir; i++) for (int i = 0; i < ir; i++)
{ {
@ -402,7 +402,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
where y.ProjectId == this.CurrUser.LoginProjectId where y.ProjectId == this.CurrUser.LoginProjectId
select x; select x;
var cns = from x in Funs.DB.Base_CNProfessional select x; var cns = from x in Funs.DB.Base_DesignProfessional select x;
for (int i = 0; i < ir; i++) for (int i = 0; i < ir; i++)
{ {
@ -416,7 +416,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Model.Comprehensive_DesignDrawings des = new Model.Comprehensive_DesignDrawings(); Model.Comprehensive_DesignDrawings des = new Model.Comprehensive_DesignDrawings();
des.DesignDrawingsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDrawings)); des.DesignDrawingsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDrawings));
des.ProjectId = this.CurrUser.LoginProjectId; des.ProjectId = this.CurrUser.LoginProjectId;
des.CNProfessionalId = cn.CNProfessionalId; des.CNProfessionalId = cn.DesignProfessionalId;
des.DesignDrawingsCode = pds.Rows[i][1].ToString().Trim(); des.DesignDrawingsCode = pds.Rows[i][1].ToString().Trim();
des.DesignDrawingsContent = pds.Rows[i][2].ToString().Trim(); des.DesignDrawingsContent = pds.Rows[i][2].ToString().Trim();
des.Edition = pds.Rows[i][3].ToString().Trim(); des.Edition = pds.Rows[i][3].ToString().Trim();
@ -443,7 +443,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
else else
{ {
oldViewInfo.CNProfessionalId = cn.CNProfessionalId; oldViewInfo.CNProfessionalId = cn.DesignProfessionalId;
oldViewInfo.DesignDrawingsCode = pds.Rows[i][1].ToString().Trim(); oldViewInfo.DesignDrawingsCode = pds.Rows[i][1].ToString().Trim();
oldViewInfo.DesignDrawingsContent = pds.Rows[i][2].ToString().Trim(); oldViewInfo.DesignDrawingsContent = pds.Rows[i][2].ToString().Trim();
oldViewInfo.Edition = pds.Rows[i][3].ToString().Trim(); oldViewInfo.Edition = pds.Rows[i][3].ToString().Trim();

View File

@ -34,7 +34,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
if (!IsPostBack) if (!IsPostBack)
{ {
GetButtonPower(); GetButtonPower();
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true); BLL.DesignProfessionalService.InitDesignProfessionalDownList(this.drpCNProfessionalId, true);
BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorkIds, this.CurrUser.LoginProjectId, false); BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorkIds, this.CurrUser.LoginProjectId, false);
BLL.UnitService.GetUnit(this.drpUnitIds, this.CurrUser.LoginProjectId, false); BLL.UnitService.GetUnit(this.drpUnitIds, this.CurrUser.LoginProjectId, false);
this.DesignDrawingsId = Request.Params["DesignDrawingsId"]; this.DesignDrawingsId = Request.Params["DesignDrawingsId"];

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

View File

@ -15662,8 +15662,6 @@ namespace Model
private EntitySet<Comprehensive_DesignChangeOrder> _Comprehensive_DesignChangeOrder; private EntitySet<Comprehensive_DesignChangeOrder> _Comprehensive_DesignChangeOrder;
private EntitySet<Comprehensive_DesignDrawings> _Comprehensive_DesignDrawings;
private EntitySet<Comprehensive_GeneralPlanApproval> _Comprehensive_GeneralPlanApproval; private EntitySet<Comprehensive_GeneralPlanApproval> _Comprehensive_GeneralPlanApproval;
private EntitySet<Comprehensive_InspectionEquipment> _Comprehensive_InspectionEquipment; private EntitySet<Comprehensive_InspectionEquipment> _Comprehensive_InspectionEquipment;
@ -15704,7 +15702,6 @@ namespace Model
this._Base_DesignProfessional = new EntitySet<Base_DesignProfessional>(new Action<Base_DesignProfessional>(this.attach_Base_DesignProfessional), new Action<Base_DesignProfessional>(this.detach_Base_DesignProfessional)); this._Base_DesignProfessional = new EntitySet<Base_DesignProfessional>(new Action<Base_DesignProfessional>(this.attach_Base_DesignProfessional), new Action<Base_DesignProfessional>(this.detach_Base_DesignProfessional));
this._Comprehensive_DataDistribution = new EntitySet<Comprehensive_DataDistribution>(new Action<Comprehensive_DataDistribution>(this.attach_Comprehensive_DataDistribution), new Action<Comprehensive_DataDistribution>(this.detach_Comprehensive_DataDistribution)); this._Comprehensive_DataDistribution = new EntitySet<Comprehensive_DataDistribution>(new Action<Comprehensive_DataDistribution>(this.attach_Comprehensive_DataDistribution), new Action<Comprehensive_DataDistribution>(this.detach_Comprehensive_DataDistribution));
this._Comprehensive_DesignChangeOrder = new EntitySet<Comprehensive_DesignChangeOrder>(new Action<Comprehensive_DesignChangeOrder>(this.attach_Comprehensive_DesignChangeOrder), new Action<Comprehensive_DesignChangeOrder>(this.detach_Comprehensive_DesignChangeOrder)); this._Comprehensive_DesignChangeOrder = new EntitySet<Comprehensive_DesignChangeOrder>(new Action<Comprehensive_DesignChangeOrder>(this.attach_Comprehensive_DesignChangeOrder), new Action<Comprehensive_DesignChangeOrder>(this.detach_Comprehensive_DesignChangeOrder));
this._Comprehensive_DesignDrawings = new EntitySet<Comprehensive_DesignDrawings>(new Action<Comprehensive_DesignDrawings>(this.attach_Comprehensive_DesignDrawings), new Action<Comprehensive_DesignDrawings>(this.detach_Comprehensive_DesignDrawings));
this._Comprehensive_GeneralPlanApproval = new EntitySet<Comprehensive_GeneralPlanApproval>(new Action<Comprehensive_GeneralPlanApproval>(this.attach_Comprehensive_GeneralPlanApproval), new Action<Comprehensive_GeneralPlanApproval>(this.detach_Comprehensive_GeneralPlanApproval)); this._Comprehensive_GeneralPlanApproval = new EntitySet<Comprehensive_GeneralPlanApproval>(new Action<Comprehensive_GeneralPlanApproval>(this.attach_Comprehensive_GeneralPlanApproval), new Action<Comprehensive_GeneralPlanApproval>(this.detach_Comprehensive_GeneralPlanApproval));
this._Comprehensive_InspectionEquipment = new EntitySet<Comprehensive_InspectionEquipment>(new Action<Comprehensive_InspectionEquipment>(this.attach_Comprehensive_InspectionEquipment), new Action<Comprehensive_InspectionEquipment>(this.detach_Comprehensive_InspectionEquipment)); this._Comprehensive_InspectionEquipment = new EntitySet<Comprehensive_InspectionEquipment>(new Action<Comprehensive_InspectionEquipment>(this.attach_Comprehensive_InspectionEquipment), new Action<Comprehensive_InspectionEquipment>(this.detach_Comprehensive_InspectionEquipment));
this._Comprehensive_MajorPlanApproval = new EntitySet<Comprehensive_MajorPlanApproval>(new Action<Comprehensive_MajorPlanApproval>(this.attach_Comprehensive_MajorPlanApproval), new Action<Comprehensive_MajorPlanApproval>(this.detach_Comprehensive_MajorPlanApproval)); this._Comprehensive_MajorPlanApproval = new EntitySet<Comprehensive_MajorPlanApproval>(new Action<Comprehensive_MajorPlanApproval>(this.attach_Comprehensive_MajorPlanApproval), new Action<Comprehensive_MajorPlanApproval>(this.detach_Comprehensive_MajorPlanApproval));
@ -15850,19 +15847,6 @@ namespace Model
} }
} }
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DesignDrawings_Base_CNProfessional", Storage="_Comprehensive_DesignDrawings", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", DeleteRule="NO ACTION")]
public EntitySet<Comprehensive_DesignDrawings> Comprehensive_DesignDrawings
{
get
{
return this._Comprehensive_DesignDrawings;
}
set
{
this._Comprehensive_DesignDrawings.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_GeneralPlanApproval_Base_CNProfessional", Storage="_Comprehensive_GeneralPlanApproval", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", DeleteRule="NO ACTION")] [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_GeneralPlanApproval_Base_CNProfessional", Storage="_Comprehensive_GeneralPlanApproval", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", DeleteRule="NO ACTION")]
public EntitySet<Comprehensive_GeneralPlanApproval> Comprehensive_GeneralPlanApproval public EntitySet<Comprehensive_GeneralPlanApproval> Comprehensive_GeneralPlanApproval
{ {
@ -16061,18 +16045,6 @@ namespace Model
entity.Base_CNProfessional = null; entity.Base_CNProfessional = null;
} }
private void attach_Comprehensive_DesignDrawings(Comprehensive_DesignDrawings entity)
{
this.SendPropertyChanging();
entity.Base_CNProfessional = this;
}
private void detach_Comprehensive_DesignDrawings(Comprehensive_DesignDrawings entity)
{
this.SendPropertyChanging();
entity.Base_CNProfessional = null;
}
private void attach_Comprehensive_GeneralPlanApproval(Comprehensive_GeneralPlanApproval entity) private void attach_Comprehensive_GeneralPlanApproval(Comprehensive_GeneralPlanApproval entity)
{ {
this.SendPropertyChanging(); this.SendPropertyChanging();
@ -68353,8 +68325,6 @@ namespace Model
private string _UnitWorkId; private string _UnitWorkId;
private EntityRef<Base_CNProfessional> _Base_CNProfessional;
private EntityRef<Base_Project> _Base_Project; private EntityRef<Base_Project> _Base_Project;
#region #region
@ -68393,7 +68363,6 @@ namespace Model
public Comprehensive_DesignDrawings() public Comprehensive_DesignDrawings()
{ {
this._Base_CNProfessional = default(EntityRef<Base_CNProfessional>);
this._Base_Project = default(EntityRef<Base_Project>); this._Base_Project = default(EntityRef<Base_Project>);
OnCreated(); OnCreated();
} }
@ -68453,10 +68422,6 @@ namespace Model
{ {
if ((this._CNProfessionalId != value)) if ((this._CNProfessionalId != value))
{ {
if (this._Base_CNProfessional.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnCNProfessionalIdChanging(value); this.OnCNProfessionalIdChanging(value);
this.SendPropertyChanging(); this.SendPropertyChanging();
this._CNProfessionalId = value; this._CNProfessionalId = value;
@ -68686,40 +68651,6 @@ namespace Model
} }
} }
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DesignDrawings_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", IsForeignKey=true)]
public Base_CNProfessional Base_CNProfessional
{
get
{
return this._Base_CNProfessional.Entity;
}
set
{
Base_CNProfessional previousValue = this._Base_CNProfessional.Entity;
if (((previousValue != value)
|| (this._Base_CNProfessional.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Base_CNProfessional.Entity = null;
previousValue.Comprehensive_DesignDrawings.Remove(this);
}
this._Base_CNProfessional.Entity = value;
if ((value != null))
{
value.Comprehensive_DesignDrawings.Add(this);
this._CNProfessionalId = value.CNProfessionalId;
}
else
{
this._CNProfessionalId = default(string);
}
this.SendPropertyChanged("Base_CNProfessional");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DesignDrawings_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DesignDrawings_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project public Base_Project Base_Project
{ {