コード例 #1
0
        public IFluentRecipeOperations AddOperation(string s)
        {
            //_operation = contx.MasterRecipes.FirstOrDefault(g => g.BrandName == s);
            MasterRecipe rec = _parent.GetRecipe();
            _operation = rec.RecOperations.FirstOrDefault(g => g.OperationName == s);

            _isnew = false;

            if (_operation == null)
            {

                _isnew = true;
                _operation = new RecUnitOperation();

                _operation.OperationName = s;
                _operation.SetPoint = 0;
                _operation.Transitions = new List<Transition>();
                _operation.AllowedUnits = new List<Unit>();

            }

            return this;
        }
コード例 #2
0
        public IFluentRecipeOperations ForOperation(string s)
        {
            _operation = contx.RecUnitOperations.FirstOrDefault(g => g.OperationName == s);

            return this;
        }
コード例 #3
0
        public FluentRecipeOperations(IFluentRecipe parent, string s)
        {
            _isnew = false;
            _parent = parent;
            MasterRecipe rec = _parent.GetRecipe();

            //            _operation =_parent.GetRecipe().RecOperations.FirstOrDefault(g=>g.OperationName==s);
            //_operation = contx.MasterRecipes.FirstOrDefault(g => g.BrandName == rec.BrandName).RecOperations.FirstOrDefault(e => e.OperationName == s);
            _operation = rec.RecOperations.FirstOrDefault(g => g.OperationName == s);

            //if (_operation == null)
            //{
            //    //_operation = new RecUnitOperation();

            //    AddOperation(s);

            //}
        }