public DealtViewModel(int id) { var bizProcessesAudit = BizFactory.BizProcessesAudit.ChangeStatusByAuditFlowV1(id, Enumeration.AuditFlowV1Status.InDealt, this.Operater, null, "已取单,正在处理"); if (bizProcessesAudit != null) { _bizProcessesAudit = bizProcessesAudit; if (_bizProcessesAudit.Auditor.Value != this.Operater) { this.IsHasOperater = true; this.OperaterName = SysFactory.SysUser.GetFullName(_bizProcessesAudit.Auditor.Value); } var orderToLllegalDealt = CurrentDb.OrderToLllegalDealt.Where(m => m.Id == bizProcessesAudit.AduitReferenceId).FirstOrDefault(); if (OrderToLllegalDealt != null) { _orderToLllegalDealt = orderToLllegalDealt; var merchant = CurrentDb.Merchant.Where(m => m.Id == orderToLllegalDealt.MerchantId).FirstOrDefault(); if (merchant != null) { _merchant = merchant; } var orderToLllegalDealtDetails = CurrentDb.OrderToLllegalDealtDetails.Where(m => m.OrderId == orderToLllegalDealt.Id).ToList(); if (orderToLllegalDealtDetails != null) { _orderToLllegalDealtDetails = orderToLllegalDealtDetails; } } } }
public DetailsByDealtViewModel(int id) { var orderToLllegalDealt = CurrentDb.OrderToLllegalDealt.Where(m => m.Id == id).FirstOrDefault(); if (orderToLllegalDealt != null) { _orderToLllegalDealt = orderToLllegalDealt; var merchant = CurrentDb.Merchant.Where(m => m.Id == orderToLllegalDealt.MerchantId).FirstOrDefault(); if (merchant != null) { _merchant = merchant; } _bizProcessesAuditDetails = BizFactory.BizProcessesAudit.GetDetails(Enumeration.BizProcessesAuditType.OrderToTalentDemand, id); var orderToLllegalDealtDetails = CurrentDb.OrderToLllegalDealtDetails.Where(m => m.OrderId == orderToLllegalDealt.Id).ToList(); if (orderToLllegalDealtDetails != null) { _orderToLllegalDealtDetails = orderToLllegalDealtDetails; } } }