86 lines
		
	
	
		
			4.4 KiB
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			86 lines
		
	
	
		
			4.4 KiB
		
	
	
	
		
			C#
		
	
	
	
|  | using System.Collections.Generic; | |||
|  | using System.Linq; | |||
|  | using System.Web.UI.WebControls; | |||
|  | 
 | |||
|  | namespace BLL | |||
|  | { | |||
|  |     public class QCManage_QCGroupRegistrationService | |||
|  |     { | |||
|  |         /// <summary> | |||
|  |         /// 获取QC管理-QC小组注册信息 | |||
|  |         /// </summary> | |||
|  |         /// <param name="UnitWorkId"></param> | |||
|  |         /// <returns></returns> | |||
|  |         public static Model.QCManage_QCGroupRegistration GetQCGroupRegistrationByQCGroupRegistrationId(string QCGroupRegistrationId) | |||
|  |         { | |||
|  |             return Funs.DB.QCManage_QCGroupRegistration.FirstOrDefault(e => e.QCGroupRegistrationId == QCGroupRegistrationId); | |||
|  |         } | |||
|  |         /// <summary> | |||
|  |         /// 添加QC管理-QC小组注册信息 | |||
|  |         /// </summary> | |||
|  |         /// <param name="WPQ"></param> | |||
|  |         public static void AddQCGroupRegistration(Model.QCManage_QCGroupRegistration QCGroupRegistration) | |||
|  |         { | |||
|  |             Model.SGGLDB db = Funs.DB; | |||
|  |             Model.QCManage_QCGroupRegistration newQCGroupRegistration = new Model.QCManage_QCGroupRegistration(); | |||
|  |             newQCGroupRegistration.QCGroupRegistrationId = QCGroupRegistration.QCGroupRegistrationId; | |||
|  |             newQCGroupRegistration.ProjectId = QCGroupRegistration.ProjectId; | |||
|  |             newQCGroupRegistration.Code = QCGroupRegistration.Code; | |||
|  |             newQCGroupRegistration.Name = QCGroupRegistration.Name; | |||
|  |             newQCGroupRegistration.CompileMan = QCGroupRegistration.CompileMan; | |||
|  |             newQCGroupRegistration.CompileDate = QCGroupRegistration.CompileDate; | |||
|  |             newQCGroupRegistration.UnitId = QCGroupRegistration.UnitId; | |||
|  |             newQCGroupRegistration.Subjects = QCGroupRegistration.Subjects; | |||
|  |             newQCGroupRegistration.Process = QCGroupRegistration.Process; | |||
|  |             newQCGroupRegistration.Achievement = QCGroupRegistration.Achievement; | |||
|  |             newQCGroupRegistration.AwardName = QCGroupRegistration.AwardName; | |||
|  |             newQCGroupRegistration.AwardLevel = QCGroupRegistration.AwardLevel; | |||
|  |             newQCGroupRegistration.AwardType = QCGroupRegistration.AwardType; | |||
|  |             newQCGroupRegistration.AwardingUnit = QCGroupRegistration.AwardingUnit; | |||
|  |             db.QCManage_QCGroupRegistration.InsertOnSubmit(newQCGroupRegistration); | |||
|  |             db.SubmitChanges(); | |||
|  |         } | |||
|  | 
 | |||
|  |         /// <summary> | |||
|  |         /// 修改QC管理-QC小组注册信息 | |||
|  |         /// </summary> | |||
|  |         /// <param name="WPQ"></param> | |||
|  |         public static void UpdateQCGroupRegistration(Model.QCManage_QCGroupRegistration QCGroupRegistration) | |||
|  |         { | |||
|  |             Model.SGGLDB db = Funs.DB; | |||
|  |             Model.QCManage_QCGroupRegistration newQCGroupRegistration = db.QCManage_QCGroupRegistration.FirstOrDefault(e => e.QCGroupRegistrationId == QCGroupRegistration.QCGroupRegistrationId); | |||
|  |             if (newQCGroupRegistration != null) | |||
|  |             { | |||
|  |                 newQCGroupRegistration.Code = QCGroupRegistration.Code; | |||
|  |                 newQCGroupRegistration.Name = QCGroupRegistration.Name; | |||
|  |                 newQCGroupRegistration.CompileMan = QCGroupRegistration.CompileMan; | |||
|  |                 newQCGroupRegistration.CompileDate = QCGroupRegistration.CompileDate; | |||
|  |                 newQCGroupRegistration.UnitId = QCGroupRegistration.UnitId; | |||
|  |                 newQCGroupRegistration.Subjects = QCGroupRegistration.Subjects; | |||
|  |                 newQCGroupRegistration.Process = QCGroupRegistration.Process; | |||
|  |                 newQCGroupRegistration.Achievement = QCGroupRegistration.Achievement; | |||
|  |                 newQCGroupRegistration.AwardName = QCGroupRegistration.AwardName; | |||
|  |                 newQCGroupRegistration.AwardLevel = QCGroupRegistration.AwardLevel; | |||
|  |                 newQCGroupRegistration.AwardType = QCGroupRegistration.AwardType; | |||
|  |                 newQCGroupRegistration.AwardingUnit = QCGroupRegistration.AwardingUnit; | |||
|  |                 newQCGroupRegistration.IsUpdate = null; | |||
|  |                 db.SubmitChanges(); | |||
|  |             } | |||
|  |         } | |||
|  |         /// <summary> | |||
|  |         /// 根据主键删除QC管理-QC小组注册信息 | |||
|  |         /// </summary> | |||
|  |         /// <param name="checkerId"></param> | |||
|  |         public static void DeleteQCGroupRegistrationById(string QCGroupRegistrationId) | |||
|  |         { | |||
|  |             Model.SGGLDB db = Funs.DB; | |||
|  |             Model.QCManage_QCGroupRegistration QCGroupRegistration = db.QCManage_QCGroupRegistration.FirstOrDefault(e => e.QCGroupRegistrationId == QCGroupRegistrationId); | |||
|  |             if (QCGroupRegistration != null) | |||
|  |             { | |||
|  |                 db.QCManage_QCGroupRegistration.DeleteOnSubmit(QCGroupRegistration); | |||
|  |                 db.SubmitChanges(); | |||
|  |             } | |||
|  |         } | |||
|  |     } | |||
|  | } |