private WorkOrder Map(TSK task, ApplicationDataModel.ADM.ApplicationDataModel dataModel) { var workOrder = new WorkOrder(); workOrder.Id.UniqueIds.Add(_uniqueIdMapper.Map(task.A)); workOrder.Description = task.B; workOrder.GrowerId = GetGrower(dataModel.Catalog, task.C); workOrder.FarmIds = GetFarms(dataModel.Catalog, task.D); workOrder.FieldIds = GetFields(dataModel.Catalog, task.E); workOrder.StatusUpdates = new List <StatusUpdate>(); workOrder.StatusUpdates.Add(_statusUpdateMapper.Map(task.G)); if (!string.IsNullOrEmpty(task.F)) { AssociatePersonWithWorkOrder(task, dataModel, workOrder); } AssociateWorkItemWithWorkOrder(task, dataModel, workOrder); return(workOrder); }
private UniqueId Map() { return(_uniqueIdMapper.Map(_id)); }