/// <summary> /// 修改培训教材 是否采用 /// </summary> /// <param name="trainingItem"></param> public static void UpdateTrainingItemIsPass(Model.Training_TrainingItem trainingItem) { Model.SUBHSSEDB db = Funs.DB; Model.Training_TrainingItem newTrainingItem = db.Training_TrainingItem.FirstOrDefault(e => e.TrainingItemId == trainingItem.TrainingItemId); if (newTrainingItem != null) { newTrainingItem.AuditMan = trainingItem.AuditMan; newTrainingItem.AuditDate = trainingItem.AuditDate; newTrainingItem.IsPass = trainingItem.IsPass; newTrainingItem.UpState = trainingItem.UpState; db.SubmitChanges(); } }
/// <summary> /// 修改教育培训内容 /// </summary> /// <param name="trainingItem">教育培训内容实体</param> public static void UpdateTrainingItem(Model.Training_TrainingItem trainingItem) { Model.SUBHSSEDB db = Funs.DB; Model.Training_TrainingItem newTrainingItem = db.Training_TrainingItem.FirstOrDefault(e => e.TrainingItemId == trainingItem.TrainingItemId); if (newTrainingItem != null) { newTrainingItem.TrainingId = trainingItem.TrainingId; newTrainingItem.TrainingItemCode = trainingItem.TrainingItemCode; newTrainingItem.TrainingItemName = trainingItem.TrainingItemName; newTrainingItem.AttachUrl = trainingItem.AttachUrl; //newTrainingItem.CompileMan = trainingItem.CompileMan; //newTrainingItem.CompileDate = trainingItem.CompileDate; newTrainingItem.ApproveState = trainingItem.ApproveState; newTrainingItem.VersionNum = trainingItem.VersionNum; newTrainingItem.ResourcesFrom = trainingItem.ResourcesFrom; newTrainingItem.ResourcesFromType = trainingItem.ResourcesFromType; newTrainingItem.UpState = trainingItem.UpState; db.SubmitChanges(); } }
/// <summary> /// 增加教育培训内容信息 /// </summary> /// <param name="trainingItem">教育培训内容实体</param> public static void AddTrainingItem(Model.Training_TrainingItem trainingItem) { Model.SUBHSSEDB db = Funs.DB; Model.Training_TrainingItem newTrainingItem = new Model.Training_TrainingItem { TrainingItemId = trainingItem.TrainingItemId, TrainingId = trainingItem.TrainingId, TrainingItemCode = trainingItem.TrainingItemCode, TrainingItemName = trainingItem.TrainingItemName, AttachUrl = trainingItem.AttachUrl, CompileMan = trainingItem.CompileMan, CompileDate = trainingItem.CompileDate, ApproveState = trainingItem.ApproveState, VersionNum = trainingItem.VersionNum, ResourcesFrom = trainingItem.ResourcesFrom, ResourcesFromType = trainingItem.ResourcesFromType, IsPass = trainingItem.IsPass, UnitId = trainingItem.UnitId, UpState = trainingItem.UpState }; db.Training_TrainingItem.InsertOnSubmit(newTrainingItem); db.SubmitChanges(); }