This commit is contained in:
2024-06-07 07:29:03 +08:00
26 changed files with 3493 additions and 1550 deletions
+4
View File
@@ -243,6 +243,10 @@ namespace BLL
/// </summary>
public const string WelderQueTemplateUrl = "File\\Excel\\WelderQue.xlsx";
/// <summary>
/// 焊工考试情况
/// </summary>
public const string WelderTestInfoTemplateUrl = "File\\Excel\\焊工考试情况.xlsx";
/// <summary>
/// 委托单导入模板
/// </summary>
@@ -0,0 +1,61 @@
using Model;
using NPOI.HSSF.EventUserModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public class WelderTestService
{
public static void Add(Model.Welder_TestInfo input)
{
var model = new Model.Welder_TestInfo();
model.Id = SQLHelper.GetNewID(typeof(Welder_TestInfo));
model.WeldMethodId = input.WeldMethodId;
model.MaterialId = input.MaterialId;
model.Remark = input.Remark;
model.ProjectId = input.ProjectId;
model.CreatedDate = input.CreatedDate;
model.ProjectId = input.ProjectId;
model.WelderId = input.WelderId;
model.IsPass = input.IsPass;
Funs.DB.Welder_TestInfo.InsertOnSubmit(model);
Funs.DB.SubmitChanges();
}
public static void Edit(Model.Welder_TestInfo input)
{
var result=Funs.DB.Welder_TestInfo.FirstOrDefault(t=>t.Id== input.Id);
if (result == null)
{
return ;
}
result.WelderId = input.WelderId;
result.WeldMethodId = input.WeldMethodId;
result.MaterialId = input.MaterialId;
result.Remark = input.Remark;
result.CreatedDate = input.CreatedDate;
result.IsPass = input.IsPass;
Funs.DB.SubmitChanges();
}
public static Model.Welder_TestInfo Get(string Id)
{
var result = Funs.DB.Welder_TestInfo.FirstOrDefault(t => t.Id == Id);
return result;
}
public static bool Delete(string Id)
{
var result = Funs.DB.Welder_TestInfo.FirstOrDefault(t => t.Id == Id);
if (result == null)
return false;
Funs.DB.Welder_TestInfo.DeleteOnSubmit(result);
Funs.DB.SubmitChanges();
return true;
}
}
}