2023-11-11

This commit is contained in:
2023-11-11 16:02:42 +08:00
parent b2ffd4b8d0
commit 48dd589a7f
66 changed files with 2334 additions and 1232 deletions
+99 -93
View File
@@ -95,59 +95,111 @@ namespace BLL
public static void AddCQMSData_CQMS(CQMSData_CQMS newtable)
{
var db = Funs.DB;
var table = new CQMSData_CQMS
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Id = newtable.Id,
UnitId = newtable.UnitId,
CollCropCode = newtable.CollCropCode,
UnitName = newtable.UnitName,
ReportDate = newtable.ReportDate,
TrainPersonNum = newtable.TrainPersonNum,
TechnicalDisclosePersonNum = newtable.TechnicalDisclosePersonNum,
UseNum = newtable.UseNum,
OKNum = newtable.OKNum,
CompanyPersonNum = newtable.CompanyPersonNum,
BranchPersonNum = newtable.BranchPersonNum,
ProjectPersonNum = newtable.ProjectPersonNum,
ProblemNum = newtable.ProblemNum,
ProblemCompletedNum = newtable.ProblemCompletedNum,
ProblemNotCompletedNum = newtable.ProblemNotCompletedNum,
SNum = newtable.SNum,
ANum = newtable.ANum,
BNum = newtable.BNum,
CNum = newtable.CNum,
KeyProcessNum = newtable.KeyProcessNum,
KeyProcessOKNum = newtable.KeyProcessOKNum,
SpecialProcessNum = newtable.SpecialProcessNum,
SpecialProcessOKNum = newtable.SpecialProcessOKNum,
ConcealedWorksNum = newtable.ConcealedWorksNum,
ConcealedWorksOKNum = newtable.ConcealedWorksOKNum,
UnitProjectOnesNum = newtable.UnitProjectOnesNum,
UnitProjectOnesOKNum = newtable.UnitProjectOnesOKNum,
MaterialInRecheckNum = newtable.MaterialInRecheckNum,
MaterialInRecheckOKNum = newtable.MaterialInRecheckOKNum,
SingleProjectNum = newtable.SingleProjectNum,
UnitProjectNum = newtable.UnitProjectNum,
SubProjectNum = newtable.SubProjectNum,
SubdivisionalWorksNum = newtable.SubdivisionalWorksNum,
InspectionLotNum = newtable.InspectionLotNum,
State = newtable.State,
CreateDate = newtable.CreateDate,
CreateMan = newtable.CreateMan
};
db.CQMSData_CQMS.InsertOnSubmit(table);
db.SubmitChanges();
var table = new CQMSData_CQMS
{
Id = newtable.Id,
UnitId = newtable.UnitId,
CollCropCode = newtable.CollCropCode,
UnitName = newtable.UnitName,
ReportDate = newtable.ReportDate,
TrainPersonNum = newtable.TrainPersonNum,
TechnicalDisclosePersonNum = newtable.TechnicalDisclosePersonNum,
UseNum = newtable.UseNum,
OKNum = newtable.OKNum,
CompanyPersonNum = newtable.CompanyPersonNum,
BranchPersonNum = newtable.BranchPersonNum,
ProjectPersonNum = newtable.ProjectPersonNum,
ProblemNum = newtable.ProblemNum,
ProblemCompletedNum = newtable.ProblemCompletedNum,
ProblemNotCompletedNum = newtable.ProblemNotCompletedNum,
SNum = newtable.SNum,
ANum = newtable.ANum,
BNum = newtable.BNum,
CNum = newtable.CNum,
KeyProcessNum = newtable.KeyProcessNum,
KeyProcessOKNum = newtable.KeyProcessOKNum,
SpecialProcessNum = newtable.SpecialProcessNum,
SpecialProcessOKNum = newtable.SpecialProcessOKNum,
ConcealedWorksNum = newtable.ConcealedWorksNum,
ConcealedWorksOKNum = newtable.ConcealedWorksOKNum,
UnitProjectOnesNum = newtable.UnitProjectOnesNum,
UnitProjectOnesOKNum = newtable.UnitProjectOnesOKNum,
MaterialInRecheckNum = newtable.MaterialInRecheckNum,
MaterialInRecheckOKNum = newtable.MaterialInRecheckOKNum,
SingleProjectNum = newtable.SingleProjectNum,
UnitProjectNum = newtable.UnitProjectNum,
SubProjectNum = newtable.SubProjectNum,
SubdivisionalWorksNum = newtable.SubdivisionalWorksNum,
InspectionLotNum = newtable.InspectionLotNum,
State = newtable.State,
CreateDate = newtable.CreateDate,
CreateMan = newtable.CreateMan
};
db.CQMSData_CQMS.InsertOnSubmit(table);
db.SubmitChanges();
}
}
public static void UpdateCQMSData_CQMS(CQMSData_CQMS newtable)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var table = db.CQMSData_CQMS.FirstOrDefault(x => x.Id == newtable.Id);
if (table != null)
{
table.Id = newtable.Id;
table.UnitId = newtable.UnitId;
table.CollCropCode = newtable.CollCropCode;
table.UnitName = newtable.UnitName;
table.ReportDate = newtable.ReportDate;
table.TrainPersonNum = newtable.TrainPersonNum;
table.TechnicalDisclosePersonNum = newtable.TechnicalDisclosePersonNum;
table.UseNum = newtable.UseNum;
table.OKNum = newtable.OKNum;
table.CompanyPersonNum = newtable.CompanyPersonNum;
table.BranchPersonNum = newtable.BranchPersonNum;
table.ProjectPersonNum = newtable.ProjectPersonNum;
table.ProblemNum = newtable.ProblemNum;
table.ProblemCompletedNum = newtable.ProblemCompletedNum;
table.ProblemNotCompletedNum = newtable.ProblemNotCompletedNum;
table.SNum = newtable.SNum;
table.ANum = newtable.ANum;
table.BNum = newtable.BNum;
table.CNum = newtable.CNum;
table.KeyProcessNum = newtable.KeyProcessNum;
table.KeyProcessOKNum = newtable.KeyProcessOKNum;
table.SpecialProcessNum = newtable.SpecialProcessNum;
table.SpecialProcessOKNum = newtable.SpecialProcessOKNum;
table.ConcealedWorksNum = newtable.ConcealedWorksNum;
table.ConcealedWorksOKNum = newtable.ConcealedWorksOKNum;
table.UnitProjectOnesNum = newtable.UnitProjectOnesNum;
table.UnitProjectOnesOKNum = newtable.UnitProjectOnesOKNum;
table.MaterialInRecheckNum = newtable.MaterialInRecheckNum;
table.MaterialInRecheckOKNum = newtable.MaterialInRecheckOKNum;
table.SingleProjectNum = newtable.SingleProjectNum;
table.UnitProjectNum = newtable.UnitProjectNum;
table.SubProjectNum = newtable.SubProjectNum;
table.SubdivisionalWorksNum = newtable.SubdivisionalWorksNum;
table.InspectionLotNum = newtable.InspectionLotNum;
table.State = newtable.State;
table.CreateMan = newtable.CreateMan;
table.CreateDate = newtable.CreateDate;
db.SubmitChanges();
}
}
}
public static void DeleteCQMSData_CQMSById(string id)
{
var db = Funs.DB;
var table = db.CQMSData_CQMS.FirstOrDefault(x => x.Id == id);
if (table != null)
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
db.CQMSData_CQMS.DeleteOnSubmit(table);
db.SubmitChanges();
var table = db.CQMSData_CQMS.FirstOrDefault(x => x.Id == id);
if (table != null)
{
db.CQMSData_CQMS.DeleteOnSubmit(table);
db.SubmitChanges();
}
}
}
@@ -396,52 +448,6 @@ namespace BLL
return data;
}
public static void UpdateCQMSData_CQMS(CQMSData_CQMS newtable)
{
var db = Funs.DB;
var table = db.CQMSData_CQMS.FirstOrDefault(x => x.Id == newtable.Id);
if (table != null)
{
table.Id = newtable.Id;
table.UnitId = newtable.UnitId;
table.CollCropCode = newtable.CollCropCode;
table.UnitName = newtable.UnitName;
table.ReportDate = newtable.ReportDate;
table.TrainPersonNum = newtable.TrainPersonNum;
table.TechnicalDisclosePersonNum = newtable.TechnicalDisclosePersonNum;
table.UseNum = newtable.UseNum;
table.OKNum = newtable.OKNum;
table.CompanyPersonNum = newtable.CompanyPersonNum;
table.BranchPersonNum = newtable.BranchPersonNum;
table.ProjectPersonNum = newtable.ProjectPersonNum;
table.ProblemNum = newtable.ProblemNum;
table.ProblemCompletedNum = newtable.ProblemCompletedNum;
table.ProblemNotCompletedNum = newtable.ProblemNotCompletedNum;
table.SNum = newtable.SNum;
table.ANum = newtable.ANum;
table.BNum = newtable.BNum;
table.CNum = newtable.CNum;
table.KeyProcessNum = newtable.KeyProcessNum;
table.KeyProcessOKNum = newtable.KeyProcessOKNum;
table.SpecialProcessNum = newtable.SpecialProcessNum;
table.SpecialProcessOKNum = newtable.SpecialProcessOKNum;
table.ConcealedWorksNum = newtable.ConcealedWorksNum;
table.ConcealedWorksOKNum = newtable.ConcealedWorksOKNum;
table.UnitProjectOnesNum = newtable.UnitProjectOnesNum;
table.UnitProjectOnesOKNum = newtable.UnitProjectOnesOKNum;
table.MaterialInRecheckNum = newtable.MaterialInRecheckNum;
table.MaterialInRecheckOKNum = newtable.MaterialInRecheckOKNum;
table.SingleProjectNum = newtable.SingleProjectNum;
table.UnitProjectNum = newtable.UnitProjectNum;
table.SubProjectNum = newtable.SubProjectNum;
table.SubdivisionalWorksNum = newtable.SubdivisionalWorksNum;
table.InspectionLotNum = newtable.InspectionLotNum;
table.State = newtable.State;
table.CreateMan = newtable.CreateMan;
table.CreateDate = newtable.CreateDate;
db.SubmitChanges();
}
}
/// <summary>
/// 获取企业总部人数