施工月报新 增加3、4、5、6节点内容
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 检验试验计划管理
|
||||
/// </summary>
|
||||
public class InspectionTestPlanService
|
||||
{
|
||||
public static bool Insert(Model.Inspection_Test_Plan model)
|
||||
{
|
||||
try
|
||||
{
|
||||
Funs.DB.Inspection_Test_Plan.InsertOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"插入数据失败,原因:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Update(Model.Inspection_Test_Plan model)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = Funs.DB.Inspection_Test_Plan.FirstOrDefault(a => a.Id == model.Id);
|
||||
if (result != null)
|
||||
{
|
||||
result.UnitId = model.UnitId;
|
||||
result.CNProfessionalId = model.CNProfessionalId;
|
||||
result.PlanCode = model.PlanCode;
|
||||
result.PlanName = model.PlanName;
|
||||
result.ApprovalDate = model.ApprovalDate;
|
||||
result.AuditMan = model.AuditMan;
|
||||
result.ApprovalMan = model.ApprovalMan;
|
||||
result.Remarks = model.Remarks;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"更新表数据失败,原因:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Delete(List<string> newId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = Funs.DB.Inspection_Test_Plan.Where(a => newId.Contains(a.Id)).ToList();
|
||||
if (result.Count > 0)
|
||||
{
|
||||
Funs.DB.Inspection_Test_Plan.DeleteAllOnSubmit(result);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"删除数据失败,原因:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Delete(string newId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = Funs.DB.Inspection_Test_Plan.Where(a => a.Id == newId).ToList();
|
||||
if (result.Count > 0)
|
||||
{
|
||||
Funs.DB.Inspection_Test_Plan.DeleteAllOnSubmit(result);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"删除数据失败,原因:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static Model.Inspection_Test_Plan Detail(string newId)
|
||||
{
|
||||
var result = Funs.DB.Inspection_Test_Plan.FirstOrDefault(a => a.Id == newId);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,6 +118,7 @@ namespace BLL
|
||||
newMajorPlanApproval.CompileMan = majorPlanApproval.CompileMan;
|
||||
newMajorPlanApproval.CompileDate = majorPlanApproval.CompileDate;
|
||||
newMajorPlanApproval.UnitWorkId = majorPlanApproval.UnitWorkId;
|
||||
newMajorPlanApproval.ExpertReviewMan = majorPlanApproval.ExpertReviewMan;
|
||||
db.Comprehensive_MajorPlanApproval.InsertOnSubmit(newMajorPlanApproval);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -144,6 +145,7 @@ namespace BLL
|
||||
newMajorPlanApproval.ImplementationDeviation = majorPlanApproval.ImplementationDeviation;
|
||||
newMajorPlanApproval.AttachUrl = majorPlanApproval.AttachUrl;
|
||||
newMajorPlanApproval.UnitWorkId = majorPlanApproval.UnitWorkId;
|
||||
newMajorPlanApproval.ExpertReviewMan = majorPlanApproval.ExpertReviewMan;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class ReviewDrawingsService
|
||||
{
|
||||
public static bool Insert(Model.Comprehensive_ReviewDrawings model)
|
||||
{
|
||||
try
|
||||
{
|
||||
Funs.DB.Comprehensive_ReviewDrawings.InsertOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"插入数据失败,原因:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Update(Model.Comprehensive_ReviewDrawings model)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(a => a.Id == model.Id);
|
||||
if (result != null)
|
||||
{
|
||||
result.CNProfessionalId = model.CNProfessionalId;
|
||||
result.DraCode = model.DraCode;
|
||||
result.ReviewDate = model.ReviewDate;
|
||||
result.UnitWorkId = model.UnitWorkId;
|
||||
result.ReceiveUnits = model.ReceiveUnits;
|
||||
result.Status = model.Status;
|
||||
result.Remarks = model.Remarks;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"更新表数据失败,原因:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Delete(List<string> newId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = Funs.DB.Comprehensive_ReviewDrawings.Where(a => newId.Contains(a.Id)).ToList();
|
||||
if (result.Count > 0)
|
||||
{
|
||||
Funs.DB.Comprehensive_ReviewDrawings.DeleteAllOnSubmit(result);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"删除数据失败,原因:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Delete(string newId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = Funs.DB.Comprehensive_ReviewDrawings.Where(a => a.Id == newId).ToList();
|
||||
if (result.Count > 0)
|
||||
{
|
||||
Funs.DB.Comprehensive_ReviewDrawings.DeleteAllOnSubmit(result);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"删除数据失败,原因:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static Model.Comprehensive_ReviewDrawings Detail(string newId)
|
||||
{
|
||||
var result = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(a => a.Id == newId);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user