• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Entities.FailureAnalysisEntities类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中FASTrack.Model.Entities.FailureAnalysisEntities的典型用法代码示例。如果您正苦于以下问题:C# FailureAnalysisEntities类的具体用法?C# FailureAnalysisEntities怎么用?C# FailureAnalysisEntities使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FailureAnalysisEntities类属于FASTrack.Model.Entities命名空间,在下文中一共展示了FailureAnalysisEntities类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SingleAsync

 /// <summary>
 /// Finds the asynchronous.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public async Task<FARUploadDto> SingleAsync(int id)
 {
     FARUploadDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = await (from item in context.LOG_FARUpload
                             where item.Id == id
                             select new FARUploadDto()
                             {
                                 Id = item.Id,
                                 MasterId = item.MasterId,
                                 FAType = item.FAType,
                                 FileName = item.FileName,
                                 ReasonId = item.ReasonId,
                                 UploadedDate = item.UploadedDate,
                                 UploadedBy = item.UploadedBy
                             }).SingleAsync();
         }
     }
     catch (Exception ex)
     {
         _logService.Error(ex.Message, ex);
         result = null;
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:33,代码来源:FARUploadRepository.cs


示例2: SingleAsync

 /// <summary>
 /// Finds the asynchronous.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public async Task<MSTServiceDto> SingleAsync(int id)
 {
     MSTServiceDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = await (from item in context.MST_Services
                             where item.IsDeleted == false && item.Id == id
                             select new MSTServiceDto()
                             {
                                 Id = item.Id,
                                 Name = item.Name,
                                 Description = item.Description,
                                 IsDeleted = item.IsDeleted,
                                 LastUpdatedBy = item.LastUpdatedBy,
                                 LastUpdate = item.LastUpdate,
                             }).SingleAsync();
         }
     }
     catch (Exception ex)
     {
         _logService.Error(ex.Message, ex);
         result = null;
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:32,代码来源:MSTServiceRepository.cs


示例3: Single

 /// <summary>
 /// Finds the specified identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public FARAnalystReassignLogDto Single(int id)
 {
     FARAnalystReassignLogDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = (from item in context.LOG_FARAnalystReassign
                       where item.IsDeleted == false && item.Id == id
                       select new FARAnalystReassignLogDto()
                       {
                           Id = item.Id,
                           MasterId = item.MasterId,
                           AnalystFrom = item.AnalystFrom,
                           AnalystTo = item.AnalystTo,
                           UpdatedDate = item.UpdatedDate,
                           IsDeleted = item.IsDeleted,
                           LastUpdatedBy = item.LastUpdatedBy,
                           LastUpdate = item.LastUpdate,
                       }).Single();
         }
     }
     catch (Exception ex)
     {
         _logService.Error(ex.Message, ex);
         result = null;
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:34,代码来源:FARAnalystReassignLogRepository.cs


示例4: Single

 /// <summary>
 /// Finds the specified identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public FARMechanismDto Single(int id)
 {
     FARMechanismDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = (from item in context.FAR_Mechanism
                       where item.IsDeleted == false && item.Id == id
                       select new FARMechanismDto()
                       {
                           Id = item.Id,
                           Name = item.Name,
                           Description = item.Description,
                           IsDeleted = item.IsDeleted,
                           LastUpdatedBy = item.LastUpdatedBy,
                           LastUpdate = item.LastUpdate,
                       }).Single();
         }
     }
     catch (Exception ex)
     {
         _logService.Error(ex.Message, ex);
         result = null;
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:32,代码来源:FARMechanismRepository.cs


示例5: Single

 /// <summary>
 /// Finds the specified identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public SitesDto Single(int id)
 {
     SitesDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = (from item in context.MST_Sites
                       where item.IsDeleted == false && item.Id == id
                       select new SitesDto()
                       {
                           Id = item.Id,
                           Name = item.Name,
                           Address1 = item.Address1,
                           Address2 = item.Address2,
                           Phone = item.Phone,
                           Description = item.Description,
                           IsDeleted = item.IsDeleted,
                           LastUpdatedBy = item.LastUpdatedBy,
                           LastUpdate = item.LastUpdate,
                       }).Single();
         }
     }
     catch (Exception ex)
     {
         _logService.Error(ex.Message, ex);
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:34,代码来源:MSTSitesRespository.cs


示例6: Single

 /// <summary>
 /// Finds the specified identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public MSTProcessTypesDto Single(int id)
 {
     MSTProcessTypesDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = (from item in context.MST_ProcessTypes
                       where item.IsDeleted == false && item.Id == id
                       select new MSTProcessTypesDto()
                       {
                           Id = item.Id,
                           Name = item.Name,
                           Description = item.Description,
                           Duration = item.Duration,
                           SeqNumber = item.SeqNumber,
                           IsDeleted = item.IsDeleted,
                           LastUpdatedBy = item.LastUpdatedBy,
                           LastUpdate = item.LastUpdate,
                       }).Single();
         }
     }
     catch (Exception ex)
     {
         _logService.Error(ex.Message, ex);
         result = null;
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:34,代码来源:MSTProcessTypesRespository.cs


示例7: SingleAsync

        /// <summary>
        /// Finds the asynchronous.
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <returns></returns>
        public async Task<FARPriorityLogDto> SingleAsync(int id)
        {
            FARPriorityLogDto result = null;
            try
            {
                using (FailureAnalysisEntities context = new FailureAnalysisEntities())
                {
                    result = await (from item in context.LOG_FARPriority
                                    where item.IsDeleted == false && item.Id == id
                                    select new FARPriorityLogDto()
                                    {
                                        Id = item.Id,
                                        MasterId = item.MasterId,
                                        PriorityIdNew = item.PriorityNew,
                                        PriorityIdOld = item.PriorityOld,
                                        PriorityNew = new MSTPriorityDto { Name = item.MST_Priority1.Name },
                                        PriorityOld = new MSTPriorityDto { Name = item.MST_Priority.Name },
                                        ReasonId = item.ReasonId,
                                        Reason = new DelayReasonDto { Description = item.MST_Reason.Description },
                                        IsDeleted = item.IsDeleted,
                                        LastUpdatedBy = item.LastUpdatedBy,
                                        LastUpdate = item.LastUpdate,


                                    }).SingleAsync();
                }
            }
            catch (Exception ex)
            {
                _logService.Error(ex.Message, ex);
                result = null;
            }
            return result;
        }
开发者ID:thientt,项目名称:FASTrack,代码行数:39,代码来源:FARPriorityLogRepository.cs


示例8: SingleAsync

 /// <summary>
 /// Finds the asynchronous.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public async Task<MSTFarReportDto> SingleAsync(int id)
 {
     MSTFarReportDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = await (from item in context.MST_FARReport
                             where item.IsDeleted == false && item.Id == id
                             select new MSTFarReportDto()
                             {
                                 Id = item.Id,
                                 ReportTypeId = item.ReportTypeId,
                                 OriginId = item.OriginId,
                                 Required = item.Required,
                                 ReportType = new ReportTypesDto { Id = item.MST_ReportTypes.Id, Name = item.MST_ReportTypes.Name, Description = item.MST_ReportTypes.Description },
                                 Origin = new MSTOriginDto { Id = item.MST_Origin.Id, Name = item.MST_Origin.Name, Description = item.MST_Origin.Description },
                                 Description = item.Description,
                                 LastUpdatedBy = item.LastUpdatedBy,
                                 LastUpdate = item.LastUpdate,
                             }).SingleAsync();
         }
     }
     catch (Exception ex)
     {
         result = null;
         _logService.Error(ex.Message, ex);
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:35,代码来源:MSTFarReportRepository.cs


示例9: SingleAsync

 /// <summary>
 /// Finds the asynchronous.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public async Task<MSTCustomerDto> SingleAsync(int id)
 {
     MSTCustomerDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = await (from item in context.MST_Customer
                             where item.IsDeleted == false && item.Id == id
                             select new MSTCustomerDto()
                             {
                                 Id = item.Id,
                                 CustomerName = item.CustomerName,
                                 EndCustomer = item.EndCustomer,
                                 Location = item.Location,
                                 Strategic = item.Strategic,
                                 IsDeleted = item.IsDeleted,
                                 LastUpdatedBy = item.LastUpdatedBy,
                                 LastUpdate = item.LastUpdate,
                             }).SingleAsync();
         }
     }
     catch (Exception ex)
     {
         _logService.Error(ex.Message, ex);
         result = null;
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:34,代码来源:MSTCustomerRepository.cs


示例10: Single

 /// <summary>
 /// Finds the specified identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public DelayReasonDto Single(int id)
 {
     DelayReasonDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = (from item in context.MST_ReasonINIReport
                       where item.IsDeleted == false && item.Id == id
                       select new DelayReasonDto()
                       {
                           Id = item.Id,
                           Description = item.Description,
                           LastUpdatedBy = item.LastUpdatedBy,
                           LastUpdate = item.LastUpdate,
                       }).Single();
         }
     }
     catch (Exception ex)
     {
         _logService.Error(ex.Message, ex);
         result = null;
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:30,代码来源:MSTReasonINIRepository.cs


示例11: Single

 /// <summary>
 /// Finds the specified identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public LOGHistoryDto Single(int id)
 {
     LOGHistoryDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = (from item in context.LOG_FARHistory
                       where item.IsDeleted == false && item.Id == id
                       select new LOGHistoryDto()
                       {
                           Id = item.Id,
                           MasterId = item.MasterId,
                           StatusId = item.StatusId,
                           ReasonId = item.ReasonId,
                           LogDate = item.LogDate,
                           IsDeleted = item.IsDeleted,
                           LastUpdatedBy = item.LastUpdatedBy,
                           LastUpdate = item.LastUpdate,
                       }).Single();
         }
     }
     catch (Exception ex)
     {
         _logService.Error(ex.Message, ex);
         result = null;
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:34,代码来源:FARHistoryRepository.cs


示例12: SingleAsync

 /// <summary>
 /// Finds the asynchronous.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public async Task<FARInitialTargetLogDto> SingleAsync(int id)
 {
     FARInitialTargetLogDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = await (from item in context.LOG_FARInitialTarget
                             where item.IsDeleted == false && item.Id == id
                             select new FARInitialTargetLogDto()
                             {
                                 Id = item.Id,
                                 MasterId = item.MasterId,
                                 ReasonId = item.ReasonId,
                                 TargetDate = item.TargetDate,
                                 IsDeleted = item.IsDeleted,
                                 LastUpdatedBy = item.LastUpdatedBy,
                                 LastUpdate = item.LastUpdate,
                                 
                                
                             }).SingleAsync();
         }
     }
     catch (Exception ex)
     {
         _logService.Error(ex.Message, ex);
         result = null;
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:35,代码来源:FARInitialTargetLogRepository.cs


示例13: SingleAsync

 /// <summary>
 /// Finds the asynchronous.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public async Task<RecordLockDto> SingleAsync(int id)
 {
     RecordLockDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = await (from item in context.FAR_RecordLock
                             where item.IsDeleted == false && item.Id == id
                             select new RecordLockDto()
                             {
                                 Id = item.Id,
                                 ProcessHistoryId = item.ProcessHistoryId,
                                 LockBy = item.LockBy,
                                 LockDate = item.LockDate,
                                 MasterId = item.MasterId,
                                 ReleaseDate = item.ReleaseDate,
                                 LastUpdatedBy = item.LastUpdatedBy,
                                 LastUpdate = item.LastUpdate,
                             }).SingleAsync();
         }
     }
     catch (Exception ex)
     {
         result = null;
         _logService.Error(ex.Message, ex);
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:34,代码来源:FARRecordLockRepository.cs


示例14: SingleAsync

 public async Task<FARCancelLogDto> SingleAsync(int id)
 {
     FARCancelLogDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = await (from item in context.LOG_FARCancel
                             where item.IsDeleted == false && item.Id == id
                             select new FARCancelLogDto()
                             {
                                 Id = item.Id,
                                 MasterId = item.MasterId,
                                 StatusId = item.StatusId,
                                 ReasonId = item.ReasonId,
                                 CancelledDate = item.CancelledDate,
                                 IsDeleted = item.IsDeleted,
                                 InsertedBy = item.InsertedBy,
                                 InsertedOn = item.InsertedOn,
                                 UpdatedBy = item.UpdatedBy,
                                 UpdatedOn = item.UpdatedOn,
                             }).SingleAsync();
         }
     }
     catch (Exception ex)
     {
         _logService.Error(ex.Message, ex);
         result = null;
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:31,代码来源:FARCancelLogRepository.cs


示例15: Single

 /// <summary>
 /// Finds the specified identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public FARDeviceDetailsDto Single(int id)
 {
     FARDeviceDetailsDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = (from item in context.FAR_DeviceDetails
                       where item.IsDeleted == false && item.Id == id
                       select new FARDeviceDetailsDto()
                       {
                           Id = item.Id,
                           MasterId = item.MasterId,
                           Master = new FARMasterDto()
                           {
                               Id = item.FAR_Master.Id,
                               Number = item.FAR_Master.Number,
                               Analyst = item.FAR_Master.Analyst,
                               Requestor = item.FAR_Master.Requestor,
                               RefNo = item.FAR_Master.RefNo,
                               StatusId = item.FAR_Master.StatusId,
                               Product = item.FAR_Master.Product,
                               Customer = item.FAR_Master.Customer,
                               FailureRate = item.FAR_Master.FailureRate,
                               RequestDate = item.FAR_Master.RequestDate,
                               FailureDesc = item.FAR_Master.FailureDesc,
                           },
                           WaferNo = item.WaferNo,
                           SerialNo = item.SerialNo,
                           LotNo = item.LotNo,
                           MfgPartNo = item.MfgPartNo,
                           TechnologyId = item.TechnologyId,
                           Technogoly = new MSTTechnogolyDto() { Id = item.MST_Technology.Id, Name = item.MST_Technology.Name, Description = item.MST_Technology.Description, },
                           PackageTypeId = item.PackageTypeId,
                           PackageType = new MSTPackageTypesDto() { Id = item.MST_PackageTypes.Id, Name = item.MST_PackageTypes.Name, Description = item.MST_PackageTypes.Description, },
                           AssemblySiteId = item.AssembliesSiteId,
                           AssemblySites = new MSTAssemblySiteDto() { Id = item.MST_AssemblySites.Id, Name = item.MST_AssemblySites.Code, Description = item.MST_AssemblySites.Description, },
                           FabSiteId = item.FabSiteId,
                           FabSite = new FabSiteDto() { Id = item.FabSites.Id, Name = item.FabSites.Name, Description = item.FabSites.Description, },
                           ServiceId = item.ServiceId,
                           FARServices = new MSTServiceDto() { Id = item.MST_Services.Id, Name = item.MST_Services.Name, Description = item.MST_Services.Description },
                           DateCode = item.DateCode,
                           Quantity = item.Quantity,
                           Stage = item.Stage,
                           IsDeleted = item.IsDeleted,
                           LastUpdatedBy = item.LastUpdatedBy,
                           LastUpdate = item.LastUpdate,
                       }).Single();
         }
     }
     catch (Exception ex)
     {
         _logService.Error(ex.Message, ex);
         result = null;
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:62,代码来源:FARDeviceDetailsRepository.cs


示例16: Single

 /// <summary>
 /// Finds the specified identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public FARMasterDto Single(int id)
 {
     FARMasterDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = (from item in context.FAR_Master
                       where item.IsDeleted == false && item.Id == id
                       select new FARMasterDto()
                       {
                           Id = item.Id,
                           Number = item.Number,
                           OriginId = item.OriginId,
                           FAROrigin = new MSTOriginDto() { Id = item.MST_Origin.Id, Name = item.MST_Origin.Name, Description = item.MST_Origin.Description },
                           Requestor = item.Requestor,
                           RefNo = item.RefNo,
                           FailureTypeId = item.FailureTypeId,
                           FARFailureType = new MSTFailureTypeDto() { Id = item.MST_FailureType.Id, Name = item.MST_FailureType.Name, Description = item.MST_FailureType.Description },
                           FailureOriginId = item.FailureOriginId,
                           FARFailureOrigin = new MSTFailureOriginDto() { Id = item.MST_FailureOrigin.Id, Name = item.MST_FailureOrigin.Name, Description = item.MST_FailureOrigin.Description },
                           FailureRate = item.FailureRate,
                           StatusId = item.StatusId,
                           FARStatus = new MSTStatusDto() { Id = item.MST_Status.Id, Name = item.MST_Status.Name, Description = item.MST_Status.Description },
                           Analyst = item.Analyst,
                           RequestDate = item.RequestDate,
                           SamplesArriveDate = item.SamplesArriveDate,
                           PriorityId = item.PriorityId,
                           FARPriority = new MSTPriorityDto() { Id = item.MST_Priority.Id, Name = item.MST_Priority.Name, Description = item.MST_Priority.Description },
                           InitialReportTargetDate = item.InitialReportTargetDate,
                           BUId = item.BUId,
                           Bu = new MSTBuDto() { Id = item.MST_BU.Id, Name = item.MST_BU.Name, Description = item.MST_BU.Description },
                           Product = item.Product,
                           FailureDesc = item.FailureDesc,
                           FinalReportTargetDate = item.FinalReportTargetDate,
                           Submitted = item.Submitted,
                           Customer = item.Customer,
                           LabSiteId = item.LabSiteId,
                           LabSite = new MSTLabSiteDto { Id = item.MST_LabSite.Id, Name = item.MST_LabSite.Name, Description = item.MST_LabSite.Description },
                           RatingId = item.RatingId,
                           Rating = new MSTRatingDto { Id = item.MST_Rating != null ? item.MST_Rating.Id : 0, Name = item.MST_Rating != null ? item.MST_Rating.Name : "", Description = item.MST_Rating != null ? item.MST_Rating.Description : "" },
                           Comments = item.Comments,
                           IsDeleted = item.IsDeleted,
                           LastUpdatedBy = item.LastUpdatedBy,
                           LastUpdate = item.LastUpdate,
                       }).Single();
         }
     }
     catch (Exception ex)
     {
         _logService.Error(ex.Message, ex);
         return null;
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:60,代码来源:FARMasterRepository.cs


示例17: Single

 /// <summary>
 /// Finds the specified identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public LOGProcessHistoryDto Single(int id)
 {
     LOGProcessHistoryDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = (from item in context.LOG_ProcessHistory
                       where item.Id == id
                       select new LOGProcessHistoryDto()
                       {
                           Id = item.Id,
                           ProcessHisId = item.ProcessHisId,
                           FARProcessHistory = new FARProcessHistoryDto()
                           {
                               Id = item.FAR_ProcessHistory.Id,
                               Analystor = item.FAR_ProcessHistory.Analystor,
                               Comment = item.FAR_ProcessHistory.Comment,
                               DateIn = item.FAR_ProcessHistory.DateIn,
                               DateOut = item.FAR_ProcessHistory.DateOut,
                               Description = item.FAR_ProcessHistory.Description,
                               PlannedIn = item.FAR_ProcessHistory.PlannedIN,
                               PlannedOut = item.FAR_ProcessHistory.PlannedOUT,
                               SeqNum = item.FAR_ProcessHistory.SeqNum,
                           },
                           InsertedBy = item.InsertedBy,
                           InsertedDate = item.InsertedDate,
                           PlanFrom = item.PlanFrom,
                           PlanTo = item.PlanTo,
                           PlanType = (PlanType)item.PlanType,
                       }).Single();
         }
     }
     catch (Exception ex)
     {
         _logService.Error(ex.Message, ex);
         result = null;
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:45,代码来源:LOGProcessHistoryRepository.cs


示例18: Single

 /// <summary>
 /// Finds the specified identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public MSTProcessProductDto Single(int id)
 {
     MSTProcessProductDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = (from item in context.MST_ProcessProduct
                       where item.IsDeleted == false && item.Id == id
                       select new MSTProcessProductDto()
                       {
                           Id = item.Id,
                           InChargePerson = item.InChargePerson,
                           ProcessTypeId = item.ProcessTypeId,
                           ProcessType = new MSTProcessTypesDto
                           {
                               Name = item.MST_ProcessTypes.Name,
                               Description = item.MST_ProcessTypes.Description,
                           },
                           ProductId = item.ProductId,
                           Product = new MSTProductDto
                           {
                               Name = item.MST_Product.Name,
                               Description = item.MST_Product.Description,
                           },
                           Description = item.Description,
                           IsDeleted = item.IsDeleted,
                           LastUpdatedBy = item.LastUpdatedBy,
                           LastUpdate = item.LastUpdate,
                       }).Single();
         }
     }
     catch (Exception ex)
     {
         _logService.Error(ex.Message, ex);
         result = null;
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:44,代码来源:MSTProcessProductRepository.cs


示例19: Single

 /// <summary>
 /// Finds the specified identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public MSTProductDto Single(int id)
 {
     MSTProductDto result = null;
     try
     {
         using (FailureAnalysisEntities context = new FailureAnalysisEntities())
         {
             result = (from item in context.MST_Product
                       where item.IsDeleted == false && item.Id == id
                       select new MSTProductDto()
                       {
                           Id = item.Id,
                           Name = item.Name,
                           Description = item.Description,
                           MainPerson = item.MainPerson,
                           SecondaryPerson = item.SecondaryPerson,
                           TertiaryPerson = item.TertiaryPerson,
                           LabSiteId = item.LabSiteId,
                           LabSite = new MSTLabSiteDto
                           {
                               Id = item.MST_LabSite.Id,
                               Name = item.MST_LabSite.Name
                           },
                           IsDeleted = item.IsDeleted,
                           LastUpdatedBy = item.LastUpdatedBy,
                           LastUpdate = item.LastUpdate,
                       }).Single();
         }
     }
     catch (Exception ex)
     {
         _logService.Error(ex.Message, ex);
         result = null;
     }
     return result;
 }
开发者ID:thientt,项目名称:FASTrack,代码行数:41,代码来源:MSTProductRepository.cs


示例20: Delete

        /// <summary>
        /// Deletes the specified entity.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <returns></returns>
        public SaveResult Delete(DelayReasonDto entity)
        {
            SaveResult result = SaveResult.FAILURE;

            try
            {
                using (FailureAnalysisEntities context = new FailureAnalysisEntities())
                {
                    var assembly = context.MST_ReasonINIReport.Single(x => x.Id == entity.Id && x.IsDeleted == false);
                    assembly.IsDeleted = true;

                    context.Entry<MST_ReasonINIReport>(assembly).State = System.Data.Entity.EntityState.Modified;
                    result = context.SaveChanges() > 0 ? SaveResult.SUCCESS : SaveResult.FAILURE;
                }
            }
            catch (Exception ex)
            {
                _logService.Error(ex.Message, ex);
                result = SaveResult.FAILURE;
            }

            return result;
        }
开发者ID:thientt,项目名称:FASTrack,代码行数:28,代码来源:MSTReasonINIRepository.cs



注:本文中的FASTrack.Model.Entities.FailureAnalysisEntities类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# AutoGen.AVCodecContext类代码示例发布时间:2022-05-24
下一篇:
C# Sequence.FASequenceManager类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap