/// /// <param name="newEquipmentPlan"></param> public EquipmentPlan UpdateEquipmentPlan(EquipmentPlan updateEquipmentPlan) { EquipmentPlan returnEquipment = null; try { _equipmentPlanDal.Update(updateEquipmentPlan); returnEquipment = updateEquipmentPlan; } catch (RepositoryException ex) { throw ex; } return(returnEquipment); }
/// /// <param name="newEquipmentPlan"></param> public EquipmentPlan CreateEquipmentPlan(EquipmentPlan newEquipmentPlan, string billNoSystem, string billNoPrefix) { EquipmentPlan returnEquipmentPlan = null; try { //设备维护单号 int billNoID = _sysBillNoService.GetBillNoID(billNoSystem, billNoPrefix); if (billNoID > 0) { newEquipmentPlan.equipment_plan_number = _sysBillNoService.GetBillNo(billNoID); } _unitOfWork.AddAction(newEquipmentPlan, DataActions.Add); _unitOfWork.Save(); returnEquipmentPlan = newEquipmentPlan; } catch (RepositoryException ex) { throw ex; } return(returnEquipmentPlan); }