initproject

This commit is contained in:
2024-05-08 10:02:08 +08:00
commit 98f03b1780
3859 changed files with 348243 additions and 0 deletions
@@ -0,0 +1,102 @@
namespace BLL
{
using Model;
using System.Collections.Generic;
using System.Linq;
public static class Base_ComponentsService
{
/// <summary>
///获取安装组件信息
/// </summary>
/// <returns></returns>
public static Model.Base_Components GetComponentsByComponentsId(string componentsId)
{
return Funs.DB.Base_Components.FirstOrDefault(e => e.ComponentsId == componentsId);
}
/// <summary>
/// 增加安装组件信息
/// </summary>
/// <param name="Components"></param>
public static void AddComponents(Model.Base_Components components)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Components newComponents = new Base_Components
{
ComponentsId = components.ComponentsId,
ComponentsCode = components.ComponentsCode,
ComponentsName = components.ComponentsName,
Remark = components.Remark,
};
db.Base_Components.InsertOnSubmit(newComponents);
db.SubmitChanges();
}
/// <summary>
/// 修改安装组件信息
/// </summary>
/// <param name="Components"></param>
public static void UpdateComponents(Model.Base_Components components)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Components newComponents = db.Base_Components.FirstOrDefault(e => e.ComponentsId == components.ComponentsId);
if (newComponents != null)
{
newComponents.ComponentsCode = components.ComponentsCode;
newComponents.ComponentsName = components.ComponentsName;
newComponents.Remark = components.Remark;
db.SubmitChanges();
}
}
/// <summary>
/// 根据安装组件Id删除一个安装组件信息
/// </summary>
/// <param name="ComponentsId"></param>
public static void DeleteComponentsByComponentsId(string componentsId)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Components delComponents = db.Base_Components.FirstOrDefault(e => e.ComponentsId == componentsId);
if (delComponents != null)
{
db.Base_Components.DeleteOnSubmit(delComponents);
db.SubmitChanges();
}
}
/// <summary>
/// 按类型获取安装组件项
/// </summary>
/// <param name="ComponentsType"></param>
/// <returns></returns>
public static List<Model.Base_Components> GetComponentsList()
{
var list = (from x in Funs.DB.Base_Components
orderby x.ComponentsCode
select x).ToList();
return list;
}
#region
/// <summary>
/// 安装组件下拉项
/// </summary>
/// <param name="dropName">下拉框名称</param>
/// <param name="isShowPlease">是否显示请选择</param>
/// <param name="ComponentsType">耗材类型</param>
public static void InitComponentsDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease,string itemText)
{
dropName.DataValueField = "ComponentsId";
dropName.DataTextField = "ComponentsCode";
dropName.DataSource = GetComponentsList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName,itemText);
}
}
#endregion
}
}
@@ -0,0 +1,116 @@
namespace BLL
{
using Model;
using System.Collections.Generic;
using System.Linq;
public static class Base_ConsumablesService
{
/// <summary>
///获取焊接耗材信息
/// </summary>
/// <returns></returns>
public static Model.Base_Consumables GetConsumablesByConsumablesId(string consumablesId)
{
return Funs.DB.Base_Consumables.FirstOrDefault(e => e.ConsumablesId == consumablesId);
}
/// <summary>
/// 增加焊接耗材信息
/// </summary>
/// <param name="consumables"></param>
public static void AddConsumables(Model.Base_Consumables consumables)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Consumables newConsumables = new Base_Consumables
{
ConsumablesId = consumables.ConsumablesId,
ConsumablesCode = consumables.ConsumablesCode,
UserFlux = consumables.UserFlux,
ConsumablesName = consumables.ConsumablesName,
ConsumablesType = consumables.ConsumablesType,
SteelType = consumables.SteelType,
SteelFormat = consumables.SteelFormat,
Remark = consumables.Remark,
};
db.Base_Consumables.InsertOnSubmit(newConsumables);
db.SubmitChanges();
}
/// <summary>
/// 修改焊接耗材信息
/// </summary>
/// <param name="consumables"></param>
public static void UpdateConsumables(Model.Base_Consumables consumables)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Consumables newConsumables = db.Base_Consumables.FirstOrDefault(e => e.ConsumablesId == consumables.ConsumablesId);
if (newConsumables != null)
{
newConsumables.ConsumablesCode = consumables.ConsumablesCode;
newConsumables.ConsumablesName = consumables.ConsumablesName;
newConsumables.UserFlux = consumables.UserFlux;
newConsumables.ConsumablesType = consumables.ConsumablesType;
newConsumables.SteelType = consumables.SteelType;
newConsumables.SteelFormat = consumables.SteelFormat;
newConsumables.Remark = consumables.Remark;
db.SubmitChanges();
}
}
/// <summary>
/// 根据焊接耗材Id删除一个焊接耗材信息
/// </summary>
/// <param name="consumablesId"></param>
public static void DeleteConsumablesByConsumablesId(string consumablesId)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Consumables delConsumables = db.Base_Consumables.FirstOrDefault(e => e.ConsumablesId == consumablesId);
if (delConsumables != null)
{
db.Base_Consumables.DeleteOnSubmit(delConsumables);
db.SubmitChanges();
}
}
/// <summary>
/// 按类型获取焊接耗材项
/// </summary>
/// <param name="consumablesType"></param>
/// <returns></returns>
public static List<Model.Base_Consumables> GetConsumablesListByConsumablesType(string consumablesType)
{
var list = (from x in Funs.DB.Base_Consumables
orderby x.ConsumablesCode
select x).ToList();
if (!string.IsNullOrEmpty(consumablesType))
{
list = list.Where(x => x.ConsumablesType == consumablesType).ToList();
}
return list;
}
#region
/// <summary>
/// 焊接耗材下拉项
/// </summary>
/// <param name="dropName">下拉框名称</param>
/// <param name="isShowPlease">是否显示请选择</param>
/// <param name="consumablesType">耗材类型</param>
public static void InitConsumablesDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease, string consumablesType,string itemText)
{
dropName.DataValueField = "ConsumablesId";
dropName.DataTextField = "ConsumablesCode";
dropName.DataSource = GetConsumablesListByConsumablesType(consumablesType);
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName,itemText);
}
}
#endregion
}
}
@@ -0,0 +1,162 @@
using Model;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
namespace BLL
{
public static class Base_DNCompareService
{
/// <summary>
///获取直径寸径对照信息
/// </summary>
/// <returns></returns>
public static Model.Base_DNCompare GetDNCompareByDNCompareId(string dNCompareId)
{
return Funs.DB.Base_DNCompare.FirstOrDefault(e => e.DNCompareId == dNCompareId);
}
/// <summary>
/// 增加直径寸径对照信息
/// </summary>
/// <param name="dNCompare"></param>
public static void AddDNCompare(Model.Base_DNCompare dNCompare)
{
Model.HJGLDB db = Funs.DB;
Model.Base_DNCompare newDNCompare = new Base_DNCompare
{
DNCompareId = dNCompare.DNCompareId,
PipeSize = dNCompare.PipeSize,
OutSizeDia = dNCompare.OutSizeDia,
DN = dNCompare.DN,
OutSize_FB = dNCompare.OutSize_FB,
DN_FB = dNCompare.DN_FB,
SCH_FB = dNCompare.SCH_FB,
SCH5 =dNCompare.SCH5,
SCH5S=dNCompare.SCH5S,
SCH10 = dNCompare.SCH10,
SCH10S=dNCompare.SCH10S,
SCH20 = dNCompare.SCH20,
SCH30 = dNCompare.SCH30,
SCH40 = dNCompare.SCH40,
SCH40S=dNCompare.SCH40S,
STD = dNCompare.STD,
SCH60 = dNCompare.SCH60,
SCH80 = dNCompare.SCH80,
SCH80S=dNCompare.SCH80S,
XS = dNCompare.XS,
SCH100 = dNCompare.SCH100,
SCH120 = dNCompare.SCH120,
SCH140 = dNCompare.SCH140,
SCH160 = dNCompare.SCH160,
XXS = dNCompare.XXS
};
db.Base_DNCompare.InsertOnSubmit(newDNCompare);
db.SubmitChanges();
}
/// <summary>
/// 修改直径寸径对照信息
/// </summary>
/// <param name="dNCompare"></param>
public static void UpdateDNCompare(Model.Base_DNCompare dNCompare)
{
Model.HJGLDB db = Funs.DB;
Model.Base_DNCompare newDNCompare = db.Base_DNCompare.FirstOrDefault(e => e.DNCompareId == dNCompare.DNCompareId);
if (newDNCompare != null)
{
newDNCompare.PipeSize = dNCompare.PipeSize;
newDNCompare.OutSizeDia = dNCompare.OutSizeDia;
newDNCompare.DN = dNCompare.DN;
newDNCompare.OutSize_FB = dNCompare.OutSize_FB;
newDNCompare.DN_FB = dNCompare.DN_FB;
newDNCompare.SCH_FB = dNCompare.SCH_FB;
newDNCompare.SCH5 = dNCompare.SCH5;
newDNCompare.SCH5S = dNCompare.SCH5S;
newDNCompare.SCH10 = dNCompare.SCH10;
newDNCompare.SCH10S = dNCompare.SCH10S;
newDNCompare.SCH20 = dNCompare.SCH20;
newDNCompare.SCH30 = dNCompare.SCH30;
newDNCompare.SCH40 = dNCompare.SCH40;
newDNCompare.SCH40S = dNCompare.SCH40S;
newDNCompare.STD = dNCompare.STD;
newDNCompare.SCH60 = dNCompare.SCH60;
newDNCompare.SCH80 = dNCompare.SCH80;
newDNCompare.SCH80S = dNCompare.SCH80S;
newDNCompare.XS = dNCompare.XS;
newDNCompare.SCH100 = dNCompare.SCH100;
newDNCompare.SCH120 = dNCompare.SCH120;
newDNCompare.SCH140 = dNCompare.SCH140;
newDNCompare.SCH160 = dNCompare.SCH160;
newDNCompare.XXS = dNCompare.XXS;
db.SubmitChanges();
}
}
/// <summary>
/// 根据直径寸径对照Id删除一个直径寸径对照信息
/// </summary>
/// <param name="dNCompareId"></param>
public static void DeleteDNCompareByDNCompareId(string dNCompareId)
{
Model.HJGLDB db = Funs.DB;
Model.Base_DNCompare delDNCompare = db.Base_DNCompare.FirstOrDefault(e => e.DNCompareId == dNCompareId);
if (delDNCompare != null)
{
db.Base_DNCompare.DeleteOnSubmit(delDNCompare);
db.SubmitChanges();
}
}
#region
public static ListItem[] GetDNCompareList()
{
ListItem[] list = new ListItem[19];
list[0] = new ListItem("5", "5");
list[1] = new ListItem("5S", "5S");
list[2] = new ListItem("10", "10");
list[3] = new ListItem("10S", "10S");
list[4] = new ListItem("20", "20");
list[5] = new ListItem("30", "30");
list[6] = new ListItem("40", "40");
list[7] = new ListItem("40S", "40S");
list[8] = new ListItem("STD", "STD");
list[9] = new ListItem("60", "60");
list[10] = new ListItem("80", "80");
list[11] = new ListItem("80S", "80S");
list[12] = new ListItem("XS", "XS");
list[13] = new ListItem("100", "100");
list[14] = new ListItem("120", "120");
list[15] = new ListItem("140", "140");
list[16] = new ListItem("160", "160");
list[17] = new ListItem("XXS", "XXS");
list[18] = new ListItem("FB", "FB");
return list;
}
/// <summary>
/// 直径寸径对照下拉项
/// </summary>
/// <param name="dropName">下拉框名称</param>
/// <param name="isShowPlease">是否显示请选择</param>
public static void InitDNCompareDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
{
dropName.DataValueField = "Text";
dropName.DataTextField = "Value";
dropName.DataSource = GetDNCompareList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
#endregion
}
}
@@ -0,0 +1,217 @@
using Model;
using System.Collections.Generic;
using System.Linq;
namespace BLL
{
public static class Base_DefectService
{
/// <summary>
///获取缺陷性质信息
/// </summary>
/// <returns></returns>
public static Model.Base_Defect GetDefectByDefectId(string defectId)
{
return Funs.DB.Base_Defect.FirstOrDefault(e => e.DefectId.ToString() == defectId);
}
/// <summary>
///根据缺陷名称字符串获取缺陷性质Id字符串
/// </summary>
/// <returns></returns>
public static string GetDefectIdStrByDefectNameStr(string defectNameStr)
{
string defectIdStr = string.Empty;
var defects = from x in Funs.DB.Base_Defect select x;
string[] strs = defectNameStr.Split(',');
foreach (var str in strs)
{
var d = defects.FirstOrDefault(x=>x.DefectName==str);
if (d != null)
{
defectIdStr += d.DefectId.ToString() + ",";
}
}
if (!string.IsNullOrEmpty(defectIdStr))
{
defectIdStr = defectIdStr.Substring(0, defectIdStr.LastIndexOf(","));
}
return defectIdStr;
}
/// <summary>
///根据缺陷名称(英文)字符串获取缺陷性质Id字符串
/// </summary>
/// <returns></returns>
public static string GetDefectIdStrByDefectEngNameStr(string defectEngNameStr)
{
string defectIdStr = string.Empty;
var defects = from x in Funs.DB.Base_Defect select x;
string[] strs = defectEngNameStr.Split(',');
foreach (var str in strs)
{
var d = defects.FirstOrDefault(x => x.DefectEngName == str);
if (d != null)
{
defectIdStr += d.DefectId.ToString() + ",";
}
}
if (!string.IsNullOrEmpty(defectIdStr))
{
defectIdStr = defectIdStr.Substring(0, defectIdStr.LastIndexOf(","));
}
return defectIdStr;
}
/// <summary>
///根据缺陷性质Id字符串获取缺陷名称字符串
/// </summary>
/// <returns></returns>
public static string GetDefectNameStrByDefectIdStr(string defectIdStr)
{
string defectNameStr = string.Empty;
if (!string.IsNullOrEmpty(defectIdStr))
{
var defects = from x in Funs.DB.Base_Defect select x;
string[] strs = defectIdStr.Split(',');
foreach (var str in strs)
{
var d = defects.FirstOrDefault(x => x.DefectId.ToString() == str);
if (d != null)
{
defectNameStr += d.DefectName.ToString() + ",";
}
}
if (!string.IsNullOrEmpty(defectNameStr))
{
defectNameStr = defectNameStr.Substring(0, defectNameStr.LastIndexOf(","));
}
}
return defectNameStr;
}
/// <summary>
///根据缺陷性质Id字符串获取缺陷名称(英文)字符串
/// </summary>
/// <returns></returns>
public static string GetDefectEngNameStrByDefectIdStr(string defectIdStr)
{
string defectEngNameStr = string.Empty;
var defects = from x in Funs.DB.Base_Defect select x;
string[] strs = defectIdStr.Split(',');
foreach (var str in strs)
{
var d = defects.FirstOrDefault(x => x.DefectId.ToString() == str);
if (d != null)
{
defectEngNameStr += d.DefectEngName.ToString() + ",";
}
}
if (!string.IsNullOrEmpty(defectEngNameStr))
{
defectEngNameStr = defectEngNameStr.Substring(0, defectEngNameStr.LastIndexOf(","));
}
return defectEngNameStr;
}
/// <summary>
/// 增加缺陷性质信息
/// </summary>
/// <param name="Defect"></param>
public static void AddDefect(Model.Base_Defect defect)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Defect newDefect = new Base_Defect
{
DefectId = defect.DefectId,
DefectName = defect.DefectName,
DefectEngName = defect.DefectEngName,
};
db.Base_Defect.InsertOnSubmit(newDefect);
db.SubmitChanges();
}
/// <summary>
/// 修改缺陷性质信息
/// </summary>
/// <param name="Defect"></param>
public static void UpdateDefect(Model.Base_Defect defect)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Defect newDefect = db.Base_Defect.FirstOrDefault(e => e.DefectId == defect.DefectId);
if (newDefect != null)
{
newDefect.DefectName = defect.DefectName;
newDefect.DefectEngName = defect.DefectEngName;
db.SubmitChanges();
}
}
/// <summary>
/// 根据缺陷性质Id删除一个缺陷性质信息
/// </summary>
/// <param name="DefectId"></param>
public static void DeleteDefectByDefectId(string defectId)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Defect delDefect = db.Base_Defect.FirstOrDefault(e => e.DefectId.ToString() == defectId);
if (delDefect != null)
{
db.Base_Defect.DeleteOnSubmit(delDefect);
db.SubmitChanges();
}
}
/// <summary>
/// 按类型获取缺陷性质项
/// </summary>
/// <param name="DefectType"></param>
/// <returns></returns>
public static List<Model.Base_Defect> GetDefectList()
{
var list = (from x in Funs.DB.Base_Defect
orderby x.DefectId
select x).ToList();
return list;
}
#region
/// <summary>
/// 缺陷性质下拉项
/// </summary>
/// <param name="dropName">下拉框名称</param>
/// <param name="isShowPlease">是否显示请选择</param>
/// <param name="DefectType">耗材类型</param>
public static void InitDefectDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease, string itemText)
{
dropName.DataValueField = "DefectName";
dropName.DataTextField = "DefectName";
dropName.DataSource = GetDefectList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName, itemText);
}
}
/// <summary>
/// 英文缺陷性质下拉项
/// </summary>
/// <param name="dropName">下拉框名称</param>
/// <param name="isShowPlease">是否显示请选择</param>
/// <param name="DefectType">耗材类型</param>
public static void InitEngDefectDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease, string itemText)
{
dropName.DataValueField = "DefectEngName";
dropName.DataTextField = "DefectEngName";
dropName.DataSource = GetDefectList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName, itemText);
}
}
#endregion
}
}
@@ -0,0 +1,103 @@
namespace BLL
{
using Model;
using System.Collections.Generic;
using System.Linq;
public static class Base_DetectionRateService
{
/// <summary>
///获取探伤比例信息
/// </summary>
/// <returns></returns>
public static Model.Base_DetectionRate GetDetectionRateByDetectionRateId(string detectionRateId)
{
return Funs.DB.Base_DetectionRate.FirstOrDefault(e => e.DetectionRateId == detectionRateId);
}
/// <summary>
/// 增加探伤比例信息
/// </summary>
/// <param name="detectionRate"></param>
public static void AddDetectionRate(Model.Base_DetectionRate detectionRate)
{
Model.HJGLDB db = Funs.DB;
Model.Base_DetectionRate newDetectionRate = new Base_DetectionRate
{
DetectionRateId = detectionRate.DetectionRateId,
DetectionRateCode = detectionRate.DetectionRateCode,
DetectionRateValue = detectionRate.DetectionRateValue,
Remark = detectionRate.Remark,
};
db.Base_DetectionRate.InsertOnSubmit(newDetectionRate);
db.SubmitChanges();
}
/// <summary>
/// 修改探伤比例信息
/// </summary>
/// <param name="DetectionRate"></param>
public static void UpdateDetectionRate(Model.Base_DetectionRate detectionRate)
{
Model.HJGLDB db = Funs.DB;
Model.Base_DetectionRate newDetectionRate = db.Base_DetectionRate.FirstOrDefault(e => e.DetectionRateId == detectionRate.DetectionRateId);
if (newDetectionRate != null)
{
newDetectionRate.DetectionRateCode = detectionRate.DetectionRateCode;
newDetectionRate.DetectionRateValue = detectionRate.DetectionRateValue;
newDetectionRate.Remark = detectionRate.Remark;
db.SubmitChanges();
}
}
/// <summary>
/// 根据探伤比例Id删除一个探伤比例信息
/// </summary>
/// <param name="detectionRateId"></param>
public static void DeleteDetectionRateByDetectionRateId(string detectionRateId)
{
Model.HJGLDB db = Funs.DB;
Model.Base_DetectionRate delDetectionRate = db.Base_DetectionRate.FirstOrDefault(e => e.DetectionRateId == detectionRateId);
if (delDetectionRate != null)
{
db.Base_DetectionRate.DeleteOnSubmit(delDetectionRate);
db.SubmitChanges();
}
}
/// <summary>
/// 按类型获取探伤比例项
/// </summary>
/// <param name="DetectionRateType"></param>
/// <returns></returns>
public static List<Model.Base_DetectionRate> GetDetectionRateList()
{
var list = (from x in Funs.DB.Base_DetectionRate
orderby x.DetectionRateCode
select x).ToList();
return list;
}
#region
/// <summary>
/// 探伤比例下拉项
/// </summary>
/// <param name="dropName">下拉框名称</param>
/// <param name="isShowPlease">是否显示请选择</param>
/// <param name="DetectionRateType">耗材类型</param>
public static void InitDetectionRateDropDownList(FineUIPro.DropDownList dropName,string itemText, bool isShowPlease)
{
dropName.DataValueField = "DetectionRateId";
dropName.DataTextField = "DetectionRateCode";
dropName.DataSource = GetDetectionRateList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName,itemText);
}
}
#endregion
}
}
@@ -0,0 +1,133 @@
namespace BLL
{
using Model;
using System.Collections.Generic;
using System.Linq;
public static class Base_DetectionTypeService
{
/// <summary>
///获取探伤类型信息
/// </summary>
/// <returns></returns>
public static Model.Base_DetectionType GetDetectionTypeByDetectionTypeId(string detectionTypeId)
{
return Funs.DB.Base_DetectionType.FirstOrDefault(e => e.DetectionTypeId == detectionTypeId);
}
/// <summary>
/// 增加探伤类型信息
/// </summary>
/// <param name="detectionType"></param>
public static void AddDetectionType(Model.Base_DetectionType detectionType)
{
Model.HJGLDB db = Funs.DB;
Model.Base_DetectionType newDetectionType = new Base_DetectionType
{
DetectionTypeId = detectionType.DetectionTypeId,
DetectionTypeCode = detectionType.DetectionTypeCode,
DetectionTypeName = detectionType.DetectionTypeName,
SysType = detectionType.SysType,
SecuritySpace = detectionType.SecuritySpace,
TestStandard=detectionType.TestStandard,
TechLevel=detectionType.TechLevel,
InjuryDegree = detectionType.InjuryDegree,
Remark = detectionType.Remark,
};
db.Base_DetectionType.InsertOnSubmit(newDetectionType);
db.SubmitChanges();
}
/// <summary>
/// 修改探伤类型信息
/// </summary>
/// <param name="detectionType"></param>
public static void UpdateDetectionType(Model.Base_DetectionType detectionType)
{
Model.HJGLDB db = Funs.DB;
Model.Base_DetectionType newDetectionType = db.Base_DetectionType.FirstOrDefault(e => e.DetectionTypeId == detectionType.DetectionTypeId);
if (newDetectionType != null)
{
newDetectionType.DetectionTypeCode = detectionType.DetectionTypeCode;
newDetectionType.DetectionTypeName = detectionType.DetectionTypeName;
newDetectionType.SysType = detectionType.SysType;
newDetectionType.SecuritySpace = detectionType.SecuritySpace;
newDetectionType.TechLevel = detectionType.TechLevel;
newDetectionType.TestStandard = detectionType.TestStandard;
newDetectionType.InjuryDegree = detectionType.InjuryDegree;
newDetectionType.Remark = detectionType.Remark;
db.SubmitChanges();
}
}
/// <summary>
/// 根据探伤类型Id删除一个探伤类型信息
/// </summary>
/// <param name="detectionTypeId"></param>
public static void DeleteDetectionTypeByDetectionTypeId(string detectionTypeId)
{
Model.HJGLDB db = Funs.DB;
Model.Base_DetectionType delDetectionType = db.Base_DetectionType.FirstOrDefault(e => e.DetectionTypeId == detectionTypeId);
if (delDetectionType != null)
{
db.Base_DetectionType.DeleteOnSubmit(delDetectionType);
db.SubmitChanges();
}
}
/// <summary>
/// 按类型获取探伤类型项
/// </summary>
/// <param name="DetectionTypeType"></param>
/// <returns></returns>
public static List<Model.Base_DetectionType> GetDetectionTypeListByDetectionTypeType(string sysType)
{
var list = (from x in Funs.DB.Base_DetectionType
orderby x.DetectionTypeCode
select x).ToList();
if (!string.IsNullOrEmpty(sysType))
{
list = list.Where(x => x.SysType == sysType).ToList();
}
return list;
}
#region
/// <summary>
/// 探伤类型下拉项
/// </summary>
/// <param name="dropName">下拉框名称</param>
/// <param name="isShowPlease">是否显示请选择</param>
/// <param name="DetectionTypeType">耗材类型</param>
public static void InitDetectionTypeDropDownList(FineUIPro.DropDownList dropName,string itemText, bool isShowPlease, string sysType)
{
dropName.DataValueField = "DetectionTypeId";
dropName.DataTextField = "DetectionTypeCode";
dropName.DataSource = GetDetectionTypeListByDetectionTypeType(sysType);
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName,itemText);
}
}
public static void InitDetectionType(FineUIPro.DropDownList dropName, string itemText, bool isShowPlease)
{
dropName.DataValueField = "DetectionTypeId";
dropName.DataTextField = "DetectionTypeCode";
dropName.DataSource = (from x in Funs.DB.Base_DetectionType
where (x.DetectionTypeCode.Contains("PA") && x.DetectionTypeCode.Contains("UT"))
|| x.DetectionTypeCode.Contains("PT")
select x).ToList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName, itemText);
}
}
#endregion
}
}
@@ -0,0 +1,103 @@
namespace BLL
{
using Model;
using System.Collections.Generic;
using System.Linq;
public static class Base_GrooveTypeService
{
/// <summary>
///获取坡口类型信息
/// </summary>
/// <returns></returns>
public static Model.Base_GrooveType GetGrooveTypeByGrooveTypeId(string drooveTypeId)
{
return Funs.DB.Base_GrooveType.FirstOrDefault(e => e.GrooveTypeId == drooveTypeId);
}
/// <summary>
/// 增加坡口类型信息
/// </summary>
/// <param name="grooveType"></param>
public static void AddGrooveType(Model.Base_GrooveType grooveType)
{
Model.HJGLDB db = Funs.DB;
Model.Base_GrooveType newGrooveType = new Base_GrooveType
{
GrooveTypeId = grooveType.GrooveTypeId,
GrooveTypeCode = grooveType.GrooveTypeCode,
GrooveTypeName = grooveType.GrooveTypeName,
Remark = grooveType.Remark,
};
db.Base_GrooveType.InsertOnSubmit(newGrooveType);
db.SubmitChanges();
}
/// <summary>
/// 修改坡口类型信息
/// </summary>
/// <param name="grooveType"></param>
public static void UpdateGrooveType(Model.Base_GrooveType grooveType)
{
Model.HJGLDB db = Funs.DB;
Model.Base_GrooveType newGrooveType = db.Base_GrooveType.FirstOrDefault(e => e.GrooveTypeId == grooveType.GrooveTypeId);
if (newGrooveType != null)
{
newGrooveType.GrooveTypeCode = grooveType.GrooveTypeCode;
newGrooveType.GrooveTypeName = grooveType.GrooveTypeName;
newGrooveType.Remark = grooveType.Remark;
db.SubmitChanges();
}
}
/// <summary>
/// 根据坡口类型Id删除一个坡口类型信息
/// </summary>
/// <param name="grooveTypeId"></param>
public static void DeleteGrooveTypeByGrooveTypeId(string grooveTypeId)
{
Model.HJGLDB db = Funs.DB;
Model.Base_GrooveType delGrooveType = db.Base_GrooveType.FirstOrDefault(e => e.GrooveTypeId == grooveTypeId);
if (delGrooveType != null)
{
db.Base_GrooveType.DeleteOnSubmit(delGrooveType);
db.SubmitChanges();
}
}
/// <summary>
/// 按类型获取坡口类型项
/// </summary>
/// <param name="GrooveTypeType"></param>
/// <returns></returns>
public static List<Model.Base_GrooveType> GetGrooveTypeList()
{
var list = (from x in Funs.DB.Base_GrooveType
orderby x.GrooveTypeCode
select x).ToList();
return list;
}
#region
/// <summary>
/// 坡口类型下拉项
/// </summary>
/// <param name="dropName">下拉框名称</param>
/// <param name="isShowPlease">是否显示请选择</param>
/// <param name="GrooveTypeType">耗材类型</param>
public static void InitGrooveTypeDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease,string itemText)
{
dropName.DataValueField = "GrooveTypeId";
dropName.DataTextField = "GrooveTypeCode";
dropName.DataSource = GetGrooveTypeList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName,itemText);
}
}
#endregion
}
}
@@ -0,0 +1,117 @@
using Model;
using System.Collections.Generic;
using System.Linq;
namespace BLL
{
public static class Base_MaterialService
{
/// <summary>
///获取材质定义信息
/// </summary>
/// <returns></returns>
public static Model.Base_Material GetMaterialByMaterialId(string materialId)
{
return Funs.DB.Base_Material.FirstOrDefault(e => e.MaterialId == materialId);
}
/// <summary>
/// 增加材质定义信息
/// </summary>
/// <param name="material"></param>
public static void AddMaterial(Model.Base_Material material)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Material newMaterial = new Base_Material
{
MaterialId = material.MaterialId,
MaterialCode = material.MaterialCode,
MaterialType = material.MaterialType,
SteelType = material.SteelType,
Remark = material.Remark,
MaterialClass=material.MaterialClass,
MaterialGroup=material.MaterialGroup,
};
db.Base_Material.InsertOnSubmit(newMaterial);
db.SubmitChanges();
}
/// <summary>
/// 修改材质定义信息
/// </summary>
/// <param name="material"></param>
public static void UpdateMaterial(Model.Base_Material material)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Material newMaterial = db.Base_Material.FirstOrDefault(e => e.MaterialId == material.MaterialId);
if (newMaterial != null)
{
newMaterial.MaterialCode = material.MaterialCode;
newMaterial.MaterialType = material.MaterialType;
newMaterial.SteelType = material.SteelType;
newMaterial.Remark = material.Remark;
newMaterial.MaterialClass=material.MaterialClass;
newMaterial.MaterialGroup = material.MaterialGroup;
db.SubmitChanges();
}
}
/// <summary>
/// 根据材质定义Id删除一个材质定义信息
/// </summary>
/// <param name="materialId"></param>
public static void DeleteMaterialByMaterialId(string materialId)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Material delMaterial = db.Base_Material.FirstOrDefault(e => e.MaterialId == materialId);
if (delMaterial != null)
{
db.Base_Material.DeleteOnSubmit(delMaterial);
db.SubmitChanges();
}
}
/// <summary>
/// 按类型获取材质定义项
/// </summary>
/// <param name="MaterialType"></param>
/// <returns></returns>
public static List<Model.Base_Material> GetMaterialList()
{
var list = (from x in Funs.DB.Base_Material
orderby x.MaterialCode
select x).ToList();
return list;
}
#region
/// <summary>
/// 材质定义下拉项
/// </summary>
/// <param name="dropName">下拉框名称</param>
/// <param name="isShowPlease">是否显示请选择</param>
/// <param name="MaterialType">耗材类型</param>
public static void InitMaterialDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease,string itemText)
{
dropName.DataValueField = "MaterialId";
dropName.DataTextField = "MaterialCode";
dropName.DataSource = GetMaterialList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName,itemText);
}
}
public static void InitMaterialDropDownList(FineUIPro.DropDownList dropName)
{
dropName.DataValueField = "MaterialCode";
dropName.DataTextField = "MaterialCode";
dropName.DataSource = GetMaterialList();
dropName.DataBind();
dropName.SelectedIndex = 0;
}
#endregion
}
}
@@ -0,0 +1,104 @@
using Model;
using System.Collections.Generic;
using System.Linq;
namespace BLL
{
public static class Base_MediumService
{
/// <summary>
///获取安装组件信息
/// </summary>
/// <returns></returns>
public static Model.Base_Medium GetMediumByMediumId(string mediumId)
{
return Funs.DB.Base_Medium.FirstOrDefault(e => e.MediumId == mediumId);
}
/// <summary>
/// 增加安装组件信息
/// </summary>
/// <param name="medium"></param>
public static void AddMedium(Model.Base_Medium medium)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Medium newMedium = new Base_Medium
{
MediumId = medium.MediumId,
MediumCode = medium.MediumCode,
MediumName = medium.MediumName,
MediumAbbreviation = medium.MediumAbbreviation,
Remark = medium.Remark,
};
db.Base_Medium.InsertOnSubmit(newMedium);
db.SubmitChanges();
}
/// <summary>
/// 修改安装组件信息
/// </summary>
/// <param name="medium"></param>
public static void UpdateMedium(Model.Base_Medium medium)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Medium newMedium = db.Base_Medium.FirstOrDefault(e => e.MediumId == medium.MediumId);
if (newMedium != null)
{
newMedium.MediumCode = medium.MediumCode;
newMedium.MediumName = medium.MediumName;
newMedium.MediumAbbreviation = medium.MediumAbbreviation;
newMedium.Remark = medium.Remark;
db.SubmitChanges();
}
}
/// <summary>
/// 根据安装组件Id删除一个安装组件信息
/// </summary>
/// <param name="mediumId"></param>
public static void DeleteMediumByMediumId(string mediumId)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Medium delMedium = db.Base_Medium.FirstOrDefault(e => e.MediumId == mediumId);
if (delMedium != null)
{
db.Base_Medium.DeleteOnSubmit(delMedium);
db.SubmitChanges();
}
}
/// <summary>
/// 按类型获取安装组件项
/// </summary>
/// <param name="MediumType"></param>
/// <returns></returns>
public static List<Model.Base_Medium> GetMediumList()
{
var list = (from x in Funs.DB.Base_Medium
orderby x.MediumCode
select x).ToList();
return list;
}
#region
/// <summary>
/// 安装组件下拉项
/// </summary>
/// <param name="dropName">下拉框名称</param>
/// <param name="isShowPlease">是否显示请选择</param>
/// <param name="MediumType">耗材类型</param>
public static void InitMediumDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease,string itemText)
{
dropName.DataValueField = "MediumId";
dropName.DataTextField = "MediumCode";
dropName.DataSource = GetMediumList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName,itemText);
}
}
#endregion
}
}
@@ -0,0 +1,101 @@
namespace BLL
{
using Model;
using System.Collections.Generic;
using System.Linq;
public static class Base_PIPClassService
{
/// <summary>
///获取压力管道分级信息
/// </summary>
/// <returns></returns>
public static Model.Base_PIPClass GetPIPClass(string pipClassId)
{
return Funs.DB.Base_PIPClass.FirstOrDefault(e => e.PIPClassId == pipClassId);
}
/// <summary>
/// 增加压力管道分级信息
/// </summary>
/// <param name="pipClass"></param>
public static void AddPIPClass(Model.Base_PIPClass pipClass)
{
Model.HJGLDB db = Funs.DB;
Model.Base_PIPClass newPIPClass = new Base_PIPClass
{
PIPClassId = pipClass.PIPClassId,
PIPClassCode = pipClass.PIPClassCode,
PIPClassName = pipClass.PIPClassName,
Remark = pipClass.Remark,
};
db.Base_PIPClass.InsertOnSubmit(newPIPClass);
db.SubmitChanges();
}
/// <summary>
/// 修改压力管道分级信息
/// </summary>
/// <param name="pipClass"></param>
public static void UpdatePIPClass(Model.Base_PIPClass pipClass)
{
Model.HJGLDB db = Funs.DB;
Model.Base_PIPClass newPIPClass = db.Base_PIPClass.FirstOrDefault(e => e.PIPClassId == pipClass.PIPClassId);
if (newPIPClass != null)
{
newPIPClass.PIPClassCode = pipClass.PIPClassCode;
newPIPClass.PIPClassName = pipClass.PIPClassName;
newPIPClass.Remark = pipClass.Remark;
db.SubmitChanges();
}
}
/// <summary>
/// 删除压力管道分级信息
/// </summary>
/// <param name="pipClassId"></param>
public static void DeletePIPClass(string pipClassId)
{
Model.HJGLDB db = Funs.DB;
Model.Base_PIPClass delPIPClass = db.Base_PIPClass.FirstOrDefault(e => e.PIPClassId == pipClassId);
if (delPIPClass != null)
{
db.Base_PIPClass.DeleteOnSubmit(delPIPClass);
db.SubmitChanges();
}
}
/// <summary>
/// 按压力管道分级获取项
/// </summary>
/// <param name="GrooveTypeType"></param>
/// <returns></returns>
public static List<Model.Base_PIPClass> GetPIPClassList()
{
var list = (from x in Funs.DB.Base_PIPClass
orderby x.PIPClassCode
select x).ToList();
return list;
}
#region
/// <summary>
/// 压力管道分级下拉项
/// </summary>
/// <param name="dropName">下拉框名称</param>
/// <param name="isShowPlease">是否显示请选择</param>
public static void InitPIPClassDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease, string itemText)
{
dropName.DataValueField = "PIPClassId";
dropName.DataTextField = "PIPClassCode";
dropName.DataSource = GetPIPClassList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName, itemText);
}
}
#endregion
}
}
@@ -0,0 +1,100 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BLL
{
/// <summary>
/// 管道等级条件设置
/// </summary>
public static class Base_PipingClassDetailService
{
/// <summary>
/// 根据主键获取管道等级条件设置
/// </summary>
/// <param name="pipingClassDetailId"></param>
/// <returns></returns>
public static Model.Base_PipingClassDetail GetPipingClassDetailById(string pipingClassDetailId)
{
return Funs.DB.Base_PipingClassDetail.FirstOrDefault(e => e.PipingClassDetailId == pipingClassDetailId);
}
/// <summary>
/// 根据主键获取管道等级
/// </summary>
/// <param name="pipingClassDetailId"></param>
/// <returns></returns>
public static Model.View_Base_PipingClassDetail GetViewPipingClassDetailById(string pipingClassDetailId)
{
return Funs.DB.View_Base_PipingClassDetail.FirstOrDefault(e => e.PipingClassDetailId == pipingClassDetailId);
}
/// <summary>
/// 根据管道等级Id获取相关条件设置信息
/// </summary>
/// <param name="pipingClassId"></param>
/// <returns></returns>
public static List<Model.Base_PipingClassDetail> GetPipingClassDetailByPipingClassId(string pipingClassId)
{
return (from x in Funs.DB.Base_PipingClassDetail where x.PipingClassId == pipingClassId select x).ToList();
}
/// <summary>
/// 添加条件设置信息
/// </summary>
/// <param name="pipingClassDetail"></param>
public static void AddPipingClassDetail(Model.Base_PipingClassDetail pipingClassDetail)
{
Model.HJGLDB db = Funs.DB;
Model.Base_PipingClassDetail newPipingClassDetail = new Model.Base_PipingClassDetail();
newPipingClassDetail.PipingClassDetailId = pipingClassDetail.PipingClassDetailId;
newPipingClassDetail.PipingClassId = pipingClassDetail.PipingClassId;
newPipingClassDetail.WeldTypeId = pipingClassDetail.WeldTypeId;
newPipingClassDetail.DetectionTypeId = pipingClassDetail.DetectionTypeId;
newPipingClassDetail.DetectionRateId = pipingClassDetail.DetectionRateId;
newPipingClassDetail.SizeMin = pipingClassDetail.SizeMin;
newPipingClassDetail.SizeMax = pipingClassDetail.SizeMax;
newPipingClassDetail.ThicknessMin = pipingClassDetail.ThicknessMin;
newPipingClassDetail.ThicknessMax = pipingClassDetail.ThicknessMax;
db.Base_PipingClassDetail.InsertOnSubmit(newPipingClassDetail);
db.SubmitChanges();
}
/// <summary>
/// 修改条件设置
/// </summary>
/// <param name="pipingClassDetail"></param>
public static void UpdatePipingClassDetail(Model.Base_PipingClassDetail pipingClassDetail)
{
Model.HJGLDB db = Funs.DB;
Model.Base_PipingClassDetail newPipingClassDetail = db.Base_PipingClassDetail.FirstOrDefault(e => e.PipingClassDetailId == pipingClassDetail.PipingClassDetailId);
if (newPipingClassDetail != null)
{
newPipingClassDetail.WeldTypeId = pipingClassDetail.WeldTypeId;
newPipingClassDetail.DetectionTypeId = pipingClassDetail.DetectionTypeId;
newPipingClassDetail.DetectionRateId = pipingClassDetail.DetectionRateId;
newPipingClassDetail.SizeMin = pipingClassDetail.SizeMin;
newPipingClassDetail.SizeMax = pipingClassDetail.SizeMax;
newPipingClassDetail.ThicknessMin = pipingClassDetail.ThicknessMin;
newPipingClassDetail.ThicknessMax = pipingClassDetail.ThicknessMax;
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除条件设置
/// </summary>
/// <param name="pipingClassDetailId"></param>
public static void DeletePipingClassDetailById(string pipingClassDetailId)
{
Model.HJGLDB db = Funs.DB;
Model.Base_PipingClassDetail pipingClassDetail = db.Base_PipingClassDetail.FirstOrDefault(e => e.PipingClassDetailId == pipingClassDetailId);
if (pipingClassDetail != null)
{
db.Base_PipingClassDetail.DeleteOnSubmit(pipingClassDetail);
db.SubmitChanges();
}
}
}
}
@@ -0,0 +1,104 @@
namespace BLL
{
using Model;
using System.Collections.Generic;
using System.Linq;
public static class Base_PipingClassService
{
/// <summary>
///获取管道等级信息
/// </summary>
/// <returns></returns>
public static Model.Base_PipingClass GetPipingClassByPipingClassId(string pipingClassId)
{
return Funs.DB.Base_PipingClass.FirstOrDefault(e => e.PipingClassId == pipingClassId);
}
/// <summary>
/// 增加管道等级信息
/// </summary>
/// <param name="PipingClass"></param>
public static void AddPipingClass(Model.Base_PipingClass pipingClass)
{
Model.HJGLDB db = Funs.DB;
Model.Base_PipingClass newPipingClass = new Base_PipingClass
{
PipingClassId = pipingClass.PipingClassId,
PipingClassCode = pipingClass.PipingClassCode,
PipingClassName = pipingClass.PipingClassName,
Remark = pipingClass.Remark,
PNO = pipingClass.PNO,
};
db.Base_PipingClass.InsertOnSubmit(newPipingClass);
db.SubmitChanges();
}
/// <summary>
/// 修改管道等级信息
/// </summary>
/// <param name="pipingClass"></param>
public static void UpdatePipingClass(Model.Base_PipingClass pipingClass)
{
Model.HJGLDB db = Funs.DB;
Model.Base_PipingClass newPipingClass = db.Base_PipingClass.FirstOrDefault(e => e.PipingClassId == pipingClass.PipingClassId);
if (newPipingClass != null)
{
newPipingClass.PipingClassCode = pipingClass.PipingClassCode;
newPipingClass.PipingClassName = pipingClass.PipingClassName;
newPipingClass.Remark = pipingClass.Remark;
newPipingClass.PNO = pipingClass.PNO;
db.SubmitChanges();
}
}
/// <summary>
/// 根据管道等级Id删除一个管道等级信息
/// </summary>
/// <param name="pipingClassId"></param>
public static void DeletePipingClassByPipingClassId(string pipingClassId)
{
Model.HJGLDB db = Funs.DB;
Model.Base_PipingClass delPipingClass = db.Base_PipingClass.FirstOrDefault(e => e.PipingClassId == pipingClassId);
if (delPipingClass != null)
{
db.Base_PipingClass.DeleteOnSubmit(delPipingClass);
db.SubmitChanges();
}
}
/// <summary>
/// 按类型获取管道等级项
/// </summary>
/// <param name="PipingClassType"></param>
/// <returns></returns>
public static List<Model.Base_PipingClass> GetPipingClassList()
{
var list = (from x in Funs.DB.Base_PipingClass
orderby x.PipingClassCode
select x).ToList();
return list;
}
#region
/// <summary>
/// 管道等级下拉项
/// </summary>
/// <param name="dropName">下拉框名称</param>
/// <param name="isShowPlease">是否显示请选择</param>
/// <param name="PipingClassType">耗材类型</param>
public static void InitPipingClassDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease,string itemText)
{
dropName.DataValueField = "PipingClassId";
dropName.DataTextField = "PipingClassCode";
dropName.DataSource = GetPipingClassList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName,itemText);
}
}
#endregion
}
}
@@ -0,0 +1,102 @@
using Model;
using System.Collections.Generic;
using System.Linq;
namespace BLL
{
public static class Base_PressureService
{
/// <summary>
///获取试压类型信息
/// </summary>
/// <returns></returns>
public static Model.Base_Pressure GetPressureByPressureId(string pressureId)
{
return Funs.DB.Base_Pressure.FirstOrDefault(e => e.PressureId == pressureId);
}
/// <summary>
/// 增加试压类型信息
/// </summary>
/// <param name="pressure"></param>
public static void AddPressure(Model.Base_Pressure pressure)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Pressure newPressure = new Base_Pressure
{
PressureId = pressure.PressureId,
PressureCode = pressure.PressureCode,
PressureName = pressure.PressureName,
Remark = pressure.Remark,
};
db.Base_Pressure.InsertOnSubmit(newPressure);
db.SubmitChanges();
}
/// <summary>
/// 修改试压类型信息
/// </summary>
/// <param name="pressure"></param>
public static void UpdatePressure(Model.Base_Pressure pressure)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Pressure newPressure = db.Base_Pressure.FirstOrDefault(e => e.PressureId == pressure.PressureId);
if (newPressure != null)
{
newPressure.PressureCode = pressure.PressureCode;
newPressure.PressureName = pressure.PressureName;
newPressure.Remark = pressure.Remark;
db.SubmitChanges();
}
}
/// <summary>
/// 根据试压类型Id删除一个试压类型信息
/// </summary>
/// <param name="pressureId"></param>
public static void DeletePressureByPressureId(string pressureId)
{
Model.HJGLDB db = Funs.DB;
Model.Base_Pressure delPressure = db.Base_Pressure.FirstOrDefault(e => e.PressureId == pressureId);
if (delPressure != null)
{
db.Base_Pressure.DeleteOnSubmit(delPressure);
db.SubmitChanges();
}
}
/// <summary>
/// 按类型获取试压类型项
/// </summary>
/// <param name="PressureType"></param>
/// <returns></returns>
public static List<Model.Base_Pressure> GetPressureList()
{
var list = (from x in Funs.DB.Base_Pressure
orderby x.PressureCode
select x).ToList();
return list;
}
#region
/// <summary>
/// 试压类型下拉项
/// </summary>
/// <param name="dropName">下拉框名称</param>
/// <param name="isShowPlease">是否显示请选择</param>
/// <param name="PressureType">耗材类型</param>
public static void InitPressureDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease, string itemText)
{
dropName.DataValueField = "PressureId";
dropName.DataTextField = "PressureName";
dropName.DataSource = GetPressureList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName,itemText);
}
}
#endregion
}
}
@@ -0,0 +1,104 @@
namespace BLL
{
using Model;
using System.Collections.Generic;
using System.Linq;
public static class Base_WeldTypeService
{
/// <summary>
///获取焊缝类型信息
/// </summary>
/// <returns></returns>
public static Model.Base_WeldType GetWeldTypeByWeldTypeId(string weldTypeId)
{
return Funs.DB.Base_WeldType.FirstOrDefault(e => e.WeldTypeId == weldTypeId);
}
/// <summary>
/// 增加焊缝类型信息
/// </summary>
/// <param name="weldType"></param>
public static void AddWeldType(Model.Base_WeldType weldType)
{
Model.HJGLDB db = Funs.DB;
Model.Base_WeldType newWeldType = new Base_WeldType
{
WeldTypeId = weldType.WeldTypeId,
WeldTypeCode = weldType.WeldTypeCode,
WeldTypeName = weldType.WeldTypeName,
Flag = weldType.Flag,
Remark = weldType.Remark,
};
db.Base_WeldType.InsertOnSubmit(newWeldType);
db.SubmitChanges();
}
/// <summary>
/// 修改焊缝类型信息
/// </summary>
/// <param name="weldType"></param>
public static void UpdateWeldType(Model.Base_WeldType weldType)
{
Model.HJGLDB db = Funs.DB;
Model.Base_WeldType newWeldType = db.Base_WeldType.FirstOrDefault(e => e.WeldTypeId == weldType.WeldTypeId);
if (newWeldType != null)
{
newWeldType.WeldTypeCode = weldType.WeldTypeCode;
newWeldType.WeldTypeName = weldType.WeldTypeName;
newWeldType.Flag = weldType.Flag;
newWeldType.Remark = weldType.Remark;
db.SubmitChanges();
}
}
/// <summary>
/// 根据焊缝类型Id删除一个焊缝类型信息
/// </summary>
/// <param name="weldTypeId"></param>
public static void DeleteWeldTypeByWeldTypeId(string weldTypeId)
{
Model.HJGLDB db = Funs.DB;
Model.Base_WeldType delWeldType = db.Base_WeldType.FirstOrDefault(e => e.WeldTypeId == weldTypeId);
if (delWeldType != null)
{
db.Base_WeldType.DeleteOnSubmit(delWeldType);
db.SubmitChanges();
}
}
/// <summary>
/// 按类型获取焊缝类型项
/// </summary>
/// <param name="WeldTypeType"></param>
/// <returns></returns>
public static List<Model.Base_WeldType> GetWeldTypeList()
{
var list = (from x in Funs.DB.Base_WeldType
orderby x.WeldTypeCode
select x).ToList();
return list;
}
#region
/// <summary>
/// 焊缝类型下拉项
/// </summary>
/// <param name="dropName">下拉框名称</param>
/// <param name="isShowPlease">是否显示请选择</param>
/// <param name="WeldTypeType">耗材类型</param>
public static void InitWeldTypeDropDownList(FineUIPro.DropDownList dropName,string itemText, bool isShowPlease)
{
dropName.DataValueField = "WeldTypeId";
dropName.DataTextField = "WeldTypeCode";
dropName.DataSource = GetWeldTypeList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName, itemText);
}
}
#endregion
}
}
@@ -0,0 +1,94 @@
using System.Collections.Generic;
using System.Linq;
namespace BLL
{
/// <summary>
/// 焊接位置
/// </summary>
public static class Base_WeldingLocationServie
{
/// <summary>
/// 根据主键获取焊接位置信息
/// </summary>
/// <param name="weldingLocationId"></param>
/// <returns></returns>
public static Model.Base_WeldingLocation GetWeldingLocationById(string weldingLocationId)
{
return Funs.DB.Base_WeldingLocation.FirstOrDefault(e => e.WeldingLocationId == weldingLocationId);
}
/// <summary>
/// 增加焊接位置
/// </summary>
/// <param name="weldingLocation"></param>
public static void AddWeldingLocation(Model.Base_WeldingLocation weldingLocation)
{
Model.HJGLDB db = Funs.DB;
Model.Base_WeldingLocation newWeldingLocation = new Model.Base_WeldingLocation();
newWeldingLocation.WeldingLocationId = weldingLocation.WeldingLocationId;
newWeldingLocation.WeldingLocationCode = weldingLocation.WeldingLocationCode;
newWeldingLocation.Remark = weldingLocation.Remark;
db.Base_WeldingLocation.InsertOnSubmit(weldingLocation);
db.SubmitChanges();
}
/// <summary>
/// 修改焊接位置
/// </summary>
/// <param name="weldingLocation"></param>
public static void UpdateWeldingLocation(Model.Base_WeldingLocation weldingLocation)
{
Model.HJGLDB db = Funs.DB;
Model.Base_WeldingLocation newWeldingLocation = db.Base_WeldingLocation.FirstOrDefault(e => e.WeldingLocationId == weldingLocation.WeldingLocationId);
if (newWeldingLocation != null)
{
newWeldingLocation.WeldingLocationCode = weldingLocation.WeldingLocationCode;
newWeldingLocation.Remark = weldingLocation.Remark;
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除焊接位置
/// </summary>
/// <param name="weldingLocationId"></param>
public static void DeleteWeldingLocationById(string weldingLocationId)
{
Model.HJGLDB db = Funs.DB;
Model.Base_WeldingLocation weldingLocation = db.Base_WeldingLocation.FirstOrDefault(e => e.WeldingLocationId == weldingLocationId);
if (weldingLocation != null)
{
db.Base_WeldingLocation.DeleteOnSubmit(weldingLocation);
db.SubmitChanges();
}
}
/// <summary>
/// 获取焊接位置列表
/// </summary>
/// <returns></returns>
public static List<Model.Base_WeldingLocation> GetWeldingLocationList()
{
return (from x in Funs.DB.Base_WeldingLocation orderby x.WeldingLocationCode select x).ToList();
}
/// <summary>
/// 获取下拉列表选择项
/// </summary>
/// <param name="dropName"></param>
/// <param name="isShowPlease"></param>
/// <param name="itemText"></param>
public static void InitWeldingLocationDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease, string itemText)
{
dropName.DataValueField = "WeldingLocationId";
dropName.DataTextField = "WeldingLocationCode";
dropName.DataSource = GetWeldingLocationList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName, itemText);
}
}
}
}
@@ -0,0 +1,104 @@
namespace BLL
{
using Model;
using System.Collections.Generic;
using System.Linq;
public static class Base_WeldingMethodService
{
/// <summary>
///获取焊接方法信息
/// </summary>
/// <returns></returns>
public static Model.Base_WeldingMethod GetWeldingMethodByWeldingMethodId(string weldingMethodId)
{
return Funs.DB.Base_WeldingMethod.FirstOrDefault(e => e.WeldingMethodId == weldingMethodId);
}
/// <summary>
/// 增加焊接方法信息
/// </summary>
/// <param name="weldingMethod"></param>
public static void AddWeldingMethod(Model.Base_WeldingMethod weldingMethod)
{
Model.HJGLDB db = Funs.DB;
Model.Base_WeldingMethod newWeldingMethod = new Base_WeldingMethod
{
WeldingMethodId = weldingMethod.WeldingMethodId,
WeldingMethodCode = weldingMethod.WeldingMethodCode,
WeldingMethodName = weldingMethod.WeldingMethodName,
Remark = weldingMethod.Remark,
ConsumablesType=weldingMethod.ConsumablesType,
};
db.Base_WeldingMethod.InsertOnSubmit(newWeldingMethod);
db.SubmitChanges();
}
/// <summary>
/// 修改焊接方法信息
/// </summary>
/// <param name="weldingMethod"></param>
public static void UpdateWeldingMethod(Model.Base_WeldingMethod weldingMethod)
{
Model.HJGLDB db = Funs.DB;
Model.Base_WeldingMethod newWeldingMethod = db.Base_WeldingMethod.FirstOrDefault(e => e.WeldingMethodId == weldingMethod.WeldingMethodId);
if (newWeldingMethod != null)
{
newWeldingMethod.WeldingMethodCode = weldingMethod.WeldingMethodCode;
newWeldingMethod.WeldingMethodName = weldingMethod.WeldingMethodName;
newWeldingMethod.Remark = weldingMethod.Remark;
newWeldingMethod.ConsumablesType = weldingMethod.ConsumablesType;
db.SubmitChanges();
}
}
/// <summary>
/// 根据焊接方法Id删除一个焊接方法信息
/// </summary>
/// <param name="weldingMethodId"></param>
public static void DeleteWeldingMethodByWeldingMethodId(string weldingMethodId)
{
Model.HJGLDB db = Funs.DB;
Model.Base_WeldingMethod delWeldingMethod = db.Base_WeldingMethod.FirstOrDefault(e => e.WeldingMethodId == weldingMethodId);
if (delWeldingMethod != null)
{
db.Base_WeldingMethod.DeleteOnSubmit(delWeldingMethod);
db.SubmitChanges();
}
}
/// <summary>
/// 按类型获取焊接方法项
/// </summary>
/// <param name="WeldingMethodType"></param>
/// <returns></returns>
public static List<Model.Base_WeldingMethod> GetWeldingMethodList()
{
var list = (from x in Funs.DB.Base_WeldingMethod
orderby x.WeldingMethodCode
select x).ToList();
return list;
}
#region
/// <summary>
/// 焊接方法下拉项
/// </summary>
/// <param name="dropName">下拉框名称</param>
/// <param name="isShowPlease">是否显示请选择</param>
/// <param name="WeldingMethodType">耗材类型</param>
public static void InitWeldingMethodDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease,string itemText)
{
dropName.DataValueField = "WeldingMethodId";
dropName.DataTextField = "WeldingMethodCode";
dropName.DataSource = GetWeldingMethodList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName,itemText);
}
}
#endregion
}
}