Пример #1
0
 /// <summary>
 /// 根据主键删除一般机具设备入场报批明细
 /// </summary>
 /// <param name="GeneralEquipmentInItemId"></param>
 public static void DeleteGeneralEquipmentInItemById(string generalEquipmentInItemId)
 {
     Model.SUBHSSEDB db = Funs.DB;
     Model.InApproveManager_GeneralEquipmentInItem generalEquipmentInItem = db.InApproveManager_GeneralEquipmentInItem.FirstOrDefault(e => e.GeneralEquipmentInItemId == generalEquipmentInItemId);
     if (generalEquipmentInItem != null)
     {
         db.InApproveManager_GeneralEquipmentInItem.DeleteOnSubmit(generalEquipmentInItem);
         db.SubmitChanges();
     }
 }
Пример #2
0
 /// <summary>
 /// 修改一般机具设备入场报批明细
 /// </summary>
 /// <param name="GeneralEquipmentInItem"></param>
 public static void UpdateGeneralEquipmentInItem(Model.InApproveManager_GeneralEquipmentInItem generalEquipmentInItem)
 {
     Model.SUBHSSEDB db = Funs.DB;
     Model.InApproveManager_GeneralEquipmentInItem newGeneralEquipmentInItem = db.InApproveManager_GeneralEquipmentInItem.FirstOrDefault(e => e.GeneralEquipmentInItemId == generalEquipmentInItem.GeneralEquipmentInItemId);
     if (newGeneralEquipmentInItem != null)
     {
         newGeneralEquipmentInItem.GeneralEquipmentInId = generalEquipmentInItem.GeneralEquipmentInId;
         newGeneralEquipmentInItem.SpecialEquipmentId   = generalEquipmentInItem.SpecialEquipmentId;
         newGeneralEquipmentInItem.SizeModel            = generalEquipmentInItem.SizeModel;
         newGeneralEquipmentInItem.OwnerCheck           = generalEquipmentInItem.OwnerCheck;
         newGeneralEquipmentInItem.CertificateNum       = generalEquipmentInItem.CertificateNum;
         db.SubmitChanges();
     }
 }
Пример #3
0
 /// <summary>
 /// 添加一般机具设备入场报批明细
 /// </summary>
 /// <param name="GeneralEquipmentInItem"></param>
 public static void AddGeneralEquipmentInItem(Model.InApproveManager_GeneralEquipmentInItem generalEquipmentInItem)
 {
     Model.SUBHSSEDB db = Funs.DB;
     Model.InApproveManager_GeneralEquipmentInItem newEquipmentItem = new Model.InApproveManager_GeneralEquipmentInItem
     {
         GeneralEquipmentInItemId = generalEquipmentInItem.GeneralEquipmentInItemId,
         GeneralEquipmentInId     = generalEquipmentInItem.GeneralEquipmentInId,
         SpecialEquipmentId       = generalEquipmentInItem.SpecialEquipmentId,
         SizeModel      = generalEquipmentInItem.SizeModel,
         OwnerCheck     = generalEquipmentInItem.OwnerCheck,
         CertificateNum = generalEquipmentInItem.CertificateNum
     };
     db.InApproveManager_GeneralEquipmentInItem.InsertOnSubmit(newEquipmentItem);
     db.SubmitChanges();
 }