修改质量会议及培训

This commit is contained in:
2022-09-12 14:58:35 +08:00
parent a2fd7be5ef
commit 6908efcf2c
25 changed files with 1028 additions and 103 deletions
+2 -1
View File
@@ -55,7 +55,7 @@
<HintPath>..\packages\EmitMapper.1.0.0\lib\EmitMapper.dll</HintPath>
</Reference>
<Reference Include="FineUIPro">
<HintPath>..\FineUIPro\FineUIPro.dll</HintPath>
<HintPath>..\FineUIPro\Reference BLL\FineUIPro.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.3.11, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
@@ -169,6 +169,7 @@
<Compile Include="BaseInfo\CompanyModelService.cs" />
<Compile Include="BaseInfo\ConstructionTestTypeService.cs" />
<Compile Include="BaseInfo\CostTypeService.cs" />
<Compile Include="BaseInfo\CQMSTrainObjectService.cs" />
<Compile Include="BaseInfo\CQMSTrainTypeService.cs" />
<Compile Include="BaseInfo\DesignProfessionalService.cs" />
<Compile Include="BaseInfo\EmergencyTypeService.cs" />
+117
View File
@@ -0,0 +1,117 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public static class CQMSTrainObjectService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据主键获取培训对象
/// </summary>
/// <param name="trainObjectId"></param>
/// <returns></returns>
public static Model.Base_CQMSTrainObject GetTrainObjectById(string trainObjectId)
{
return Funs.DB.Base_CQMSTrainObject.FirstOrDefault(e => e.TrainObjectId == trainObjectId);
}
/// <summary>
/// 根据主键获取培训对象
/// </summary>
/// <param name="trainObjectId"></param>
/// <returns></returns>
public static string GetTrainObjectNameById(string trainObjectId)
{
string name = string.Empty;
var o= Funs.DB.Base_CQMSTrainObject.FirstOrDefault(e => e.TrainObjectId == trainObjectId);
if (o != null)
{
name = o.TrainObjectName;
}
return name;
}
/// <summary>
/// 添加培训对象
/// </summary>
/// <param name="trainObject"></param>
public static void AddTrainObject(Model.Base_CQMSTrainObject trainObject)
{
Model.SGGLDB db = Funs.DB;
Model.Base_CQMSTrainObject newTrainObject = new Model.Base_CQMSTrainObject
{
TrainObjectId = trainObject.TrainObjectId,
TrainObjectCode = trainObject.TrainObjectCode,
TrainObjectName = trainObject.TrainObjectName,
Remark = trainObject.Remark,
};
db.Base_CQMSTrainObject.InsertOnSubmit(newTrainObject);
db.SubmitChanges();
}
/// <summary>
/// 修改培训对象
/// </summary>
/// <param name="trainObject"></param>
public static void UpdateTrainObject(Model.Base_CQMSTrainObject trainObject)
{
Model.SGGLDB db = Funs.DB;
Model.Base_CQMSTrainObject newTrainObject = db.Base_CQMSTrainObject.FirstOrDefault(e => e.TrainObjectId == trainObject.TrainObjectId);
if (newTrainObject != null)
{
newTrainObject.TrainObjectCode = trainObject.TrainObjectCode;
newTrainObject.TrainObjectName = trainObject.TrainObjectName;
newTrainObject.Remark = trainObject.Remark;
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除培训对象
/// </summary>
/// <param name="trainObjectId"></param>
public static void DeleteTrainObjectById(string trainObjectId)
{
Model.SGGLDB db = Funs.DB;
Model.Base_CQMSTrainObject trainObject = db.Base_CQMSTrainObject.FirstOrDefault(e => e.TrainObjectId == trainObjectId);
if (trainObject != null)
{
db.Base_CQMSTrainObject.DeleteOnSubmit(trainObject);
db.SubmitChanges();
}
}
/// <summary>
/// 获取培训对象列表
/// </summary>
/// <returns></returns>
public static List<Model.Base_CQMSTrainObject> GetTrainObjectList()
{
return (from x in Funs.DB.Base_CQMSTrainObject orderby x.TrainObjectCode select x).ToList();
}
#region
/// <summary>
/// 培训对象下拉框
/// </summary>
/// <param name="dropName">下拉框名字</param>
/// <param name="isShowPlease">是否显示请选择</param>
public static void InitTrainObjectDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
{
dropName.DataValueField = "TrainObjectId";
dropName.DataTextField = "TrainObjectName";
dropName.DataSource = GetTrainObjectList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
#endregion
}
}
+5
View File
@@ -1015,6 +1015,11 @@
/// </summary>
public const string CQMSTrainTypeMenuId = "164CDCED-E794-4177-AADE-23CA8E1AA1B8";
/// <summary>
/// 培训对象
/// </summary>
public const string CQMSTrainObjectMenuId = "D2027C3D-ECE9-445E-8DBE-AF0DA10005FC";
/// <summary>
/// 奖励定义
/// </summary>