提交代码
This commit is contained in:
@@ -165,6 +165,7 @@
|
||||
<Compile Include="BaseInfo\SteelService.cs" />
|
||||
<Compile Include="BaseInfo\TrainLevelService.cs" />
|
||||
<Compile Include="BaseInfo\TrainTypeService.cs" />
|
||||
<Compile Include="BaseInfo\TransferMajorService.cs" />
|
||||
<Compile Include="BaseInfo\UnitTypeService.cs" />
|
||||
<Compile Include="BaseInfo\WorkPostService.cs" />
|
||||
<Compile Include="BaseInfo\WorkStageService.cs" />
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 移交专业
|
||||
/// </summary>
|
||||
public static class TransferMajorService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取移交专业
|
||||
/// </summary>
|
||||
/// <param name="TransferMajorId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Base_TransferMajor GetTransferMajorById(string TransferMajorId)
|
||||
{
|
||||
return Funs.DB.Base_TransferMajor.FirstOrDefault(e => e.TransferMajorId == TransferMajorId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加移交专业
|
||||
/// </summary>
|
||||
/// <param name="TransferMajor"></param>
|
||||
public static void AddTransferMajor(Model.Base_TransferMajor TransferMajor)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Base_TransferMajor newTransferMajor = new Model.Base_TransferMajor
|
||||
{
|
||||
TransferMajorId = TransferMajor.TransferMajorId,
|
||||
Discipline = TransferMajor.Discipline,
|
||||
Major = TransferMajor.Major,
|
||||
DisciplineCode = TransferMajor.DisciplineCode,
|
||||
Remark = TransferMajor.Remark
|
||||
};
|
||||
db.Base_TransferMajor.InsertOnSubmit(newTransferMajor);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改移交专业
|
||||
/// </summary>
|
||||
/// <param name="TransferMajor"></param>
|
||||
public static void UpdateTransferMajor(Model.Base_TransferMajor TransferMajor)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Base_TransferMajor newTransferMajor = db.Base_TransferMajor.FirstOrDefault(e => e.TransferMajorId == TransferMajor.TransferMajorId);
|
||||
if (newTransferMajor != null)
|
||||
{
|
||||
newTransferMajor.Discipline = TransferMajor.Discipline;
|
||||
newTransferMajor.Major = TransferMajor.Major;
|
||||
newTransferMajor.DisciplineCode = TransferMajor.DisciplineCode;
|
||||
newTransferMajor.Remark = TransferMajor.Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除移交专业
|
||||
/// </summary>
|
||||
/// <param name="TransferMajorId"></param>
|
||||
public static void DeleteTransferMajorById(string TransferMajorId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Base_TransferMajor TransferMajor = db.Base_TransferMajor.FirstOrDefault(e => e.TransferMajorId == TransferMajorId);
|
||||
if (TransferMajor != null)
|
||||
{
|
||||
db.Base_TransferMajor.DeleteOnSubmit(TransferMajor);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取移交专业下拉列表项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_TransferMajor> GetTransferMajorList()
|
||||
{
|
||||
return (from x in Funs.DB.Base_TransferMajor orderby x.DisciplineCode select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1026,6 +1026,10 @@ namespace BLL
|
||||
/// 风险等级
|
||||
/// </summary>
|
||||
public const string RiskLevelMenuId = "E4B526CC-805E-4131-8E18-2FFA6871507E";
|
||||
/// <summary>
|
||||
/// 移交专业
|
||||
/// </summary>
|
||||
public const string TransferMajorMenuId = "D0850615-BF32-4CFA-84CA-EEA261676EA8";
|
||||
#endregion
|
||||
|
||||
#region 质量基础信息
|
||||
|
||||
Reference in New Issue
Block a user