Пример #1
0
        private bool CheckRouting() // Start Check Routing process
        {
            if (Operation == "")
            {
                return(SetMsgAndReturn(EnumMessage.SystemNoOperationAssign, new List <string>()
                {
                    SnDetail.number
                }, false));
            }
            var routeDetailList = GetWsObj.GetRoutingDetail(Route, Operation);

            if (routeDetailList == null)
            {
                return(SetMsgAndReturn(EnumMessage.OperationNotFoundInRoute, new List <string>()
                {
                    Route, Operation
                }, false));
            }

            if (!routeDetailList.Any())
            {
                return(SetMsgAndReturn(EnumMessage.OperationNotFoundInRoute, new List <string>()
                {
                    Route, Operation
                }, false));
            }
            RouteDetail = GetWsObj.GetRoutingDetailList(routeDetailList[0].url);
            if (Operation == SnDetail.current_operation)
            {
                return(CheckExcept(RouteDetail));
            }

            if (CheckAccept(RouteDetail))
            {
                return(true);                         // if true = accept route
            }
            return(SetMsgAndReturn(EnumMessage.WrongOperation, new List <string>()
            {
                SnDetail.number, SnDetail.current_operation
            }, false));
        }