This commit is contained in:
jackchenyang
2024-06-06 20:39:00 +08:00
parent fa12713e4c
commit 632ca53467
17 changed files with 1694 additions and 61 deletions
@@ -10,49 +10,43 @@ namespace BLL
{
public class WelderTestService
{
public bool Add(Model.Welder_TestInfo input)
public static void Add(Model.Welder_TestInfo input)
{
try
{
var model = new Model.Welder_TestInfo();
model.Id = SQLHelper.GetNewID(typeof(Welder_TestInfo));
model.WeldMethod = input.WeldMethod;
model.MaterialId = input.MaterialId;
model.Remark = input.Remark;
model.CreatedDate = input.CreatedDate;
model.IsPass = input.IsPass;
Funs.DB.Welder_TestInfo.InsertOnSubmit(model);
Funs.DB.SubmitChanges();
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog(ex, "添加焊工考试错误");
return false;
}
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 bool Edit(Model.Welder_TestInfo input)
public static void Edit(Model.Welder_TestInfo input)
{
var result=Funs.DB.Welder_TestInfo.FirstOrDefault(t=>t.Id== input.Id);
if (result == null)
{
return false;
return ;
}
result.WeldMethod = input.WeldMethod;
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();
return true;
}
public Model.Welder_TestInfo Get(string Id)
public static Model.Welder_TestInfo Get(string Id)
{
var result = Funs.DB.Welder_TestInfo.FirstOrDefault(t => t.Id == Id);
return result;
}
public bool Delete(string Id)
public static bool Delete(string Id)
{
var result = Funs.DB.Welder_TestInfo.FirstOrDefault(t => t.Id == Id);
if (result == null)