示例#1
0
 /// <summary>
 /// 根据主键删除常见事故案例明细信息
 /// </summary>
 /// <param name="accidentCaseItemId">常见事故案例明细主键</param>
 public static void DeleteAccidentCaseItemId(string accidentCaseItemId)
 {
     Model.SUBHSSEDB db = Funs.DB;
     Model.EduTrain_AccidentCaseItem item = db.EduTrain_AccidentCaseItem.FirstOrDefault(e => e.AccidentCaseItemId == accidentCaseItemId);
     if (item != null)
     {
         db.EduTrain_AccidentCaseItem.DeleteOnSubmit(item);
         db.SubmitChanges();
     }
 }
示例#2
0
 /// <summary>
 /// 修改常见事故案例明细
 /// </summary>
 /// <param name="item"></param>
 public static void UpdateAccidentCaseItemIsPass(Model.EduTrain_AccidentCaseItem item)
 {
     Model.SUBHSSEDB db = Funs.DB;
     Model.EduTrain_AccidentCaseItem newItem = db.EduTrain_AccidentCaseItem.FirstOrDefault(e => e.AccidentCaseItemId == item.AccidentCaseItemId);
     if (newItem != null)
     {
         newItem.AuditMan  = item.AuditMan;
         newItem.AuditDate = item.AuditDate;
         newItem.IsPass    = item.IsPass;
         newItem.UpState   = item.UpState;
         db.SubmitChanges();
     }
 }
示例#3
0
 /// <summary>
 /// 修改常见事故案例明细信息
 /// </summary>
 /// <param name="item"></param>
 public static void UpdateAccidentCaseItem(Model.EduTrain_AccidentCaseItem item)
 {
     Model.SUBHSSEDB db = Funs.DB;
     Model.EduTrain_AccidentCaseItem newItem = db.EduTrain_AccidentCaseItem.FirstOrDefault(e => e.AccidentCaseItemId == item.AccidentCaseItemId);
     if (newItem != null)
     {
         newItem.Activities       = item.Activities;
         newItem.AccidentName     = item.AccidentName;
         newItem.AccidentProfiles = item.AccidentProfiles;
         newItem.AccidentReview   = item.AccidentReview;
         newItem.UpState          = item.UpState;
         db.SubmitChanges();
     }
 }
示例#4
0
 /// <summary>
 /// 增加常见事故案例明细信息
 /// </summary>
 /// <param name="item"></param>
 public static void AddAccidentCaseItem(Model.EduTrain_AccidentCaseItem item)
 {
     Model.SUBHSSEDB db = Funs.DB;
     Model.EduTrain_AccidentCaseItem newItem = new Model.EduTrain_AccidentCaseItem
     {
         AccidentCaseItemId = item.AccidentCaseItemId,
         AccidentCaseId     = item.AccidentCaseId,
         Activities         = item.Activities,
         AccidentName       = item.AccidentName,
         AccidentProfiles   = item.AccidentProfiles,
         AccidentReview     = item.AccidentReview,
         CompileMan         = item.CompileMan,
         CompileDate        = item.CompileDate,
         IsPass             = item.IsPass,
         UnitId             = item.UnitId,
         UpState            = item.UpState
     };
     db.EduTrain_AccidentCaseItem.InsertOnSubmit(newItem);
     db.SubmitChanges();
 }