Пример #1
0
        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);
        }
Пример #2
0
 private UniqueId Map()
 {
     return(_uniqueIdMapper.Map(_id));
 }