Exemplo n.º 1
0
        public void CreateNewFeature(CreateNewFeatureModel model)
        {
            model.SelfCheck();
            MenuFeature menuFeature = MenuFeatureBiz.FindByName(model.FeatureName);

            if (menuFeature.IsNull())
            {
                menuFeature = MenuFeatureBiz.Factory() as MenuFeature;
                menuFeature.IsNullThrowException("menuFeature");

                menuFeature.Name = model.FeatureName;
                MenuFeatureBiz.CreateAndSave(menuFeature);
                return;
            }
            //if you are here then the feature already exists
            ErrorsGlobal.Add(string.Format("'{0}' already exists!", model.FeatureName), MethodBase.GetCurrentMethod());
            throw new Exception(ErrorsGlobal.ToString());
        }
Exemplo n.º 2
0
 public ProductFeatureBiz(IRepositry <ProductFeature> entityDal, BizParameters bizParameters, MenuFeatureBiz menuFeatureBiz)
     : base(entityDal, bizParameters)
 {
     _menuFeatureBiz = menuFeatureBiz;
 }