예제 #1
0
파일: Docker.cs 프로젝트: naaturaz/SM
    private Structure GiveMeSourceForThisProd()
    {
        if (_order == null)
        {
            return(_person.FoodSource);
        }

        //looking for a Source that has the product
        var sourceSt = Dispatch.FindFoodSrcWithProd(_person, _order.Product);

        if (string.IsNullOrEmpty(sourceSt))
        {
            return(_person.FoodSource);
        }

        var source = Brain.GetStructureFromKey(sourceSt);

        //if not will default for the person FoodSource
        if (source == null)
        {
            source = _person.FoodSource;
        }

        return(source);
    }