You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AUCMA_SCADA/Admin.Core.Service/Service_New/RecordElectricalinspectionS...

42 lines
1.2 KiB
C#

using Admin.Core.IRepository;
using Admin.Core.IService;
using Admin.Core.Model;
using log4net;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Admin.Core.Service
{
internal class RecordElectricalinspectionServices : BaseServices<RecordElectricalinspection>, IRecordElectricalinspectionService
{
private IBaseRepository<RecordElectricalinspection> _dal;
private static readonly log4net.ILog _logger = LogManager.GetLogger(typeof(RecordElectricalinspectionServices));
public RecordElectricalinspectionServices(IBaseRepository<RecordElectricalinspection> dal)
{
this._dal = dal;
base.BaseDal = dal;
}
public bool InsertRecordElectricalinspection(RecordElectricalinspection electricalinspection)
{
bool result = false;
try
{
var r = _dal.AddAsync(electricalinspection).Result;
if (r >0) { result = true; }
}catch(Exception ex)
{
_logger.Error($"电检数据保存异常:{ex.Message}");
}
return result;
}
}
}