97 lines
4.1 KiB
C#
97 lines
4.1 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace BLL
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// 规格定义
|
|||
|
/// </summary>
|
|||
|
public class Base_HotProcessTechService
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// 根据主键获取规格定义
|
|||
|
/// </summary>
|
|||
|
/// <param name="formatId"></param>
|
|||
|
/// <returns></returns>
|
|||
|
public static Model.Base_HotProcessTech GetFormatById(string Id)
|
|||
|
{
|
|||
|
return Funs.DB.Base_HotProcessTech.FirstOrDefault(e => e.Id == Id);
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 添加规格定义
|
|||
|
/// </summary>
|
|||
|
/// <param name="format"></param>
|
|||
|
public static void AddHotProcessTech(Model.Base_HotProcessTech hotProcessTech )
|
|||
|
{
|
|||
|
Model.Base_HotProcessTech newHotProcessTech = new Model.Base_HotProcessTech();
|
|||
|
newHotProcessTech.Id = hotProcessTech.Id;
|
|||
|
newHotProcessTech.JOT_DiaMin = hotProcessTech.JOT_DiaMin;
|
|||
|
newHotProcessTech.ProjectId = hotProcessTech.ProjectId;
|
|||
|
newHotProcessTech.JOT_DiaMax = hotProcessTech.JOT_DiaMax;
|
|||
|
newHotProcessTech.PointNum = hotProcessTech.PointNum;
|
|||
|
newHotProcessTech.PointCount = hotProcessTech.PointCount;
|
|||
|
newHotProcessTech.RequiredT = hotProcessTech.RequiredT;
|
|||
|
newHotProcessTech.ActualT = hotProcessTech.ActualT;
|
|||
|
newHotProcessTech.ActualTime = hotProcessTech.ActualTime;
|
|||
|
newHotProcessTech.RequiredTime = hotProcessTech.RequiredTime;
|
|||
|
newHotProcessTech.TimeMin = hotProcessTech.TimeMin;
|
|||
|
newHotProcessTech.Material = hotProcessTech.Material;
|
|||
|
newHotProcessTech.HotHard = hotProcessTech.HotHard;
|
|||
|
newHotProcessTech.JointDesc = hotProcessTech.JointDesc;
|
|||
|
newHotProcessTech.CreateMan = hotProcessTech.CreateMan;
|
|||
|
newHotProcessTech.CreateDate = hotProcessTech.CreateDate;
|
|||
|
|
|||
|
Funs.DB.Base_HotProcessTech.InsertOnSubmit(newHotProcessTech);
|
|||
|
Funs.DB.SubmitChanges();
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 修改规格定义
|
|||
|
/// </summary>
|
|||
|
/// <param name="format"></param>
|
|||
|
public static void UpdateHotProcessTech(Model.Base_HotProcessTech hotProcessTech)
|
|||
|
{
|
|||
|
Model.Base_HotProcessTech newHotProcessTech = Funs.DB.Base_HotProcessTech.FirstOrDefault(e => e.Id == hotProcessTech.Id);
|
|||
|
if (newHotProcessTech != null)
|
|||
|
{
|
|||
|
newHotProcessTech.Id = hotProcessTech.Id;
|
|||
|
newHotProcessTech.JOT_DiaMin = hotProcessTech.JOT_DiaMin;
|
|||
|
newHotProcessTech.ProjectId = hotProcessTech.ProjectId;
|
|||
|
newHotProcessTech.JOT_DiaMax = hotProcessTech.JOT_DiaMax;
|
|||
|
newHotProcessTech.PointNum = hotProcessTech.PointNum;
|
|||
|
newHotProcessTech.PointCount = hotProcessTech.PointCount;
|
|||
|
newHotProcessTech.RequiredT = hotProcessTech.RequiredT;
|
|||
|
newHotProcessTech.ActualT = hotProcessTech.ActualT;
|
|||
|
newHotProcessTech.ActualTime = hotProcessTech.ActualTime;
|
|||
|
newHotProcessTech.RequiredTime = hotProcessTech.RequiredTime;
|
|||
|
newHotProcessTech.TimeMin = hotProcessTech.TimeMin;
|
|||
|
newHotProcessTech.Material = hotProcessTech.Material;
|
|||
|
newHotProcessTech.HotHard = hotProcessTech.HotHard;
|
|||
|
newHotProcessTech.JointDesc = hotProcessTech.JointDesc;
|
|||
|
newHotProcessTech.CreateDate = hotProcessTech.CreateDate;
|
|||
|
newHotProcessTech.CreateMan = hotProcessTech.CreateMan;
|
|||
|
|
|||
|
|
|||
|
Funs.DB.SubmitChanges();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 根据主键删除规格定义
|
|||
|
/// </summary>
|
|||
|
/// <param name="formatId"></param>
|
|||
|
public static void DeleteHotProcessTechById(string Id)
|
|||
|
{
|
|||
|
Model.Base_HotProcessTech base_HotProcessTech = Funs.DB.Base_HotProcessTech.FirstOrDefault(e => e.Id == Id);
|
|||
|
if (base_HotProcessTech != null)
|
|||
|
{
|
|||
|
Funs.DB.Base_HotProcessTech.DeleteOnSubmit(base_HotProcessTech);
|
|||
|
Funs.DB.SubmitChanges();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|