Example #1
0
        private bool GetRouting()
        {
            if (SnDetail?.routing != null)
            {
                var routeListVm = GetWsObj.GetRoute(SnDetail.routing);
                if (routeListVm != null)
                {
                    Route = routeListVm.name; return(true);
                }
            }

            if (SnDetail == null)
            {
                return(true);
            }
            var wo = GetWsObj.GetWorkOrderBySlug(SnDetail.workorder);

            if (wo == null)
            {
                return(false);
            }
            ShopOrderName = wo.name;
            if (wo.routing.name != "")
            {
                Route = wo.routing.name; return(true);
            }

            var prod = GetWsObj.GetProductBySlug(wo.product);

            if (prod == null)
            {
                return(false);
            }
            Route = prod.routing.name;

            return(true);
        }