dd
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 安装组件
|
||||
/// </summary>
|
||||
public static class HJGL_ComponentsService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据安装组件ID获取安装组件信息
|
||||
/// </summary>
|
||||
/// <param name="com_id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_Component GetComponentByComID(string com_id)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_Component.FirstOrDefault(e => e.COM_ID == com_id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加安装组件
|
||||
/// </summary>
|
||||
/// <param name="component"></param>
|
||||
public static void AddComponent(Model.HJGL_BS_Component component)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_Component newComponent = new Model.HJGL_BS_Component();
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HJGL_BS_Component));
|
||||
|
||||
newComponent.COM_ID = newKeyID;
|
||||
newComponent.COM_Code = component.COM_Code;
|
||||
newComponent.COM_Name = component.COM_Name;
|
||||
newComponent.COM_Remark = component.COM_Remark;
|
||||
db.HJGL_BS_Component.InsertOnSubmit(newComponent);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改安装组件
|
||||
/// </summary>
|
||||
/// <param name="component"></param>
|
||||
public static void UpdateComponent(Model.HJGL_BS_Component component)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_Component newComponent = db.HJGL_BS_Component.FirstOrDefault(e => e.COM_ID == component.COM_ID);
|
||||
if (newComponent != null)
|
||||
{
|
||||
newComponent.COM_Code = component.COM_Code;
|
||||
newComponent.COM_Name = component.COM_Name;
|
||||
newComponent.COM_Remark = component.COM_Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除安装组件
|
||||
/// </summary>
|
||||
/// <param name="com_id"></param>
|
||||
public static void DeleteComponent(string com_id)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_Component component = db.HJGL_BS_Component.FirstOrDefault(e => e.COM_ID == com_id);
|
||||
if (component != null)
|
||||
{
|
||||
db.HJGL_BS_Component.DeleteOnSubmit(component);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否存在相同的组件代号
|
||||
/// </summary>
|
||||
/// <param name="com_code"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitComCode(string com_code, string id)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_Component.FirstOrDefault(x => x.COM_Code == com_code && x.COM_ID != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取焊缝类型名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_Component> GetComponentNameList()
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_BS_Component orderby x.COM_Code select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 组件代码获取组件代号信息
|
||||
/// </summary>
|
||||
/// <param name="unitCode"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_Component GetComponentByComponentCode(string componentCode)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_Component.FirstOrDefault(x => x.COM_Code == componentCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
||||
public static class HJGL_ConsumablesService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据焊接耗材ID获取区域信息
|
||||
/// </summary>
|
||||
/// <param name="ConsumablesName"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_WeldMaterial getConsumablesByConsumablesId(string ConsumablesId)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_WeldMaterial.FirstOrDefault(e => e.WMT_ID == ConsumablesId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据焊接耗材Code获取区域信息
|
||||
/// </summary>
|
||||
/// <param name="ConsumablesName"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExistConsumablesCode(string consumablesCode, string consumablesId)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_WeldMaterial.FirstOrDefault(x => x.WMT_MatCode == consumablesCode && x.WMT_ID != consumablesId);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加焊接耗材
|
||||
/// </summary>
|
||||
/// <param name="Consumables"></param>
|
||||
public static void AddConsumables(Model.HJGL_BS_WeldMaterial Consumables)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HJGL_BS_WeldMaterial));
|
||||
Model.HJGL_BS_WeldMaterial newConsumables = new Model.HJGL_BS_WeldMaterial();
|
||||
newConsumables.WMT_ID = newKeyID;
|
||||
newConsumables.WMT_MatCode = Consumables.WMT_MatCode;
|
||||
newConsumables.WMT_MatName = Consumables.WMT_MatName;
|
||||
newConsumables.WMT_MatType = Consumables.WMT_MatType;
|
||||
newConsumables.WMT_Remark = Consumables.WMT_Remark;
|
||||
|
||||
db.HJGL_BS_WeldMaterial.InsertOnSubmit(newConsumables);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改焊接耗材
|
||||
/// </summary>
|
||||
/// <param name="Consumables"></param>
|
||||
public static void updateConsumables(Model.HJGL_BS_WeldMaterial Consumables)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_WeldMaterial newConsumables = db.HJGL_BS_WeldMaterial.FirstOrDefault(e => e.WMT_ID == Consumables.WMT_ID);
|
||||
if (newConsumables != null)
|
||||
{
|
||||
newConsumables.WMT_MatCode = Consumables.WMT_MatCode;
|
||||
newConsumables.WMT_MatName = Consumables.WMT_MatName;
|
||||
newConsumables.WMT_MatType = Consumables.WMT_MatType;
|
||||
newConsumables.WMT_Remark = Consumables.WMT_Remark;
|
||||
newConsumables.WMT_Remark = Consumables.WMT_Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据焊接耗材Id删除一个焊接耗材信息
|
||||
/// </summary>
|
||||
/// <param name="ConsumablesId"></param>
|
||||
public static void DeleteConsumables(string ConsumablesId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_WeldMaterial Consumables = db.HJGL_BS_WeldMaterial.FirstOrDefault(e => e.WMT_ID == ConsumablesId);
|
||||
if (Consumables != null)
|
||||
{
|
||||
db.HJGL_BS_WeldMaterial.DeleteOnSubmit(Consumables);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据焊接耗材代码获取焊接耗材信息
|
||||
/// </summary>
|
||||
/// <param name="unitCode"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_WeldMaterial GetMaterialByMaterialCode(string materialCode)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_WeldMaterial.FirstOrDefault(x => x.WMT_MatCode == materialCode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取材料信息名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_WeldMaterial> GetMaterialList(string type)
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_BS_WeldMaterial
|
||||
where (type != null && x.WMT_MatType == type)
|
||||
orderby x.WMT_MatCode select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 获取焊丝代号
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public static List<Model.HJGL_BS_WeldMaterial> GetMaterialSilkList()
|
||||
//{
|
||||
// var q = (from x in Funs.DB.HJGL_BS_WeldMaterial where x.WMT_MatType=="1" orderby x.WMT_MatCode select x).ToList();
|
||||
// return q;
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 获取焊条代号
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public static List<Model.HJGL_BS_WeldMaterial> GetMaterialWeldMatList()
|
||||
//{
|
||||
// var q = (from x in Funs.DB.HJGL_BS_WeldMaterial where x.WMT_MatType == "2" orderby x.WMT_MatCode select x).ToList();
|
||||
// return q;
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 直径寸径对照
|
||||
/// </summary>
|
||||
public static class HJGL_ControlService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据ID获取直径寸径对照
|
||||
/// </summary>
|
||||
/// <param name="bst_id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_SchTab GetSchTabByBSTID(string bst_id)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_SchTab.FirstOrDefault(e => e.BST_ID == bst_id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据公称直径获取寸径
|
||||
/// </summary>
|
||||
/// <param name="bst_id"></param>
|
||||
/// <returns></returns>
|
||||
public static decimal? GetSizeByDn(string bst_dn)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_SchTab.FirstOrDefault(x => x.BST_DN == bst_dn);
|
||||
if (q != null)
|
||||
{
|
||||
return q.BST_Inch;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <param name="schTab"></param>
|
||||
public static void AddSchTab(Model.HJGL_BS_SchTab schTab)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HJGL_BS_SchTab));
|
||||
Model.HJGL_BS_SchTab newSchTab = new Model.HJGL_BS_SchTab();
|
||||
|
||||
newSchTab.BST_ID = newKeyID;
|
||||
newSchTab.BST_Code = schTab.BST_Code;
|
||||
newSchTab.BST_Dia = schTab.BST_Dia;
|
||||
newSchTab.BST_DN =schTab.BST_DN;
|
||||
newSchTab.BST_Inch = schTab.BST_Inch;
|
||||
newSchTab.BST_Sch5s = schTab.BST_Sch5s;
|
||||
newSchTab.BST_Sch10s = schTab.BST_Sch10s;
|
||||
newSchTab.BST_Sch10 = schTab.BST_Sch10;
|
||||
newSchTab.BST_Sch120 = schTab.BST_Sch20;
|
||||
newSchTab.BST_Sch30 = schTab.BST_Sch30;
|
||||
newSchTab.BST_Sch40s = schTab.BST_Sch40s;
|
||||
newSchTab.BST_STD = schTab.BST_STD;
|
||||
newSchTab.BST_Sch40 = schTab.BST_Sch40;
|
||||
newSchTab.BST_Sch60 = schTab.BST_Sch60;
|
||||
newSchTab.BST_Sch80s = schTab.BST_Sch80s;
|
||||
newSchTab.BST_XS = schTab.BST_XS;
|
||||
newSchTab.BST_Sch80 = schTab.BST_Sch80;
|
||||
newSchTab.BST_Sch100 = schTab.BST_Sch100;
|
||||
newSchTab.BST_Sch120 = schTab.BST_Sch120;
|
||||
newSchTab.BST_Sch140 = schTab.BST_Sch140;
|
||||
newSchTab.BST_Sch160 = schTab.BST_Sch160;
|
||||
newSchTab.BST_XXS = schTab.BST_XXS;
|
||||
newSchTab.BST_Remark = schTab.BST_Remark;
|
||||
|
||||
db.HJGL_BS_SchTab.InsertOnSubmit(newSchTab);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="schTab"></param>
|
||||
public static void UpdateSchTab(Model.HJGL_BS_SchTab schTab)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_SchTab newSchTab = db.HJGL_BS_SchTab.FirstOrDefault(e => e.BST_ID == schTab.BST_ID);
|
||||
if (newSchTab != null)
|
||||
{
|
||||
newSchTab.BST_Code = schTab.BST_Code;
|
||||
newSchTab.BST_Dia = schTab.BST_Dia;
|
||||
newSchTab.BST_DN = schTab.BST_DN;
|
||||
newSchTab.BST_Inch = schTab.BST_Inch;
|
||||
newSchTab.BST_Sch5s = schTab.BST_Sch5s;
|
||||
newSchTab.BST_Sch10s = schTab.BST_Sch10s;
|
||||
newSchTab.BST_Sch10 = schTab.BST_Sch10;
|
||||
newSchTab.BST_Sch120 = schTab.BST_Sch20;
|
||||
newSchTab.BST_Sch30 = schTab.BST_Sch30;
|
||||
newSchTab.BST_Sch40s = schTab.BST_Sch40s;
|
||||
newSchTab.BST_STD = schTab.BST_STD;
|
||||
newSchTab.BST_Sch40 = schTab.BST_Sch40;
|
||||
newSchTab.BST_Sch60 = schTab.BST_Sch60;
|
||||
newSchTab.BST_Sch80s = schTab.BST_Sch80s;
|
||||
newSchTab.BST_XS = schTab.BST_XS;
|
||||
newSchTab.BST_Sch80 = schTab.BST_Sch80;
|
||||
newSchTab.BST_Sch100 = schTab.BST_Sch100;
|
||||
newSchTab.BST_Sch120 = schTab.BST_Sch120;
|
||||
newSchTab.BST_Sch140 = schTab.BST_Sch140;
|
||||
newSchTab.BST_Sch160 = schTab.BST_Sch160;
|
||||
newSchTab.BST_XXS = schTab.BST_XXS;
|
||||
newSchTab.BST_Remark = schTab.BST_Remark;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="bst_id"></param>
|
||||
public static void DeleteSchTab(string bst_id)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_SchTab schTab = db.HJGL_BS_SchTab.FirstOrDefault(e => e.BST_ID == bst_id);
|
||||
if (schTab != null)
|
||||
{
|
||||
db.HJGL_BS_SchTab.DeleteOnSubmit(schTab);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否存在相同的外径
|
||||
/// </summary>
|
||||
/// <param name="bst_code"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitBST_Dia(decimal dia, string id)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_SchTab.FirstOrDefault(x => x.BST_Dia == dia && x.BST_ID != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据输入外径得到寸经
|
||||
/// </summary>
|
||||
/// <param name="dia"></param>
|
||||
/// <returns></returns>
|
||||
public static decimal? GetSizeByDia(decimal dia)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_SchTab.FirstOrDefault(x => x.BST_Dia == dia);
|
||||
if (q != null)
|
||||
{
|
||||
return q.BST_Inch;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 探伤比例
|
||||
/// </summary>
|
||||
public static class HJGL_DetectionService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据探伤比例Id获取探伤比例
|
||||
/// </summary>
|
||||
/// <param name="ndtrId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_NDTRate GetNDTRateByNDTRID(string ndtrId)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_NDTRate.FirstOrDefault(e => e.NDTR_ID == ndtrId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加探伤比例
|
||||
/// </summary>
|
||||
/// <param name="ndtrate"></param>
|
||||
public static void AddNDTRate(Model.HJGL_BS_NDTRate ndtrate)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_NDTRate newNDTRate = new Model.HJGL_BS_NDTRate();
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HJGL_BS_NDTRate));
|
||||
newNDTRate.NDTR_ID = newKeyID;
|
||||
newNDTRate.NDTR_Code = ndtrate.NDTR_Code;
|
||||
newNDTRate.NDTR_Name = ndtrate.NDTR_Name;
|
||||
newNDTRate.NDTR_Rate = ndtrate.NDTR_Rate;
|
||||
newNDTRate.NDTR_Remark = ndtrate.NDTR_Remark;
|
||||
db.HJGL_BS_NDTRate.InsertOnSubmit(newNDTRate);
|
||||
db.SubmitChanges();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="ndtrate"></param>
|
||||
public static void UpdateNDTRate(Model.HJGL_BS_NDTRate ndtrate)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_NDTRate newNDTRate = db.HJGL_BS_NDTRate.FirstOrDefault(e => e.NDTR_ID == ndtrate.NDTR_ID);
|
||||
if (newNDTRate != null)
|
||||
{
|
||||
newNDTRate.NDTR_Code = ndtrate.NDTR_Code;
|
||||
newNDTRate.NDTR_Name = ndtrate.NDTR_Name;
|
||||
newNDTRate.NDTR_Rate = ndtrate.NDTR_Rate;
|
||||
newNDTRate.NDTR_Remark = ndtrate.NDTR_Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="ndtrateId"></param>
|
||||
public static void DeleteNDTRate(string ndtrateId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_NDTRate ndtrate = db.HJGL_BS_NDTRate.FirstOrDefault(e => e.NDTR_ID == ndtrateId);
|
||||
if (ndtrate != null)
|
||||
{
|
||||
db.HJGL_BS_NDTRate.DeleteOnSubmit(ndtrate);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否存在相同的探伤类型代号
|
||||
/// </summary>
|
||||
/// <param name="ndtrateCode"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitNDTRateCode(string ndtrateCode,string id )
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
id = "";
|
||||
}
|
||||
var q = Funs.DB.HJGL_BS_NDTRate.FirstOrDefault(x => x.NDTR_Code == ndtrateCode && x.NDTR_ID != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取探伤比例下拉框
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_NDTRate> GetNDTRateNameList()
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_BS_NDTRate orderby x.NDTR_Code select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取探伤比例下拉框
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetNDTRateNameItemList()
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_BS_NDTRate orderby x.NDTR_Code select x).ToList();
|
||||
ListItem[] list = new ListItem[q.Count()];
|
||||
for (int i = 0; i < q.Count(); i++)
|
||||
{
|
||||
list[i] = new ListItem(q[i].NDTR_Code + "%", q[i].NDTR_ID.ToString());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据探伤值获取探伤类型信息
|
||||
/// </summary>
|
||||
/// <param name="unitCode"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_NDTRate GetRateByRateName(string rateName)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_NDTRate.FirstOrDefault(x => x.NDTR_Name == rateName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备
|
||||
/// </summary>
|
||||
public static class HJGL_EquipmentService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取设备
|
||||
/// </summary>
|
||||
/// <param name="equipmentId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_Equipment GetEquipmentById(string equipmentId)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_Equipment.FirstOrDefault(e => e.EquipmentId == equipmentId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加设备
|
||||
/// </summary>
|
||||
/// <param name="equipment"></param>
|
||||
public static void AddEquipment(Model.HJGL_BS_Equipment equipment)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_Equipment newEquipment = new Model.HJGL_BS_Equipment();
|
||||
newEquipment.EquipmentId = equipment.EquipmentId;
|
||||
newEquipment.EquipmentCode = equipment.EquipmentCode;
|
||||
newEquipment.EquipmentName = equipment.EquipmentName;
|
||||
newEquipment.Remarks = equipment.Remarks;
|
||||
newEquipment.FocalSize = equipment.FocalSize;
|
||||
newEquipment.FilmModel = equipment.FilmModel;
|
||||
newEquipment.IntensifyingWay = equipment.IntensifyingWay;
|
||||
newEquipment.LineEnergy = equipment.LineEnergy;
|
||||
db.HJGL_BS_Equipment.InsertOnSubmit(newEquipment);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
//修改设备
|
||||
public static void UpdateEquipment(Model.HJGL_BS_Equipment equipment)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_Equipment newEquipment = db.HJGL_BS_Equipment.FirstOrDefault(e => e.EquipmentId == equipment.EquipmentId);
|
||||
if (newEquipment != null)
|
||||
{
|
||||
newEquipment.EquipmentCode = equipment.EquipmentCode;
|
||||
newEquipment.EquipmentName = equipment.EquipmentName;
|
||||
newEquipment.Remarks = equipment.Remarks;
|
||||
newEquipment.FocalSize = equipment.FocalSize;
|
||||
newEquipment.FilmModel = equipment.FilmModel;
|
||||
newEquipment.IntensifyingWay = equipment.IntensifyingWay;
|
||||
newEquipment.LineEnergy = equipment.LineEnergy;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除设备
|
||||
/// </summary>
|
||||
/// <param name="equipmentId"></param>
|
||||
public static void DeleteEquipmentById(string equipmentId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_Equipment equipment = db.HJGL_BS_Equipment.FirstOrDefault(e => e.EquipmentId == equipmentId);
|
||||
if (equipment != null)
|
||||
{
|
||||
db.HJGL_BS_Equipment.DeleteOnSubmit(equipment);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否存在相同的设备编号
|
||||
/// </summary>
|
||||
/// <param name="equipmentCode"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitEquipmentCode(string equipmentCode, string id)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_Equipment.FirstOrDefault(x => x.EquipmentCode == equipmentCode && x.EquipmentId != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取设备集合信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_Equipment> GetEquipmentList()
|
||||
{
|
||||
return (from x in Funs.DB.HJGL_BS_Equipment orderby x.EquipmentCode select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 执行标准
|
||||
/// </summary>
|
||||
public static class HJGL_ExecStandardService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取执行标准
|
||||
/// </summary>
|
||||
/// <param name="execStandardId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_ExecStandard GetExecStandardById(string execStandardId)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_ExecStandard.FirstOrDefault(e => e.ExecStandardId == execStandardId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加执行标准
|
||||
/// </summary>
|
||||
/// <param name="execStandard"></param>
|
||||
public static void AddExecStandard(Model.HJGL_BS_ExecStandard execStandard)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_ExecStandard newExecStandard = new Model.HJGL_BS_ExecStandard();
|
||||
newExecStandard.ExecStandardId = execStandard.ExecStandardId;
|
||||
newExecStandard.ExecStandardName = execStandard.ExecStandardName;
|
||||
newExecStandard.Def = execStandard.Def;
|
||||
db.HJGL_BS_ExecStandard.InsertOnSubmit(newExecStandard);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改执行标准
|
||||
/// </summary>
|
||||
/// <param name="execStandard"></param>
|
||||
public static void UpdateExecStandard(Model.HJGL_BS_ExecStandard execStandard)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_ExecStandard newExecStandard = db.HJGL_BS_ExecStandard.FirstOrDefault(e => e.ExecStandardId == execStandard.ExecStandardId);
|
||||
if (newExecStandard != null)
|
||||
{
|
||||
newExecStandard.ExecStandardName = execStandard.ExecStandardName;
|
||||
newExecStandard.Def = execStandard.Def;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除执行标准
|
||||
/// </summary>
|
||||
/// <param name="execStandardId"></param>
|
||||
public static void DeleteExecStandardById(string execStandardId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_ExecStandard execStandard = db.HJGL_BS_ExecStandard.FirstOrDefault(e => e.ExecStandardId == execStandardId);
|
||||
if (execStandard != null)
|
||||
{
|
||||
db.HJGL_BS_ExecStandard.DeleteOnSubmit(execStandard);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取执行标准列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_ExecStandard> GetExecStandardNameList()
|
||||
{
|
||||
return (from x in Funs.DB.HJGL_BS_ExecStandard orderby x.ExecStandardName select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 坡口类型
|
||||
/// </summary>
|
||||
public static class HJGL_GrooveService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据ID获取坡口类型
|
||||
/// </summary>
|
||||
/// <param name="jst_id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_SlopeType GetSlopeTypeByJSTID(string jst_id)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_SlopeType.FirstOrDefault(e => e.JST_ID == jst_id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <param name="slopeType"></param>
|
||||
public static void AddSlopeType(Model.HJGL_BS_SlopeType slopeType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_SlopeType newSlopeType = new Model.HJGL_BS_SlopeType();
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HJGL_BS_SlopeType));
|
||||
newSlopeType.JST_ID = newKeyID;
|
||||
newSlopeType.JST_Code = slopeType.JST_Code;
|
||||
newSlopeType.JST_Name = slopeType.JST_Name;
|
||||
newSlopeType.JST_Remark = slopeType.JST_Remark;
|
||||
db.HJGL_BS_SlopeType.InsertOnSubmit(newSlopeType);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="slopeType"></param>
|
||||
public static void UpdateSlopeType(Model.HJGL_BS_SlopeType slopeType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_SlopeType newSlopeType = db.HJGL_BS_SlopeType.FirstOrDefault(e => e.JST_ID == slopeType.JST_ID);
|
||||
if (newSlopeType != null)
|
||||
{
|
||||
newSlopeType.JST_Code = slopeType.JST_Code;
|
||||
newSlopeType.JST_Name = slopeType.JST_Name;
|
||||
newSlopeType.JST_Remark = slopeType.JST_Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="jst_id"></param>
|
||||
public static void DeleteSlopeType(string jst_id)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_SlopeType newSlopeType = db.HJGL_BS_SlopeType.FirstOrDefault(e => e.JST_ID == jst_id);
|
||||
if (newSlopeType != null)
|
||||
{
|
||||
db.HJGL_BS_SlopeType.DeleteOnSubmit(newSlopeType);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否存在相同的直径代号
|
||||
/// </summary>
|
||||
/// <param name="jst_code"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitJSTCode(string jst_code,string id)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_SlopeType.FirstOrDefault(x => x.JST_Code == jst_code && x.JST_ID != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据坡口代码获取坡口类型信息
|
||||
/// </summary>
|
||||
/// <param name="unitCode"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_SlopeType GetSlopeTypeBySlopeTypeCode(string slopeTypeCode)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_SlopeType.FirstOrDefault(x => x.JST_Code == slopeTypeCode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取坡口类型下拉框方法
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_SlopeType> GetSlopeTypeNameList()
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_BS_SlopeType orderby x.JST_Code select x).ToList();
|
||||
return q;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 热处理工艺卡目录
|
||||
/// </summary>
|
||||
public static class HJGL_HotProcessCardService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取热处理工艺卡目录
|
||||
/// </summary>
|
||||
/// <param name="hpcId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_Base_HotProcessCard GetHotProcessCardById(string hpcId)
|
||||
{
|
||||
return Funs.DB.HJGL_Base_HotProcessCard.FirstOrDefault(e => e.HpcId == hpcId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加热处理工艺卡目录
|
||||
/// </summary>
|
||||
/// <param name="hotProcessCard"></param>
|
||||
public static void AddHotProcessCard(Model.HJGL_Base_HotProcessCard hotProcessCard)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_Base_HotProcessCard newHotProcessCard = new Model.HJGL_Base_HotProcessCard();
|
||||
newHotProcessCard.HpcId = hotProcessCard.HpcId;
|
||||
newHotProcessCard.Shejiwj = hotProcessCard.Shejiwj;
|
||||
newHotProcessCard.Guandaocz = hotProcessCard.Guandaocz;
|
||||
newHotProcessCard.Guandaogg = hotProcessCard.Guandaogg;
|
||||
newHotProcessCard.Jietouxs = hotProcessCard.Jietouxs;
|
||||
newHotProcessCard.Yijuhanpin = hotProcessCard.Yijuhanpin;
|
||||
newHotProcessCard.Kzxtxh = hotProcessCard.Kzxtxh;
|
||||
newHotProcessCard.Jiareqixh = hotProcessCard.Jiareqixh;
|
||||
newHotProcessCard.Cewenyq = hotProcessCard.Cewenyq;
|
||||
newHotProcessCard.Buchangdx = hotProcessCard.Buchangdx;
|
||||
newHotProcessCard.Jiaredaigd = hotProcessCard.Jiaredaigd;
|
||||
newHotProcessCard.Bwkuandu = hotProcessCard.Bwkuandu;
|
||||
newHotProcessCard.Bwcailao = hotProcessCard.Bwcailao;
|
||||
newHotProcessCard.Bwdianshu = hotProcessCard.Bwdianshu;
|
||||
newHotProcessCard.Cewendianshc = hotProcessCard.Cewendianshc;
|
||||
newHotProcessCard.Hanhouchl = hotProcessCard.Hanhouchl;
|
||||
newHotProcessCard.Jiaresd = hotProcessCard.Jiaresd;
|
||||
newHotProcessCard.Bwwendu = hotProcessCard.Bwwendu;
|
||||
newHotProcessCard.Bwshijian = hotProcessCard.Bwshijian;
|
||||
newHotProcessCard.Lenquesd = hotProcessCard.Lenquesd;
|
||||
newHotProcessCard.Ewailq = hotProcessCard.Ewailq;
|
||||
newHotProcessCard.Lilunhanhou = hotProcessCard.Lilunhanhou;
|
||||
newHotProcessCard.Qishuyq = hotProcessCard.Qishuyq;
|
||||
newHotProcessCard.Qitashc = hotProcessCard.Qitashc;
|
||||
db.HJGL_Base_HotProcessCard.InsertOnSubmit(newHotProcessCard);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改热处理工艺卡目录
|
||||
/// </summary>
|
||||
/// <param name="hotProcessCard"></param>
|
||||
public static void UpdateHotProcessCard(Model.HJGL_Base_HotProcessCard hotProcessCard)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_Base_HotProcessCard newHotProcessCard = db.HJGL_Base_HotProcessCard.FirstOrDefault(e => e.HpcId == hotProcessCard.HpcId);
|
||||
if (newHotProcessCard != null)
|
||||
{
|
||||
newHotProcessCard.Shejiwj = hotProcessCard.Shejiwj;
|
||||
newHotProcessCard.Guandaocz = hotProcessCard.Guandaocz;
|
||||
newHotProcessCard.Guandaogg = hotProcessCard.Guandaogg;
|
||||
newHotProcessCard.Jietouxs = hotProcessCard.Jietouxs;
|
||||
newHotProcessCard.Yijuhanpin = hotProcessCard.Yijuhanpin;
|
||||
newHotProcessCard.Kzxtxh = hotProcessCard.Kzxtxh;
|
||||
newHotProcessCard.Jiareqixh = hotProcessCard.Jiareqixh;
|
||||
newHotProcessCard.Cewenyq = hotProcessCard.Cewenyq;
|
||||
newHotProcessCard.Buchangdx = hotProcessCard.Buchangdx;
|
||||
newHotProcessCard.Jiaredaigd = hotProcessCard.Jiaredaigd;
|
||||
newHotProcessCard.Bwkuandu = hotProcessCard.Bwkuandu;
|
||||
newHotProcessCard.Bwcailao = hotProcessCard.Bwcailao;
|
||||
newHotProcessCard.Bwdianshu = hotProcessCard.Bwdianshu;
|
||||
newHotProcessCard.Cewendianshc = hotProcessCard.Cewendianshc;
|
||||
newHotProcessCard.Hanhouchl = hotProcessCard.Hanhouchl;
|
||||
newHotProcessCard.Jiaresd = hotProcessCard.Jiaresd;
|
||||
newHotProcessCard.Bwwendu = hotProcessCard.Bwwendu;
|
||||
newHotProcessCard.Bwshijian = hotProcessCard.Bwshijian;
|
||||
newHotProcessCard.Lenquesd = hotProcessCard.Lenquesd;
|
||||
newHotProcessCard.Ewailq = hotProcessCard.Ewailq;
|
||||
newHotProcessCard.Lilunhanhou = hotProcessCard.Lilunhanhou;
|
||||
newHotProcessCard.Qishuyq = hotProcessCard.Qishuyq;
|
||||
newHotProcessCard.Qitashc = hotProcessCard.Qitashc;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除热处理工艺卡目录
|
||||
/// </summary>
|
||||
/// <param name="hpcId"></param>
|
||||
public static void DeleteHotProcessCardById(string hpcId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_Base_HotProcessCard hotProcessCard = db.HJGL_Base_HotProcessCard.FirstOrDefault(e => e.HpcId == hpcId);
|
||||
if (hotProcessCard != null)
|
||||
{
|
||||
db.HJGL_Base_HotProcessCard.DeleteOnSubmit(hotProcessCard);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取热处理工艺卡目录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_Base_HotProcessCard> GetHotProcessCardList()
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_Base_HotProcessCard
|
||||
//join y in db.HJGL_BS_Steel on x.Guandaocz equals y.STE_ID
|
||||
orderby x.Shejiwj
|
||||
select x).ToList();
|
||||
return q;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 简图明细表
|
||||
/// </summary>
|
||||
public static class HJGL_JointImageItemService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取简图明细
|
||||
/// </summary>
|
||||
/// <param name="jointImageItemId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_WeldingProcedure_JointImageItem GetJointImageItemById(string jointImageItemId)
|
||||
{
|
||||
return Funs.DB.HJGL_WeldingProcedure_JointImageItem.FirstOrDefault(e => e.JointImageItemId == jointImageItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据简图Id获取所有相关明细
|
||||
/// </summary>
|
||||
/// <param name="jointImageId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_WeldingProcedure_JointImageItem> GetJointImageItemListByJointImageId(string jointImageId)
|
||||
{
|
||||
return (from x in Funs.DB.HJGL_WeldingProcedure_JointImageItem where x.JointImageId == jointImageId orderby x.Code descending select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加简图明细
|
||||
/// </summary>
|
||||
/// <param name="jointImageItem"></param>
|
||||
public static void AddJointImageItem(Model.HJGL_WeldingProcedure_JointImageItem jointImageItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_WeldingProcedure_JointImageItem newJointImageItem = new Model.HJGL_WeldingProcedure_JointImageItem();
|
||||
newJointImageItem.JointImageItemId = jointImageItem.JointImageItemId;
|
||||
newJointImageItem.JointImageId = jointImageItem.JointImageId;
|
||||
newJointImageItem.Code = jointImageItem.Code;
|
||||
newJointImageItem.WME_ID = jointImageItem.WME_ID;
|
||||
newJointImageItem.WeldCurrent = jointImageItem.WeldCurrent;
|
||||
newJointImageItem.WeldVoltage = jointImageItem.WeldVoltage;
|
||||
newJointImageItem.WeldSpeed = jointImageItem.WeldSpeed;
|
||||
db.HJGL_WeldingProcedure_JointImageItem.InsertOnSubmit(newJointImageItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改简图明细
|
||||
/// </summary>
|
||||
/// <param name="jointImageItem"></param>
|
||||
public static void UpdateJointImageItem(Model.HJGL_WeldingProcedure_JointImageItem jointImageItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_WeldingProcedure_JointImageItem newJointImageItem = db.HJGL_WeldingProcedure_JointImageItem.FirstOrDefault(e => e.JointImageItemId == jointImageItem.JointImageItemId);
|
||||
if (newJointImageItem != null)
|
||||
{
|
||||
newJointImageItem.Code = jointImageItem.Code;
|
||||
newJointImageItem.WME_ID = jointImageItem.WME_ID;
|
||||
newJointImageItem.WeldCurrent = jointImageItem.WeldCurrent;
|
||||
newJointImageItem.WeldVoltage = jointImageItem.WeldVoltage;
|
||||
newJointImageItem.WeldSpeed = jointImageItem.WeldSpeed;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除简图明细
|
||||
/// </summary>
|
||||
/// <param name="jointImageItemId"></param>
|
||||
public static void DeleteJointImageItemById(string jointImageItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_WeldingProcedure_JointImageItem jointImageItem = db.HJGL_WeldingProcedure_JointImageItem.FirstOrDefault(e => e.JointImageItemId == jointImageItemId);
|
||||
if (jointImageItem != null)
|
||||
{
|
||||
db.HJGL_WeldingProcedure_JointImageItem.DeleteOnSubmit(jointImageItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除所有相关明细信息
|
||||
/// </summary>
|
||||
/// <param name="jointImageId"></param>
|
||||
public static void DeleteJointImageItemByJointImageId(string jointImageId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var jointImage = (from x in db.HJGL_WeldingProcedure_JointImageItem where x.JointImageId == jointImageId select x).ToList();
|
||||
if (jointImage != null)
|
||||
{
|
||||
db.HJGL_WeldingProcedure_JointImageItem.DeleteAllOnSubmit(jointImage);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 焊接接头简图
|
||||
/// </summary>
|
||||
public static class HJGL_JointImageService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取焊接接头简图
|
||||
/// </summary>
|
||||
/// <param name="jointImageId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_WeldingProcedure_JointImage GetJointImageById(string jointImageId)
|
||||
{
|
||||
return Funs.DB.HJGL_WeldingProcedure_JointImage.FirstOrDefault(e => e.JointImageId == jointImageId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加焊接接头简图
|
||||
/// </summary>
|
||||
/// <param name="jointImage"></param>
|
||||
public static void AddJointImage(Model.HJGL_WeldingProcedure_JointImage jointImage)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_WeldingProcedure_JointImage newJointImage = new Model.HJGL_WeldingProcedure_JointImage();
|
||||
newJointImage.JointImageId = jointImage.JointImageId;
|
||||
newJointImage.JointImageName = jointImage.JointImageName;
|
||||
newJointImage.Remark = jointImage.Remark;
|
||||
db.HJGL_WeldingProcedure_JointImage.InsertOnSubmit(newJointImage);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改焊接接头简图
|
||||
/// </summary>
|
||||
/// <param name="jointImage"></param>
|
||||
public static void UpdateJointImage(Model.HJGL_WeldingProcedure_JointImage jointImage)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_WeldingProcedure_JointImage newJointImage = db.HJGL_WeldingProcedure_JointImage.FirstOrDefault(e => e.JointImageId == jointImage.JointImageId);
|
||||
if (newJointImage != null)
|
||||
{
|
||||
newJointImage.JointImageName = jointImage.JointImageName;
|
||||
newJointImage.Remark = jointImage.Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除焊接接头简图
|
||||
/// </summary>
|
||||
/// <param name="jointImageId"></param>
|
||||
public static void DeleteJointImageById(string jointImageId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_WeldingProcedure_JointImage jointImage = db.HJGL_WeldingProcedure_JointImage.FirstOrDefault(e => e.JointImageId == jointImageId);
|
||||
if (jointImage != null)
|
||||
{
|
||||
AttachFileService.DeleteAttachFile(Funs.RootPath, jointImageId, Const.HJGL_JointImageMenuId);//删除附件
|
||||
db.HJGL_WeldingProcedure_JointImage.DeleteOnSubmit(jointImage);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取焊接接头简图列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_WeldingProcedure_JointImage> GetJointImageList()
|
||||
{
|
||||
return (from x in Funs.DB.HJGL_WeldingProcedure_JointImage orderby x.JointImageName select x).ToList();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 焊评材质类别
|
||||
/// </summary>
|
||||
public static class HJGL_MaterialClassService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取焊评材质类别
|
||||
/// </summary>
|
||||
/// <param name="materialClassId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_MaterialClass GetMaterialClassById(string materialClassId)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_MaterialClass.FirstOrDefault(e => e.MaterialClassId == materialClassId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取焊评材质类别列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_MaterialClass> GetMaterialClassList()
|
||||
{
|
||||
return (from x in Funs.DB.HJGL_BS_MaterialClass orderby x.MaterialClassCode select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加焊评材质类别
|
||||
/// </summary>
|
||||
/// <param name="materialClass"></param>
|
||||
public static void AddMaterialClass(Model.HJGL_BS_MaterialClass materialClass)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_MaterialClass newMaterialClass = new Model.HJGL_BS_MaterialClass();
|
||||
newMaterialClass.MaterialClassId = materialClass.MaterialClassId;
|
||||
newMaterialClass.MaterialClassCode = materialClass.MaterialClassCode;
|
||||
newMaterialClass.MaterialClass = materialClass.MaterialClass;
|
||||
newMaterialClass.Remark = materialClass.Remark;
|
||||
db.HJGL_BS_MaterialClass.InsertOnSubmit(newMaterialClass);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改焊评材质类别
|
||||
/// </summary>
|
||||
/// <param name="materialClass"></param>
|
||||
public static void UpdateMaterialClass(Model.HJGL_BS_MaterialClass materialClass)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_MaterialClass newMaterialClass = db.HJGL_BS_MaterialClass.FirstOrDefault(e => e.MaterialClassId == materialClass.MaterialClassId);
|
||||
if (newMaterialClass != null)
|
||||
{
|
||||
newMaterialClass.MaterialClassCode = materialClass.MaterialClassCode;
|
||||
newMaterialClass.MaterialClass = materialClass.MaterialClass;
|
||||
newMaterialClass.Remark = materialClass.Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除焊评材质类别
|
||||
/// </summary>
|
||||
/// <param name="materialClassId"></param>
|
||||
public static void DeleteMaterialClassById(string materialClassId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_MaterialClass materialClass = db.HJGL_BS_MaterialClass.FirstOrDefault(e => e.MaterialClassId == materialClassId);
|
||||
if (materialClass != null)
|
||||
{
|
||||
db.HJGL_BS_MaterialClass.DeleteOnSubmit(materialClass);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否存在相同的编号
|
||||
/// </summary>
|
||||
/// <param name="materialClassCode"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitMaterialClassCode(string materialClassCode, string id)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_MaterialClass.FirstOrDefault(x => x.MaterialClassCode == materialClassCode && x.MaterialClassId != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class HJGL_MaterialCompareService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取对应信息
|
||||
/// </summary>
|
||||
/// <param name="materialCompareId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_MaterialCompare getMaterialCompare(string materialCompareId)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_MaterialCompare.FirstOrDefault(e => e.MaterialCompareId == materialCompareId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断材质和焊接方法对应是否存在
|
||||
/// </summary>
|
||||
/// <param name="steId"></param>
|
||||
/// <param name="wmeId"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExistMaterialCompare(string steId, string wmeId,string id)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_MaterialCompare.FirstOrDefault(x => x.STE_ID == steId && x.WME_ID == wmeId && x.MaterialCompareId != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据材质和焊接方法获取对应信息
|
||||
/// </summary>
|
||||
/// <param name="steId"></param>
|
||||
/// <param name="wmeId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_MaterialCompare GetMaterialCompare(string steId, string wmeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return Funs.DB.HJGL_BS_MaterialCompare.FirstOrDefault(x => x.STE_ID == steId && x.WME_ID == wmeId);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加对应
|
||||
/// </summary>
|
||||
/// <param name="workArea"></param>
|
||||
public static void AddMaterialCompare(Model.HJGL_BS_MaterialCompare mc)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HJGL_BS_MaterialCompare));
|
||||
Model.HJGL_BS_MaterialCompare newMaterialCompare = new Model.HJGL_BS_MaterialCompare();
|
||||
newMaterialCompare.MaterialCompareId = newKeyID;
|
||||
newMaterialCompare.STE_ID = mc.STE_ID;
|
||||
newMaterialCompare.WME_ID = mc.WME_ID;
|
||||
newMaterialCompare.WMT_ID1 = mc.WMT_ID1;
|
||||
newMaterialCompare.WMT_ID2 = mc.WMT_ID2;
|
||||
newMaterialCompare.Remark = mc.Remark;
|
||||
|
||||
db.HJGL_BS_MaterialCompare.InsertOnSubmit(newMaterialCompare);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改对应
|
||||
/// </summary>
|
||||
/// <param name="workArea"></param>
|
||||
public static void updateMaterialCompare(Model.HJGL_BS_MaterialCompare mc)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_MaterialCompare newMaterialCompare = db.HJGL_BS_MaterialCompare.FirstOrDefault(e => e.MaterialCompareId == mc.MaterialCompareId);
|
||||
if (newMaterialCompare != null)
|
||||
{
|
||||
newMaterialCompare.STE_ID = mc.STE_ID;
|
||||
newMaterialCompare.WME_ID = mc.WME_ID;
|
||||
newMaterialCompare.WMT_ID1 = mc.WMT_ID1;
|
||||
newMaterialCompare.WMT_ID2 = mc.WMT_ID2;
|
||||
newMaterialCompare.Remark = mc.Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据Id删除对应信息
|
||||
/// </summary>
|
||||
/// <param name="workAreaId"></param>
|
||||
public static void DeleteMaterialCompare(string materialCompareId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_MaterialCompare mc = db.HJGL_BS_MaterialCompare.FirstOrDefault(e => e.MaterialCompareId == materialCompareId);
|
||||
if (mc != null)
|
||||
{
|
||||
db.HJGL_BS_MaterialCompare.DeleteOnSubmit(mc);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 工作区域下拉框
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] SearchList()
|
||||
{
|
||||
ListItem[] lis = new ListItem[1];
|
||||
lis[0] = new ListItem("材质", "STE_Name");
|
||||
return lis;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据焊接方法获取对应数
|
||||
/// </summary>
|
||||
/// <param name="floorWeld"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetMaterialCompareCountByWME(string wme_Id)
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_BS_MaterialCompare where x.WME_ID == wme_Id select x).ToList();
|
||||
return q.Count();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据材质获取对应数
|
||||
/// </summary>
|
||||
/// <param name="floorWeld"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetMaterialCompareCountByste(string ste_Id)
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_BS_MaterialCompare where x.STE_ID == ste_Id select x).ToList();
|
||||
return q.Count();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据材质获取对应数
|
||||
/// </summary>
|
||||
/// <param name="floorWeld"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetMaterialCompareCountByWMT(string wmt_Id)
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_BS_MaterialCompare where x.WMT_ID1 == wmt_Id || x.WMT_ID2 == wmt_Id select x).ToList();
|
||||
return q.Count();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 焊评材质组别
|
||||
/// </summary>
|
||||
public static class HJGL_MaterialGroupService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取焊评材质组别
|
||||
/// </summary>
|
||||
/// <param name="materialGroupId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_MaterialGroup GetMaterialGroupById(string materialGroupId)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_MaterialGroup.FirstOrDefault(e => e.MaterialGroupId == materialGroupId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据材质类别Id获取组别列表
|
||||
/// </summary>
|
||||
/// <param name="materialClassId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_MaterialGroup> GetMaterialGroupByMaterialClassId(string materialClassId)
|
||||
{
|
||||
return (from x in Funs.DB.HJGL_BS_MaterialGroup where x.MaterialClassId == materialClassId orderby x.MaterialGroupCode select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加焊评材质组别
|
||||
/// </summary>
|
||||
/// <param name="materialGroup"></param>
|
||||
public static void AddMaterialGroup(Model.HJGL_BS_MaterialGroup materialGroup)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_MaterialGroup newMaterialGroup = new Model.HJGL_BS_MaterialGroup();
|
||||
newMaterialGroup.MaterialGroupId = materialGroup.MaterialGroupId;
|
||||
newMaterialGroup.MaterialGroupCode = materialGroup.MaterialGroupCode;
|
||||
newMaterialGroup.MaterialGroup = materialGroup.MaterialGroup;
|
||||
newMaterialGroup.MaterialClassId = materialGroup.MaterialClassId;
|
||||
newMaterialGroup.Remark = materialGroup.Remark;
|
||||
db.HJGL_BS_MaterialGroup.InsertOnSubmit(newMaterialGroup);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改焊评材质组别
|
||||
/// </summary>
|
||||
/// <param name="materialGroup"></param>
|
||||
public static void UpdateMaterialGroup(Model.HJGL_BS_MaterialGroup materialGroup)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_MaterialGroup newMaterialGroup = db.HJGL_BS_MaterialGroup.FirstOrDefault(e => e.MaterialGroupId == materialGroup.MaterialGroupId);
|
||||
if (newMaterialGroup != null)
|
||||
{
|
||||
newMaterialGroup.MaterialGroupCode = materialGroup.MaterialGroupCode;
|
||||
newMaterialGroup.MaterialGroup = materialGroup.MaterialGroup;
|
||||
newMaterialGroup.MaterialClassId = materialGroup.MaterialClassId;
|
||||
newMaterialGroup.Remark = materialGroup.Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除焊评材质组别
|
||||
/// </summary>
|
||||
/// <param name="materialGroupId"></param>
|
||||
public static void DeleteMaterialGroupById(string materialGroupId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_MaterialGroup materialGroup = db.HJGL_BS_MaterialGroup.FirstOrDefault(e => e.MaterialGroupId == materialGroupId);
|
||||
if (materialGroup != null)
|
||||
{
|
||||
db.HJGL_BS_MaterialGroup.DeleteOnSubmit(materialGroup);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否存在相同代号
|
||||
/// </summary>
|
||||
/// <param name="materialGroupCode"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitMaterialGroupCode(string materialGroupCode, string id)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_MaterialGroup.FirstOrDefault(x => x.MaterialGroupCode == materialGroupCode && x.MaterialGroupId != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 材质
|
||||
/// </summary>
|
||||
public static class HJGL_MaterialService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据材质ID获取材质
|
||||
/// </summary>
|
||||
/// <param name="steId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_Steel GetSteelBySteID(string steId)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_Steel.FirstOrDefault(e => e.STE_ID == steId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据材质类别获取材质
|
||||
/// </summary>
|
||||
/// <param name="steId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_Steel> GetSteelByMaterialType(string type)
|
||||
{
|
||||
var steel = (from x in Funs.DB.HJGL_BS_Steel where x.MaterialType == type select x).ToList();
|
||||
return steel;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据材质组别获取材质
|
||||
/// </summary>
|
||||
/// <param name="steId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_Steel> GetSteelByMaterialGroup(string groups)
|
||||
{
|
||||
var steel = (from x in Funs.DB.HJGL_BS_Steel where x.MaterialGroup == groups select x).ToList();
|
||||
return steel;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加材质
|
||||
/// </summary>
|
||||
/// <param name="steel"></param>
|
||||
public static void AddSteel(Model.HJGL_BS_Steel steel)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_Steel newSteel = new Model.HJGL_BS_Steel();
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HJGL_BS_Steel));
|
||||
|
||||
newSteel.STE_ID = newKeyID;
|
||||
newSteel.STE_Code = steel.STE_Code;
|
||||
newSteel.STE_Name = steel.STE_Name;
|
||||
newSteel.STE_SteelType = steel.STE_SteelType;
|
||||
newSteel.STE_Remark = steel.STE_Remark;
|
||||
newSteel.MaterialType = steel.MaterialType;
|
||||
newSteel.MaterialGroup = steel.MaterialGroup;
|
||||
newSteel.HardQuaStandard = steel.HardQuaStandard;
|
||||
newSteel.IsUse = steel.IsUse;
|
||||
|
||||
db.HJGL_BS_Steel.InsertOnSubmit(newSteel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改材质
|
||||
/// </summary>
|
||||
/// <param name="steel"></param>
|
||||
public static void UpdateSteel(Model.HJGL_BS_Steel steel)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
|
||||
Model.HJGL_BS_Steel newSteel = db.HJGL_BS_Steel.FirstOrDefault(e => e.STE_ID == steel.STE_ID);
|
||||
if (newSteel != null)
|
||||
{
|
||||
newSteel.STE_Code = steel.STE_Code;
|
||||
newSteel.STE_Name = steel.STE_Name;
|
||||
newSteel.STE_SteelType = steel.STE_SteelType;
|
||||
newSteel.STE_Remark = steel.STE_Remark;
|
||||
newSteel.MaterialType = steel.MaterialType;
|
||||
newSteel.MaterialGroup = steel.MaterialGroup;
|
||||
newSteel.HardQuaStandard = steel.HardQuaStandard;
|
||||
newSteel.IsUse = steel.IsUse;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="ste_Id"></param>
|
||||
public static void DeleteSteel(string ste_Id)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_Steel steel = db.HJGL_BS_Steel.FirstOrDefault(e => e.STE_ID == ste_Id);
|
||||
if (steel != null)
|
||||
{
|
||||
db.HJGL_BS_Steel.DeleteOnSubmit(steel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否存在相同的材质代码
|
||||
/// </summary>
|
||||
/// <param name="ste_code"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitSteelCode(string ste_code,string id)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_Steel.FirstOrDefault(x => x.STE_Code == ste_code && x.STE_ID != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据材质代码获取材质信息
|
||||
/// </summary>
|
||||
/// <param name="unitCode"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_Steel GetSteelBySteelCode(string steelCode)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_Steel.FirstOrDefault(x => x.STE_Code == steelCode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取材质信息项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_Steel> GetSteelList()
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_BS_Steel where x.IsUse == true orderby x.STE_Code select x).ToList();
|
||||
//ListItem[] item = new ListItem[q.Count()];
|
||||
//for (int i = 0; i < q.Count(); i++)
|
||||
//{
|
||||
// item[i] = new ListItem(q[i].STE_Name ?? "", q[i].STE_ID.ToString());
|
||||
//}
|
||||
return q;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 材质标准
|
||||
/// </summary>
|
||||
public static class HJGL_MaterialStandardService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取材质标准
|
||||
/// </summary>
|
||||
/// <param name="MaterialStandardId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_MaterialStandard GetMaterialStandardById(string materialStandardId)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_MaterialStandard.FirstOrDefault(e => e.MaterialStandardId == materialStandardId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加材质标准
|
||||
/// </summary>
|
||||
/// <param name="?"></param>
|
||||
public static void AddMaterialStandard(Model.HJGL_BS_MaterialStandard materialStandard)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_MaterialStandard newMaterialStandard = new Model.HJGL_BS_MaterialStandard();
|
||||
newMaterialStandard.MaterialStandardId = materialStandard.MaterialStandardId;
|
||||
newMaterialStandard.MaterialStandardCode = materialStandard.MaterialStandardCode;
|
||||
newMaterialStandard.MaterialStandardName = materialStandard.MaterialStandardName;
|
||||
newMaterialStandard.Remark = materialStandard.Remark;
|
||||
db.HJGL_BS_MaterialStandard.InsertOnSubmit(newMaterialStandard);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改材质标准
|
||||
/// </summary>
|
||||
/// <param name="materialStandard"></param>
|
||||
public static void UpdateMaterialStandard(Model.HJGL_BS_MaterialStandard materialStandard)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_MaterialStandard newMaterialStandard = db.HJGL_BS_MaterialStandard.FirstOrDefault(e => e.MaterialStandardId == materialStandard.MaterialStandardId);
|
||||
if (newMaterialStandard != null)
|
||||
{
|
||||
newMaterialStandard.MaterialStandardCode = materialStandard.MaterialStandardCode;
|
||||
newMaterialStandard.MaterialStandardName = materialStandard.MaterialStandardName;
|
||||
newMaterialStandard.Remark = materialStandard.Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除材质标准
|
||||
/// </summary>
|
||||
/// <param name="materialStandardId"></param>
|
||||
public static void DeleteMaterialStandardById(string materialStandardId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_MaterialStandard materialStandard = db.HJGL_BS_MaterialStandard.FirstOrDefault(e => e.MaterialStandardId == materialStandardId);
|
||||
if (materialStandard != null)
|
||||
{
|
||||
db.HJGL_BS_MaterialStandard.DeleteOnSubmit(materialStandard);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断材质标准代号是否存在
|
||||
/// </summary>
|
||||
/// <param name="materialStandardCode"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitMaterialStandardCode(string materialStandardCode, string id)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_MaterialStandard.FirstOrDefault(x => x.MaterialStandardCode == materialStandardCode && x.MaterialStandardId != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取材质标准列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_MaterialStandard> GetMaterialStandardList()
|
||||
{
|
||||
return (from x in Funs.DB.HJGL_BS_MaterialStandard orderby x.MaterialStandardCode select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 介质
|
||||
/// </summary>
|
||||
public static class HJGL_MediumService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据介质Id获取介质信息
|
||||
/// </summary>
|
||||
/// <param name="ser_id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_Service GetServiceBySERID(string ser_id)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_Service.FirstOrDefault(e => e.SER_ID == ser_id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <param name="service"></param>
|
||||
public static void AddService(Model.HJGL_BS_Service service)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HJGL_BS_Service));
|
||||
Model.HJGL_BS_Service newService = new Model.HJGL_BS_Service();
|
||||
|
||||
newService.SER_ID = newKeyID;
|
||||
newService.SER_Code = service.SER_Code;
|
||||
newService.SER_Name = service.SER_Name;
|
||||
newService.SER_Remark = service.SER_Remark;
|
||||
newService.SER_Abbreviate = service.SER_Abbreviate;
|
||||
|
||||
db.HJGL_BS_Service.InsertOnSubmit(newService);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="service"></param>
|
||||
public static void UpdateService(Model.HJGL_BS_Service service)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_Service newService = db.HJGL_BS_Service.FirstOrDefault(e => e.SER_ID == service.SER_ID);
|
||||
if (newService != null)
|
||||
{
|
||||
newService.SER_Code = service.SER_Code;
|
||||
newService.SER_Name = service.SER_Name;
|
||||
newService.SER_Remark = service.SER_Remark;
|
||||
newService.SER_Abbreviate = service.SER_Abbreviate;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="ser_id"></param>
|
||||
public static void DeleteService(string ser_id)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
|
||||
Model.HJGL_BS_Service service = db.HJGL_BS_Service.FirstOrDefault(e => e.SER_ID == ser_id);
|
||||
if (service != null)
|
||||
{
|
||||
db.HJGL_BS_Service.DeleteOnSubmit(service);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否存在相同的焊缝类型编号
|
||||
/// </summary>
|
||||
/// <param name="ser_code"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitSERCode(string ser_code,string id)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_Service.FirstOrDefault(x => x.SER_Code == ser_code && x.SER_ID != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据介质代码获取介质信息
|
||||
/// </summary>
|
||||
/// <param name="unitCode"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_Service GetServiceByServiceCode(string serviceCode)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_Service.FirstOrDefault(x => x.SER_Code == serviceCode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取介质信息项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_Service> GetBSServiceList()
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_BS_Service orderby x.SER_Code select x).ToList();
|
||||
//ListItem[] item = new ListItem[q.Count()];
|
||||
//for (int i = 0; i < q.Count(); i++)
|
||||
//{
|
||||
// item[i] = new ListItem(q[i].SER_Name ?? "", q[i].SER_ID.ToString());
|
||||
//}
|
||||
return q;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 管道等级
|
||||
/// </summary>
|
||||
public static class HJGL_PipingClassService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据管道等级ID获取管道等级信息
|
||||
/// </summary>
|
||||
/// <param name="pipingClassId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_IsoClass GetPipingClassByPipingClassId(string pipingClassId)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_IsoClass.FirstOrDefault(e => e.ISC_ID == pipingClassId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加管道等级信息
|
||||
/// </summary>
|
||||
/// <param name="pipingClass"></param>
|
||||
public static void AddPipingClass(Model.HJGL_BS_IsoClass pipingClass)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HJGL_BS_IsoClass));
|
||||
Model.HJGL_BS_IsoClass newPipingClass = new Model.HJGL_BS_IsoClass();
|
||||
newPipingClass.ISC_ID = newKeyID;
|
||||
newPipingClass.ISC_IsoCode = pipingClass.ISC_IsoCode;
|
||||
newPipingClass.ISC_IsoClass = pipingClass.ISC_IsoClass;
|
||||
newPipingClass.ISC_IsoName = pipingClass.ISC_IsoName;
|
||||
newPipingClass.ISC_Remark = pipingClass.ISC_Remark;
|
||||
|
||||
db.HJGL_BS_IsoClass.InsertOnSubmit(newPipingClass);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改管道等级信息
|
||||
/// </summary>
|
||||
/// <param name="pipingClass"></param>
|
||||
public static void UpdatePipingClass(Model.HJGL_BS_IsoClass pipingClass)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_IsoClass newPipingClass = db.HJGL_BS_IsoClass.FirstOrDefault(e => e.ISC_ID == pipingClass.ISC_ID);
|
||||
if (newPipingClass != null)
|
||||
{
|
||||
newPipingClass.ISC_IsoCode = pipingClass.ISC_IsoCode;
|
||||
newPipingClass.ISC_IsoClass = pipingClass.ISC_IsoClass;
|
||||
newPipingClass.ISC_IsoName = pipingClass.ISC_IsoName;
|
||||
newPipingClass.ISC_Remark = pipingClass.ISC_Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除管道等级信息
|
||||
/// </summary>
|
||||
/// <param name="pipingClassId"></param>
|
||||
public static void DeletePipingClass(string pipingClassId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_IsoClass pipingClass = db.HJGL_BS_IsoClass.FirstOrDefault(e => e.ISC_ID == pipingClassId);
|
||||
if (pipingClass != null)
|
||||
{
|
||||
db.HJGL_BS_IsoClass.DeleteOnSubmit(pipingClass);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否存在该管道等级代号
|
||||
/// </summary>
|
||||
/// <param name="pipingClassCode"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExistPipingClassCode(string pipingClassCode, string id)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_IsoClass.FirstOrDefault(x => x.ISC_IsoCode == pipingClassCode && x.ISC_ID != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取管线等级下拉框
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_IsoClass> GetIsoClassNameList()
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_BS_IsoClass orderby x.ISC_IsoCode select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位代码获取单位信息
|
||||
/// </summary>
|
||||
/// <param name="unitCode"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_IsoClass GetIsoClassByIsoClassCode(string isoClassCode)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_IsoClass.FirstOrDefault(x => x.ISC_IsoCode == isoClassCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 焊评标准
|
||||
/// </summary>
|
||||
public static class HJGL_StandardService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取焊评标准
|
||||
/// </summary>
|
||||
/// <param name="standardId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_Standard GetStandardById(string standardId)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_Standard.FirstOrDefault(e => e.StandardId == standardId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取焊评标准列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_Standard> GetStandardList()
|
||||
{
|
||||
return (from x in Funs.DB.HJGL_BS_Standard orderby x.StandardCode select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加焊评标准
|
||||
/// </summary>
|
||||
/// <param name="standard"></param>
|
||||
public static void AddStandard(Model.HJGL_BS_Standard standard)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_Standard newStandard = new Model.HJGL_BS_Standard();
|
||||
newStandard.StandardId = SQLHelper.GetNewID(typeof(Model.HJGL_BS_Standard));
|
||||
newStandard.StandardCode = standard.StandardCode;
|
||||
newStandard.Remark = standard.Remark;
|
||||
db.HJGL_BS_Standard.InsertOnSubmit(newStandard);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改焊评标准
|
||||
/// </summary>
|
||||
/// <param name="standard"></param>
|
||||
public static void UpdateStandard(Model.HJGL_BS_Standard standard)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_Standard newStandard = db.HJGL_BS_Standard.FirstOrDefault(e => e.StandardId == standard.StandardId);
|
||||
if (newStandard != null)
|
||||
{
|
||||
newStandard.StandardCode = standard.StandardCode;
|
||||
newStandard.Remark = standard.Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除焊评标准
|
||||
/// </summary>
|
||||
/// <param name="standardId"></param>
|
||||
public static void DeleteStandardById(string standardId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_Standard standard = db.HJGL_BS_Standard.FirstOrDefault(e => e.StandardId == standardId);
|
||||
if (standard != null)
|
||||
{
|
||||
db.HJGL_BS_Standard.DeleteOnSubmit(standard);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否存在相同的焊评标准
|
||||
/// </summary>
|
||||
/// <param name="standardCode"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitStandardCode(string standardCode, string id)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_Standard.FirstOrDefault(x => x.StandardCode == standardCode && x.StandardId != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 检测标准
|
||||
/// </summary>
|
||||
public static class HJGL_TestStandardService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据检测标准ID获取检测标准信息
|
||||
/// </summary>
|
||||
/// <param name="testStandardId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_TestStandard GetTestStandardByTestStandardId(string testStandardId)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_TestStandard.FirstOrDefault(e => e.TestStandardId == testStandardId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加检测标准
|
||||
/// </summary>
|
||||
/// <param name="testStandard"></param>
|
||||
public static void AddTestStandard(Model.HJGL_BS_TestStandard testStandard)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_TestStandard newTestStandard = new Model.HJGL_BS_TestStandard();
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HJGL_BS_TestStandard));
|
||||
|
||||
newTestStandard.TestStandardId = newKeyID;
|
||||
newTestStandard.TestStandardCode = testStandard.TestStandardCode;
|
||||
newTestStandard.TestStandardName = testStandard.TestStandardName;
|
||||
newTestStandard.Remark = testStandard.Remark;
|
||||
db.HJGL_BS_TestStandard.InsertOnSubmit(newTestStandard);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改检测标准
|
||||
/// </summary>
|
||||
/// <param name="testStandard"></param>
|
||||
public static void UpdateTestStandard(Model.HJGL_BS_TestStandard testStandard)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_TestStandard newTestStandard = db.HJGL_BS_TestStandard.FirstOrDefault(e => e.TestStandardId == testStandard.TestStandardId);
|
||||
if (newTestStandard != null)
|
||||
{
|
||||
newTestStandard.TestStandardCode = testStandard.TestStandardCode;
|
||||
newTestStandard.TestStandardName = testStandard.TestStandardName;
|
||||
newTestStandard.Remark = testStandard.Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除检测标准
|
||||
/// </summary>
|
||||
/// <param name="testStandardId"></param>
|
||||
public static void DeleteTestStandard(string testStandardId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_TestStandard testStandard = db.HJGL_BS_TestStandard.FirstOrDefault(e => e.TestStandardId == testStandardId);
|
||||
if (testStandard != null)
|
||||
{
|
||||
db.HJGL_BS_TestStandard.DeleteOnSubmit(testStandard);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否存在相同的检测标准代号
|
||||
/// </summary>
|
||||
/// <param name="testStandardCode"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitTestStandardCode(string testStandardCode, string id)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_TestStandard.FirstOrDefault(x => x.TestStandardCode == testStandardCode && x.TestStandardId != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取检测标准名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_TestStandard> GetTestStandardNameList()
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_BS_TestStandard orderby x.TestStandardCode select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检测标准代码获取检测标准代号信息
|
||||
/// </summary>
|
||||
/// <param name="unitCode"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_TestStandard GetTestStandardByTestStandardCode(string testStandardCode)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_TestStandard.FirstOrDefault(x => x.TestStandardCode == testStandardCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 探伤类型
|
||||
/// </summary>
|
||||
public static class HJGL_TestingService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据探伤类型Id获取探伤类型
|
||||
/// </summary>
|
||||
/// <param name="dnt_id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_NDTType GetTestingByTestingId(string dnt_id)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_NDTType.FirstOrDefault(e => e.NDT_ID == dnt_id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加探伤类型
|
||||
/// </summary>
|
||||
/// <param name="testing"></param>
|
||||
public static void AddTesting(Model.HJGL_BS_NDTType testing)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_NDTType newTesting = new Model.HJGL_BS_NDTType();
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HJGL_BS_NDTType));
|
||||
newTesting.NDT_ID = newKeyID;
|
||||
newTesting.NDT_Code = testing.NDT_Code;
|
||||
newTesting.NDT_Name = testing.NDT_Name;
|
||||
newTesting.SysType = testing.SysType;
|
||||
newTesting.NDT_Description = testing.NDT_Description;
|
||||
newTesting.NDT_SecuritySpace = testing.NDT_SecuritySpace;
|
||||
newTesting.NDT_Harm = testing.NDT_Harm;
|
||||
newTesting.NDT_Remark = testing.NDT_Remark;
|
||||
|
||||
db.HJGL_BS_NDTType.InsertOnSubmit(newTesting);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改探伤类型
|
||||
/// </summary>
|
||||
/// <param name="testing"></param>
|
||||
public static void UpdateTesting(Model.HJGL_BS_NDTType testing)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_NDTType newTesting = db.HJGL_BS_NDTType.FirstOrDefault(e => e.NDT_ID == testing.NDT_ID);
|
||||
if (newTesting != null)
|
||||
{
|
||||
newTesting.NDT_Code = testing.NDT_Code;
|
||||
newTesting.NDT_Name = testing.NDT_Name;
|
||||
newTesting.SysType = testing.SysType;
|
||||
newTesting.NDT_Description = testing.NDT_Description;
|
||||
newTesting.NDT_SecuritySpace = testing.NDT_SecuritySpace;
|
||||
newTesting.NDT_Harm = testing.NDT_Harm;
|
||||
newTesting.NDT_Remark = testing.NDT_Remark;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除探伤类型
|
||||
/// </summary>
|
||||
/// <param name="testingId"></param>
|
||||
public static void DeleteTesting(string testingId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_NDTType testing = db.HJGL_BS_NDTType.FirstOrDefault(e => e.NDT_ID == testingId);
|
||||
if (testing != null)
|
||||
{
|
||||
db.HJGL_BS_NDTType.DeleteOnSubmit(testing);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否存在相同的探伤类型代号
|
||||
/// </summary>
|
||||
/// <param name="testingCode"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitTestingCode(string testingCode, string id, string projectSoft)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_NDTType.FirstOrDefault(x => x.NDT_Code == testingCode && x.NDT_ID != id && x.ProjectSoft == projectSoft);
|
||||
return q != null ? true : false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取探伤类型下拉框
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_NDTType> GetNDTTypeNameList()
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_BS_NDTType orderby x.NDT_Code select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取非RT探伤类型下拉框
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_NDTType> GetNoRtNDTTypeNameList()
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_BS_NDTType where x.NDT_Code.Trim() != "RT" orderby x.NDT_Code select x).ToList();
|
||||
return q;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 焊缝检测比例对照表
|
||||
/// </summary>
|
||||
public static class HJGL_WeldControlService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取焊缝检测比例对照表
|
||||
/// </summary>
|
||||
/// <param name="weldControlId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_WeldControl GetWeldControlById(string weldControlId)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_WeldControl.FirstOrDefault(e => e.WeldControlId == weldControlId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加焊缝检测比例对照表
|
||||
/// </summary>
|
||||
/// <param name="weldControl"></param>
|
||||
public static void AddWeldControl(Model.HJGL_BS_WeldControl weldControl)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_WeldControl newWeldControl = new Model.HJGL_BS_WeldControl();
|
||||
newWeldControl.WeldControlId = weldControl.WeldControlId;
|
||||
newWeldControl.ExecStandardId = weldControl.ExecStandardId;
|
||||
newWeldControl.ISC_ID = weldControl.ISC_ID;
|
||||
newWeldControl.JotyId = weldControl.JotyId;
|
||||
newWeldControl.Joty_Rate = weldControl.Joty_Rate;
|
||||
newWeldControl.Joty_Level = weldControl.Joty_Level;
|
||||
newWeldControl.JotyId_C = weldControl.JotyId_C;
|
||||
newWeldControl.Joty_C_Rate = weldControl.Joty_C_Rate;
|
||||
newWeldControl.Joty_C_Level = weldControl.Joty_C_Level;
|
||||
newWeldControl.JotyId_D = weldControl.JotyId_D;
|
||||
newWeldControl.Joty_D_Rate = weldControl.Joty_D_Rate;
|
||||
newWeldControl.Joty_D_Level = weldControl.Joty_D_Level;
|
||||
db.HJGL_BS_WeldControl.InsertOnSubmit(newWeldControl);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改焊缝检测比例对照表
|
||||
/// </summary>
|
||||
/// <param name="weldControl"></param>
|
||||
public static void UpdateWeldControl(Model.HJGL_BS_WeldControl weldControl)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_WeldControl newWeldControl = db.HJGL_BS_WeldControl.FirstOrDefault(e => e.WeldControlId == weldControl.WeldControlId);
|
||||
if (newWeldControl != null)
|
||||
{
|
||||
newWeldControl.ExecStandardId = weldControl.ExecStandardId;
|
||||
newWeldControl.ISC_ID = weldControl.ISC_ID;
|
||||
newWeldControl.JotyId = weldControl.JotyId;
|
||||
newWeldControl.Joty_Rate = weldControl.Joty_Rate;
|
||||
newWeldControl.Joty_Level = weldControl.Joty_Level;
|
||||
newWeldControl.JotyId_C = weldControl.JotyId_C;
|
||||
newWeldControl.Joty_C_Rate = weldControl.Joty_C_Rate;
|
||||
newWeldControl.Joty_C_Level = weldControl.Joty_C_Level;
|
||||
newWeldControl.JotyId_D = weldControl.JotyId_D;
|
||||
newWeldControl.Joty_D_Rate = weldControl.Joty_D_Rate;
|
||||
newWeldControl.Joty_D_Level = weldControl.Joty_D_Level;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除焊缝检测比例对照表
|
||||
/// </summary>
|
||||
/// <param name="weldControlId"></param>
|
||||
public static void DeleteWeldControlById(string weldControlId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_WeldControl weldControl = db.HJGL_BS_WeldControl.FirstOrDefault(e => e.WeldControlId == weldControlId);
|
||||
if (weldControl != null)
|
||||
{
|
||||
db.HJGL_BS_WeldControl.DeleteOnSubmit(weldControl);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据执行标准ID获取焊缝检测比例对照表数量
|
||||
/// </summary>
|
||||
/// <param name="execStandardId"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetWeldControlByExecStandardId(string execStandardId)
|
||||
{
|
||||
return (from x in Funs.DB.HJGL_BS_WeldControl where x.ExecStandardId == execStandardId select x).Count();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据管道等级、执行标准获取焊缝检测比例对照表
|
||||
/// </summary>
|
||||
/// <param name="isc_id"></param>
|
||||
/// <param name="execStandardId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_WeldControl GEtWeldControlByISCIDAndExecStandardId(string isc_id, string execStandardId="")
|
||||
{
|
||||
return Funs.DB.HJGL_BS_WeldControl.FirstOrDefault(e => e.ISC_ID == isc_id && e.ExecStandardId == execStandardId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 焊缝类型
|
||||
/// </summary>
|
||||
public static class HJGL_WeldService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据焊缝类型Id获取焊缝类型信息
|
||||
/// </summary>
|
||||
/// <param name="joty_id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_JointType GetJointTypeByID(string joty_id)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_JointType.FirstOrDefault(e => e.JOTY_ID == joty_id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加焊缝类型
|
||||
/// </summary>
|
||||
/// <param name="jointType"></param>
|
||||
public static void AddJointType(Model.HJGL_BS_JointType jointType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HJGL_BS_JointType));
|
||||
Model.HJGL_BS_JointType newJointType = new Model.HJGL_BS_JointType();
|
||||
newJointType.JOTY_ID = newKeyID;
|
||||
newJointType.JOTY_Code = jointType.JOTY_Code;
|
||||
newJointType.JOTY_Name = jointType.JOTY_Name;
|
||||
newJointType.JOTY_Remark = jointType.JOTY_Remark;
|
||||
newJointType.JOTY_Group = jointType.JOTY_Group;
|
||||
|
||||
db.HJGL_BS_JointType.InsertOnSubmit(newJointType);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改焊缝类型
|
||||
/// </summary>
|
||||
/// <param name="jointType"></param>
|
||||
public static void UpdateJointType(Model.HJGL_BS_JointType jointType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_JointType newJointType = db.HJGL_BS_JointType.FirstOrDefault(e => e.JOTY_ID == jointType.JOTY_ID);
|
||||
if (newJointType != null)
|
||||
{
|
||||
newJointType.JOTY_Code = jointType.JOTY_Code;
|
||||
newJointType.JOTY_Name = jointType.JOTY_Name;
|
||||
newJointType.JOTY_Remark = jointType.JOTY_Remark;
|
||||
newJointType.JOTY_Group = jointType.JOTY_Group;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除焊缝类型
|
||||
/// </summary>
|
||||
/// <param name="jot_id"></param>
|
||||
public static void DeleteJointType(string jot_id)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_JointType jointType = db.HJGL_BS_JointType.FirstOrDefault(e => e.JOTY_ID == jot_id);
|
||||
if (jointType != null)
|
||||
{
|
||||
db.HJGL_BS_JointType.DeleteOnSubmit(jointType);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否存在相同的焊缝类型编号
|
||||
/// </summary>
|
||||
/// <param name="joty_code"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitJotyCode(string joty_code, string id, string projectSoft)
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_JointType.FirstOrDefault(x => x.JOTY_Code == joty_code && x.JOTY_ID != id && x.ProjectSoft == projectSoft);
|
||||
return q != null ? true : false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取焊缝类型名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_JointType> GetJointTypeNameList(string projectSoft)
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_BS_JointType where x.ProjectSoft == projectSoft orderby x.JOTY_Code select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据焊缝类型获取焊缝类型信息
|
||||
/// </summary>
|
||||
/// <param name="unitCode"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_JointType GetJointTypeByJointTypeName(string jointTypeName)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_JointType.FirstOrDefault(x => x.JOTY_Name == jointTypeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 焊接方法
|
||||
/// </summary>
|
||||
public static class HJGL_WeldingMethodService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据焊接方法Id获取焊接方法信息
|
||||
/// </summary>
|
||||
/// <param name="wme_id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_WeldMethod GetWeldMethodByWMEID(string wme_id)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_WeldMethod.FirstOrDefault(e => e.WME_ID == wme_id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加
|
||||
/// </summary>
|
||||
/// <param name="weldMethod"></param>
|
||||
public static void AddWeldMethod(Model.HJGL_BS_WeldMethod weldMethod)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HJGL_BS_WeldMethod));
|
||||
Model.HJGL_BS_WeldMethod newWeldMethod = new Model.HJGL_BS_WeldMethod();
|
||||
|
||||
newWeldMethod.WME_ID = newKeyID;
|
||||
newWeldMethod.WME_Code = weldMethod.WME_Code;
|
||||
newWeldMethod.WME_Name = weldMethod.WME_Name;
|
||||
newWeldMethod.WME_Remark = weldMethod.WME_Remark;
|
||||
|
||||
db.HJGL_BS_WeldMethod.InsertOnSubmit(newWeldMethod);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="weldMethod"></param>
|
||||
public static void UpdateWeldMethod(Model.HJGL_BS_WeldMethod weldMethod)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_WeldMethod newWeldMethod = db.HJGL_BS_WeldMethod.FirstOrDefault(e => e.WME_ID == weldMethod.WME_ID);
|
||||
if (newWeldMethod != null)
|
||||
{
|
||||
newWeldMethod.WME_Code = weldMethod.WME_Code;
|
||||
newWeldMethod.WME_Name = weldMethod.WME_Name;
|
||||
newWeldMethod.WME_Remark = weldMethod.WME_Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除焊接方法
|
||||
/// </summary>
|
||||
/// <param name="wme_id"></param>
|
||||
public static void DeleteWeldMethod(string wme_id)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_BS_WeldMethod weldMethod = db.HJGL_BS_WeldMethod.FirstOrDefault(e => e.WME_ID == wme_id);
|
||||
if (weldMethod != null)
|
||||
{
|
||||
db.HJGL_BS_WeldMethod.DeleteOnSubmit(weldMethod);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否存在相同的焊接方法代码
|
||||
/// </summary>
|
||||
/// <param name="wme_code"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitWMECode(string wme_code,string id )
|
||||
{
|
||||
var q = Funs.DB.HJGL_BS_WeldMethod.FirstOrDefault(x => x.WME_Code == wme_code && x.WME_ID != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取焊接方法
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_BS_WeldMethod> GetWeldMethodNameList()
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_BS_WeldMethod orderby x.WME_Code select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据焊接方法编号获取焊接方法信息
|
||||
/// </summary>
|
||||
/// <param name="unitCode"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_BS_WeldMethod GetMethodByMethodCode(string wmeCode)
|
||||
{
|
||||
return Funs.DB.HJGL_BS_WeldMethod.FirstOrDefault(x => x.WME_Code == wmeCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 公司相关规章制度标准
|
||||
/// </summary>
|
||||
public static class HJGL_FileControl_CompanyStandardsService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取公司相关规章制度标准
|
||||
/// </summary>
|
||||
/// <param name="CompanyStandardsId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_FileControl_CompanyStandards GetCompanyStandardsById(string CompanyStandardsId)
|
||||
{
|
||||
return Funs.DB.HJGL_FileControl_CompanyStandards.FirstOrDefault(e => e.CompanyStandardsId == CompanyStandardsId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加公司相关规章制度标准
|
||||
/// </summary>
|
||||
/// <param name="CompanyStandards"></param>
|
||||
public static void AddCompanyStandards(Model.HJGL_FileControl_CompanyStandards CompanyStandards)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_FileControl_CompanyStandards newCompanyStandards = new Model.HJGL_FileControl_CompanyStandards();
|
||||
newCompanyStandards.CompanyStandardsId = CompanyStandards.CompanyStandardsId;
|
||||
newCompanyStandards.CompanyStandardsCode = CompanyStandards.CompanyStandardsCode;
|
||||
newCompanyStandards.CompanyStandardsName = CompanyStandards.CompanyStandardsName;
|
||||
newCompanyStandards.Summary = CompanyStandards.Summary;
|
||||
newCompanyStandards.CompileDate = CompanyStandards.CompileDate;
|
||||
newCompanyStandards.AttachUrl = CompanyStandards.AttachUrl;
|
||||
newCompanyStandards.CompileMan = CompanyStandards.CompileMan;
|
||||
newCompanyStandards.CompileDate = CompanyStandards.CompileDate;
|
||||
newCompanyStandards.Remarks = CompanyStandards.Remarks;
|
||||
db.HJGL_FileControl_CompanyStandards.InsertOnSubmit(newCompanyStandards);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改公司相关规章制度标准
|
||||
/// </summary>
|
||||
/// <param name="CompanyStandards"></param>
|
||||
public static void UpdateCompanyStandards(Model.HJGL_FileControl_CompanyStandards CompanyStandards)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_FileControl_CompanyStandards newCompanyStandards = db.HJGL_FileControl_CompanyStandards.FirstOrDefault(e => e.CompanyStandardsId == CompanyStandards.CompanyStandardsId);
|
||||
if (newCompanyStandards != null)
|
||||
{
|
||||
newCompanyStandards.CompanyStandardsCode = CompanyStandards.CompanyStandardsCode;
|
||||
newCompanyStandards.CompanyStandardsName = CompanyStandards.CompanyStandardsName;
|
||||
newCompanyStandards.Summary = CompanyStandards.Summary;
|
||||
newCompanyStandards.CompileDate = CompanyStandards.CompileDate;
|
||||
newCompanyStandards.AttachUrl = CompanyStandards.AttachUrl;
|
||||
newCompanyStandards.CompileMan = CompanyStandards.CompileMan;
|
||||
newCompanyStandards.CompileDate = CompanyStandards.CompileDate;
|
||||
newCompanyStandards.Remarks = CompanyStandards.Remarks;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除公司相关规章制度标准
|
||||
/// </summary>
|
||||
/// <param name="CompanyStandardsId"></param>
|
||||
public static void DeleteCompanyStandardsById(string CompanyStandardsId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_FileControl_CompanyStandards CompanyStandards = db.HJGL_FileControl_CompanyStandards.FirstOrDefault(e => e.CompanyStandardsId == CompanyStandardsId);
|
||||
if (CompanyStandards != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(CompanyStandards.AttachUrl))
|
||||
{
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, CompanyStandards.AttachUrl);//删除附件
|
||||
}
|
||||
|
||||
BLL.AttachFileService.DeleteAttachFile(Funs.RootPath, CompanyStandardsId, Const.HJGLServer_CompanyStandardsMenuId);//删除附件
|
||||
db.HJGL_FileControl_CompanyStandards.DeleteOnSubmit(CompanyStandards);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 国内法律法规相关条款表
|
||||
/// </summary>
|
||||
public static class HJGL_FileControl_DomesticLawsRegulationsService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取国内法律法规相关条款
|
||||
/// </summary>
|
||||
/// <param name="domesticLawsRegulationsId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_FileControl_DomesticLawsRegulations GetDomesticLawsRegulationsById(string domesticLawsRegulationsId)
|
||||
{
|
||||
return Funs.DB.HJGL_FileControl_DomesticLawsRegulations.FirstOrDefault(e => e.DomesticLawsRegulationsId == domesticLawsRegulationsId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加国内法律法规相关条款
|
||||
/// </summary>
|
||||
/// <param name="domesticLawsRegulations"></param>
|
||||
public static void AddDomesticLawsRegulations(Model.HJGL_FileControl_DomesticLawsRegulations domesticLawsRegulations)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_FileControl_DomesticLawsRegulations newDomesticLawsRegulations = new Model.HJGL_FileControl_DomesticLawsRegulations();
|
||||
newDomesticLawsRegulations.DomesticLawsRegulationsId = domesticLawsRegulations.DomesticLawsRegulationsId;
|
||||
newDomesticLawsRegulations.DomesticLawsRegulationsCode = domesticLawsRegulations.DomesticLawsRegulationsCode;
|
||||
newDomesticLawsRegulations.DomesticLawsRegulationsName = domesticLawsRegulations.DomesticLawsRegulationsName;
|
||||
newDomesticLawsRegulations.Summary = domesticLawsRegulations.Summary;
|
||||
newDomesticLawsRegulations.CompileDate = domesticLawsRegulations.CompileDate;
|
||||
newDomesticLawsRegulations.AttachUrl = domesticLawsRegulations.AttachUrl;
|
||||
newDomesticLawsRegulations.CompileMan = domesticLawsRegulations.CompileMan;
|
||||
newDomesticLawsRegulations.CompileDate = domesticLawsRegulations.CompileDate;
|
||||
newDomesticLawsRegulations.Remarks = domesticLawsRegulations.Remarks;
|
||||
db.HJGL_FileControl_DomesticLawsRegulations.InsertOnSubmit(newDomesticLawsRegulations);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改国内法律法规相关条款
|
||||
/// </summary>
|
||||
/// <param name="domesticLawsRegulations"></param>
|
||||
public static void UpdateDomesticLawsRegulations(Model.HJGL_FileControl_DomesticLawsRegulations domesticLawsRegulations)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_FileControl_DomesticLawsRegulations newDomesticLawsRegulations = db.HJGL_FileControl_DomesticLawsRegulations.FirstOrDefault(e => e.DomesticLawsRegulationsId == domesticLawsRegulations.DomesticLawsRegulationsId);
|
||||
if (newDomesticLawsRegulations != null)
|
||||
{
|
||||
newDomesticLawsRegulations.DomesticLawsRegulationsCode = domesticLawsRegulations.DomesticLawsRegulationsCode;
|
||||
newDomesticLawsRegulations.DomesticLawsRegulationsName = domesticLawsRegulations.DomesticLawsRegulationsName;
|
||||
newDomesticLawsRegulations.Summary = domesticLawsRegulations.Summary;
|
||||
newDomesticLawsRegulations.CompileDate = domesticLawsRegulations.CompileDate;
|
||||
newDomesticLawsRegulations.AttachUrl = domesticLawsRegulations.AttachUrl;
|
||||
newDomesticLawsRegulations.CompileMan = domesticLawsRegulations.CompileMan;
|
||||
newDomesticLawsRegulations.CompileDate = domesticLawsRegulations.CompileDate;
|
||||
newDomesticLawsRegulations.Remarks = domesticLawsRegulations.Remarks;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除国内法律法规相关条款
|
||||
/// </summary>
|
||||
/// <param name="domesticLawsRegulationsId"></param>
|
||||
public static void DeleteDomesticLawsRegulationsById(string domesticLawsRegulationsId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_FileControl_DomesticLawsRegulations DomesticLawsRegulations = db.HJGL_FileControl_DomesticLawsRegulations.FirstOrDefault(e => e.DomesticLawsRegulationsId == domesticLawsRegulationsId);
|
||||
if (DomesticLawsRegulations != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(DomesticLawsRegulations.AttachUrl))
|
||||
{
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, DomesticLawsRegulations.AttachUrl);//删除附件
|
||||
}
|
||||
|
||||
BLL.AttachFileService.DeleteAttachFile(Funs.RootPath, domesticLawsRegulationsId, Const.HJGLServer_DomesticLawsRegulationsMenuId);//删除附件
|
||||
db.HJGL_FileControl_DomesticLawsRegulations.DeleteOnSubmit(DomesticLawsRegulations);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 国内现行相关标准规范
|
||||
/// </summary>
|
||||
public static class HJGL_FileControl_DomesticStandardsService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取国内现行相关标准规范
|
||||
/// </summary>
|
||||
/// <param name="DomesticStandardsId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_FileControl_DomesticStandards GetDomesticStandardsById(string DomesticStandardsId)
|
||||
{
|
||||
return Funs.DB.HJGL_FileControl_DomesticStandards.FirstOrDefault(e => e.DomesticStandardsId == DomesticStandardsId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加国内现行相关标准规范
|
||||
/// </summary>
|
||||
/// <param name="DomesticStandards"></param>
|
||||
public static void AddDomesticStandards(Model.HJGL_FileControl_DomesticStandards DomesticStandards)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_FileControl_DomesticStandards newDomesticStandards = new Model.HJGL_FileControl_DomesticStandards();
|
||||
newDomesticStandards.DomesticStandardsId = DomesticStandards.DomesticStandardsId;
|
||||
newDomesticStandards.DomesticStandardsCode = DomesticStandards.DomesticStandardsCode;
|
||||
newDomesticStandards.DomesticStandardsName = DomesticStandards.DomesticStandardsName;
|
||||
newDomesticStandards.Summary = DomesticStandards.Summary;
|
||||
newDomesticStandards.CompileDate = DomesticStandards.CompileDate;
|
||||
newDomesticStandards.AttachUrl = DomesticStandards.AttachUrl;
|
||||
newDomesticStandards.CompileMan = DomesticStandards.CompileMan;
|
||||
newDomesticStandards.CompileDate = DomesticStandards.CompileDate;
|
||||
newDomesticStandards.Remarks = DomesticStandards.Remarks;
|
||||
db.HJGL_FileControl_DomesticStandards.InsertOnSubmit(newDomesticStandards);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改国内现行相关标准规范
|
||||
/// </summary>
|
||||
/// <param name="DomesticStandards"></param>
|
||||
public static void UpdateDomesticStandards(Model.HJGL_FileControl_DomesticStandards DomesticStandards)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_FileControl_DomesticStandards newDomesticStandards = db.HJGL_FileControl_DomesticStandards.FirstOrDefault(e => e.DomesticStandardsId == DomesticStandards.DomesticStandardsId);
|
||||
if (newDomesticStandards != null)
|
||||
{
|
||||
newDomesticStandards.DomesticStandardsCode = DomesticStandards.DomesticStandardsCode;
|
||||
newDomesticStandards.DomesticStandardsName = DomesticStandards.DomesticStandardsName;
|
||||
newDomesticStandards.Summary = DomesticStandards.Summary;
|
||||
newDomesticStandards.CompileDate = DomesticStandards.CompileDate;
|
||||
newDomesticStandards.AttachUrl = DomesticStandards.AttachUrl;
|
||||
newDomesticStandards.CompileMan = DomesticStandards.CompileMan;
|
||||
newDomesticStandards.CompileDate = DomesticStandards.CompileDate;
|
||||
newDomesticStandards.Remarks = DomesticStandards.Remarks;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除国内现行相关标准规范
|
||||
/// </summary>
|
||||
/// <param name="DomesticStandardsId"></param>
|
||||
public static void DeleteDomesticStandardsById(string DomesticStandardsId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_FileControl_DomesticStandards DomesticStandards = db.HJGL_FileControl_DomesticStandards.FirstOrDefault(e => e.DomesticStandardsId == DomesticStandardsId);
|
||||
if (DomesticStandards != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(DomesticStandards.AttachUrl))
|
||||
{
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, DomesticStandards.AttachUrl);//删除附件
|
||||
}
|
||||
|
||||
BLL.AttachFileService.DeleteAttachFile(Funs.RootPath, DomesticStandardsId, Const.HJGLServer_DomesticStandardsMenuId);//删除附件
|
||||
db.HJGL_FileControl_DomesticStandards.DeleteOnSubmit(DomesticStandards);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 国外现行相关标准规范
|
||||
/// </summary>
|
||||
public static class HJGL_FileControl_ForeignStandardsService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取国外现行相关标准规范
|
||||
/// </summary>
|
||||
/// <param name="ForeignStandardsId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_FileControl_ForeignStandards GetForeignStandardsById(string ForeignStandardsId)
|
||||
{
|
||||
return Funs.DB.HJGL_FileControl_ForeignStandards.FirstOrDefault(e => e.ForeignStandardsId == ForeignStandardsId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加国外现行相关标准规范
|
||||
/// </summary>
|
||||
/// <param name="ForeignStandards"></param>
|
||||
public static void AddForeignStandards(Model.HJGL_FileControl_ForeignStandards ForeignStandards)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_FileControl_ForeignStandards newForeignStandards = new Model.HJGL_FileControl_ForeignStandards();
|
||||
newForeignStandards.ForeignStandardsId = ForeignStandards.ForeignStandardsId;
|
||||
newForeignStandards.ForeignStandardsCode = ForeignStandards.ForeignStandardsCode;
|
||||
newForeignStandards.ForeignStandardsName = ForeignStandards.ForeignStandardsName;
|
||||
newForeignStandards.Summary = ForeignStandards.Summary;
|
||||
newForeignStandards.CompileDate = ForeignStandards.CompileDate;
|
||||
newForeignStandards.AttachUrl = ForeignStandards.AttachUrl;
|
||||
newForeignStandards.CompileMan = ForeignStandards.CompileMan;
|
||||
newForeignStandards.CompileDate = ForeignStandards.CompileDate;
|
||||
newForeignStandards.Remarks = ForeignStandards.Remarks;
|
||||
db.HJGL_FileControl_ForeignStandards.InsertOnSubmit(newForeignStandards);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改国外现行相关标准规范
|
||||
/// </summary>
|
||||
/// <param name="ForeignStandards"></param>
|
||||
public static void UpdateForeignStandards(Model.HJGL_FileControl_ForeignStandards ForeignStandards)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_FileControl_ForeignStandards newForeignStandards = db.HJGL_FileControl_ForeignStandards.FirstOrDefault(e => e.ForeignStandardsId == ForeignStandards.ForeignStandardsId);
|
||||
if (newForeignStandards != null)
|
||||
{
|
||||
newForeignStandards.ForeignStandardsCode = ForeignStandards.ForeignStandardsCode;
|
||||
newForeignStandards.ForeignStandardsName = ForeignStandards.ForeignStandardsName;
|
||||
newForeignStandards.Summary = ForeignStandards.Summary;
|
||||
newForeignStandards.CompileDate = ForeignStandards.CompileDate;
|
||||
newForeignStandards.AttachUrl = ForeignStandards.AttachUrl;
|
||||
newForeignStandards.CompileMan = ForeignStandards.CompileMan;
|
||||
newForeignStandards.CompileDate = ForeignStandards.CompileDate;
|
||||
newForeignStandards.Remarks = ForeignStandards.Remarks;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除国外现行相关标准规范
|
||||
/// </summary>
|
||||
/// <param name="ForeignStandardsId"></param>
|
||||
public static void DeleteForeignStandardsById(string ForeignStandardsId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_FileControl_ForeignStandards ForeignStandards = db.HJGL_FileControl_ForeignStandards.FirstOrDefault(e => e.ForeignStandardsId == ForeignStandardsId);
|
||||
if (ForeignStandards != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ForeignStandards.AttachUrl))
|
||||
{
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, ForeignStandards.AttachUrl);//删除附件
|
||||
}
|
||||
|
||||
BLL.AttachFileService.DeleteAttachFile(Funs.RootPath, ForeignStandardsId, Const.HJGLServer_ForeignStandardsMenuId);//删除附件
|
||||
db.HJGL_FileControl_ForeignStandards.DeleteOnSubmit(ForeignStandards);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 焊接工艺评定台账
|
||||
/// </summary>
|
||||
public static class HJGL_WeldingManage_WeldingProcedureService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取焊接工艺评定台账
|
||||
/// </summary>
|
||||
/// <param name="weldingProcedureId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_WeldingProcedure_WeldingProcedure GetWeldingProcedureById(string weldingProcedureId)
|
||||
{
|
||||
return Funs.DB.HJGL_WeldingProcedure_WeldingProcedure.FirstOrDefault(e => e.WeldingProcedureId == weldingProcedureId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加焊接工艺评定台账
|
||||
/// </summary>
|
||||
/// <param name="weldingProcedure"></param>
|
||||
public static void AddWeldingProcedure(Model.HJGL_WeldingProcedure_WeldingProcedure weldingProcedure)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_WeldingProcedure_WeldingProcedure newWeldingProcedure = new Model.HJGL_WeldingProcedure_WeldingProcedure();
|
||||
newWeldingProcedure.WeldingProcedureId = weldingProcedure.WeldingProcedureId;
|
||||
newWeldingProcedure.WeldingProcedureCode = weldingProcedure.WeldingProcedureCode;
|
||||
newWeldingProcedure.CompileDate = weldingProcedure.CompileDate;
|
||||
newWeldingProcedure.STE_ID1 = weldingProcedure.STE_ID1;
|
||||
newWeldingProcedure.STE_ID2 = weldingProcedure.STE_ID2;
|
||||
newWeldingProcedure.Specifications = weldingProcedure.Specifications;
|
||||
newWeldingProcedure.WeldingModel = weldingProcedure.WeldingModel;
|
||||
newWeldingProcedure.WeldingGrade = weldingProcedure.WeldingGrade;
|
||||
newWeldingProcedure.WeldingSpecifications = weldingProcedure.WeldingSpecifications;
|
||||
newWeldingProcedure.WeldingPosition = weldingProcedure.WeldingPosition;
|
||||
newWeldingProcedure.WeldingMethodId = weldingProcedure.WeldingMethodId;
|
||||
newWeldingProcedure.MinImpactDia = weldingProcedure.MinImpactDia;
|
||||
newWeldingProcedure.MaxImpactDia = weldingProcedure.MaxImpactDia;
|
||||
newWeldingProcedure.MinImpactThickness = weldingProcedure.MinImpactThickness;
|
||||
newWeldingProcedure.MaxImpactThickness = weldingProcedure.MaxImpactThickness;
|
||||
newWeldingProcedure.NoMinImpactThickness = weldingProcedure.NoMinImpactThickness;
|
||||
newWeldingProcedure.NoMaxImpactThickness = weldingProcedure.NoMaxImpactThickness;
|
||||
newWeldingProcedure.IsHotTreatment = weldingProcedure.IsHotTreatment;
|
||||
newWeldingProcedure.StandardId = weldingProcedure.StandardId;
|
||||
newWeldingProcedure.Remark = weldingProcedure.Remark;
|
||||
newWeldingProcedure.JointType = weldingProcedure.JointType;
|
||||
newWeldingProcedure.Motorization = weldingProcedure.Motorization;
|
||||
newWeldingProcedure.ProtectiveGas = weldingProcedure.ProtectiveGas;
|
||||
newWeldingProcedure.Stretching = weldingProcedure.Stretching;
|
||||
newWeldingProcedure.Bend = weldingProcedure.Bend;
|
||||
newWeldingProcedure.ToAttack = weldingProcedure.ToAttack;
|
||||
newWeldingProcedure.Others = weldingProcedure.Others;
|
||||
db.HJGL_WeldingProcedure_WeldingProcedure.InsertOnSubmit(newWeldingProcedure);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改焊接工艺评定台账
|
||||
/// </summary>
|
||||
/// <param name="weldingProcedure"></param>
|
||||
public static void UpdateWeldingProcedure(Model.HJGL_WeldingProcedure_WeldingProcedure weldingProcedure)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_WeldingProcedure_WeldingProcedure newWeldingProcedure = db.HJGL_WeldingProcedure_WeldingProcedure.FirstOrDefault(e => e.WeldingProcedureId == weldingProcedure.WeldingProcedureId);
|
||||
if (newWeldingProcedure != null)
|
||||
{
|
||||
newWeldingProcedure.WeldingProcedureCode = weldingProcedure.WeldingProcedureCode;
|
||||
newWeldingProcedure.CompileDate = weldingProcedure.CompileDate;
|
||||
newWeldingProcedure.STE_ID1 = weldingProcedure.STE_ID1;
|
||||
newWeldingProcedure.STE_ID2 = weldingProcedure.STE_ID2;
|
||||
newWeldingProcedure.Specifications = weldingProcedure.Specifications;
|
||||
newWeldingProcedure.WeldingModel = weldingProcedure.WeldingModel;
|
||||
newWeldingProcedure.WeldingGrade = weldingProcedure.WeldingGrade;
|
||||
newWeldingProcedure.WeldingSpecifications = weldingProcedure.WeldingSpecifications;
|
||||
newWeldingProcedure.WeldingPosition = weldingProcedure.WeldingPosition;
|
||||
newWeldingProcedure.WeldingMethodId = weldingProcedure.WeldingMethodId;
|
||||
newWeldingProcedure.MinImpactDia = weldingProcedure.MinImpactDia;
|
||||
newWeldingProcedure.MaxImpactDia = weldingProcedure.MaxImpactDia;
|
||||
newWeldingProcedure.MinImpactThickness = weldingProcedure.MinImpactThickness;
|
||||
newWeldingProcedure.MaxImpactThickness = weldingProcedure.MaxImpactThickness;
|
||||
newWeldingProcedure.NoMinImpactThickness = weldingProcedure.NoMinImpactThickness;
|
||||
newWeldingProcedure.NoMaxImpactThickness = weldingProcedure.NoMaxImpactThickness;
|
||||
newWeldingProcedure.IsHotTreatment = weldingProcedure.IsHotTreatment;
|
||||
newWeldingProcedure.StandardId = weldingProcedure.StandardId;
|
||||
newWeldingProcedure.Remark = weldingProcedure.Remark;
|
||||
newWeldingProcedure.JointType = weldingProcedure.JointType;
|
||||
newWeldingProcedure.Motorization = weldingProcedure.Motorization;
|
||||
newWeldingProcedure.ProtectiveGas = weldingProcedure.ProtectiveGas;
|
||||
newWeldingProcedure.Stretching = weldingProcedure.Stretching;
|
||||
newWeldingProcedure.Bend = weldingProcedure.Bend;
|
||||
newWeldingProcedure.ToAttack = weldingProcedure.ToAttack;
|
||||
newWeldingProcedure.Others = weldingProcedure.Others;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除焊接工艺评定台账
|
||||
/// </summary>
|
||||
/// <param name="weldingProcedureId"></param>
|
||||
public static void DeleteWeldingProcedureById(string weldingProcedureId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_WeldingProcedure_WeldingProcedure weldingProcedure = db.HJGL_WeldingProcedure_WeldingProcedure.FirstOrDefault(e => e.WeldingProcedureId == weldingProcedureId);
|
||||
if (weldingProcedure != null)
|
||||
{
|
||||
AttachFileService.DeleteAttachFile(Funs.RootPath, weldingProcedureId, Const.HJGL_WeldingProcedureMenuId);//删除附件
|
||||
db.HJGL_WeldingProcedure_WeldingProcedure.DeleteOnSubmit(weldingProcedure);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否存在相同评定编号
|
||||
/// </summary>
|
||||
/// <param name="weldingProcedureId"></param>
|
||||
/// <param name="code"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsWeldingProcedureCode(string weldingProcedureId, string code)
|
||||
{
|
||||
var q = Funs.DB.HJGL_WeldingProcedure_WeldingProcedure.FirstOrDefault(x => (x.WeldingProcedureId != weldingProcedureId || (weldingProcedureId == null && x.WeldingProcedureId != null)) && x.WeldingProcedureCode == code);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user