private BrokenDeviceRoutingInfo ToRoutingInfo(BrokenDeviceRoutingInfoDTO vo)
        {
            var o = new BrokenDeviceRoutingInfo();

            ClassCopier.Instance.Copy(vo, o);

            if (vo.Contract != null)
            {
                o.Contract = ToContract(vo.Contract);
            }
            if (vo.Routings.Count > 0)
            {
                o.Routings = ToRoutings(vo.Routings);
            }
            return(o);
        }
        public BrokenDeviceRoutingInfoDTO ToRoutingInfoDTO(BrokenDeviceRoutingInfo o)
        {
            var vo = new BrokenDeviceRoutingInfoDTO();

            ClassCopier.Instance.Copy(o, vo);

            if (o.Contract != null)
            {
                vo.Contract = ToContractDTO(o.Contract);
            }
            if (o.Routings.Count > 0)
            {
                vo.Routings = ToRoutingsDTO(o.Routings);
            }
            return(vo);
        }
        public BrokenDeviceRequestDTO GetDummyData()
        {
            var now      = DateTime.Today;
            var workflow = new List <RoutingItemDTO>
            {
                new RoutingItemDTO
                {
                    ActualDate     = now,
                    BaseDate       = now,
                    Division       = "Warehouse",
                    DivisionStatus = false,
                    Instruction    = "Fixed the information please!",
                    PlanDate       = now,
                    Response       = "Muke gile...",
                    RoutingStatus  = ERoutingStatus.IN_PROGRESS,
                    SaStatus       = false,
                    Step           = 1
                },
                new RoutingItemDTO
                {
                    ActualDate     = now,
                    BaseDate       = now,
                    Division       = "Workshop",
                    DivisionStatus = false,
                    Instruction    = "Fixed the information please!",
                    PlanDate       = now,
                    Response       = "Muke gile...",
                    RoutingStatus  = ERoutingStatus.IN_PROGRESS,
                    SaStatus       = true,
                    Step           = 1
                }
            };
            var contract = new BrokenDeviceContractDTO
            {
                BackupEquipment = "BAK-234234324",
                Device          = "DIV-2343242",
                DeviceSn        = "SN-2423424",
                EquipDesc       = "Laptop Bapuk",
                Equipment       = "EQ-324234234",
                HolderName      = "Mohammad Romdan",
                LineNumber      = "23",
                Number          = "234324",
                SalaryNumber    = "SAL-346353"
            };
            var requestInfo = new BrokenDeviceRequestInfoDTO
            {
                Branch        = "Mampang",
                Company       = "PT. Trakindo",
                CustomerId    = "CUS-234234",
                Id            = _indexDao.NewRequestInfoId(),
                RequestMemo   = "Segera diurus hinggga beres!",
                RequestedBy   = "Bromo Kunto Adji",
                RequestedDate = now,
                SnOrIdNumber  = "23432"
            };
            var routingInfo = new BrokenDeviceRoutingInfoDTO
            {
                CreateDate   = now,
                CurrentStep  = 1,
                IdrWebNumber = "IDRW-234324324",
                RoutingMemo  = "Tolong diurus segera!",
                Routings     = workflow,
                Contract     = contract
            };
            var req = new BrokenDeviceRequestDTO
            {
                Id          = _indexDao.NewServiceRequestId(),
                IssuedBy    = "Workshop",
                IssuedDate  = now,
                Scenario    = EScenario.BROKEN_DEVICE,
                State       = EServiceRequestState.DRAFT,
                RequestInfo = requestInfo,
                Routing     = routingInfo
            };

            return(req);
        }