public ActionResult Edit(int id)
        {
            Feature feature = new Feature();

            try
            {
                feature = FeaturesLogic.GetFeatureById(id);
            }
            catch (Exception e)
            {
                LogsLogic.InsertLog(new Log()
                {
                    Message    = e.Message,
                    StackTrace = e.StackTrace,
                    StoryName  = "MoreHolidays/Features/Edit(Get)",
                    Parameters = "id=" + id
                });
            }
            return(View("Edit", feature));
        }
        public ActionResult Delete(int id)
        {
            int solutionIdIndex = FeaturesLogic.GetFeatureById(id).SolutionId;

            try
            {
                FeaturesLogic.DeleteFeature(id);
            }
            catch (Exception e)
            {
                LogsLogic.InsertLog(new Log()
                {
                    Message    = e.Message,
                    StackTrace = e.StackTrace,
                    StoryName  = "MoreHolidays/Features/Delete",
                    Parameters = "id=" + id
                });
            }
            return(RedirectToAction("Index", new { solutionId = solutionIdIndex }));
        }
        // GET: Features
        public ActionResult FeaturesList(int?pageNo, int solutionId)
        {
            var            page  = pageNo ?? 0;
            List <Feature> model = new List <Feature>();

            try
            {
                model = FeaturesLogic.GetFeaturesBySolutionId(solutionId, page);
            }
            catch (Exception e)
            {
                LogsLogic.InsertLog(new Log()
                {
                    Message    = e.Message,
                    StackTrace = e.StackTrace,
                    StoryName  = "MoreHolidays/Features/FeaturesList",
                    Parameters = "& pageNo=" + page
                });
            }

            return(View(model));
        }
 public ActionResult Create(Feature feature)
 {
     if (ModelState.IsValid)
     {
         try
         {
             FeaturesLogic.InsertNewFeature(feature);
             return(RedirectToAction("Index", new { solutionId = feature.SolutionId }));
             // return PartialView("JavascriptRedirect", new JavascriptRedirectModel("/Home/Index"));
         }
         catch (Exception e)
         {
             LogsLogic.InsertLog(new Log()
             {
                 Message    = e.Message,
                 StackTrace = e.StackTrace,
                 StoryName  = "MoreHolidays/Features/Create(Post)"
             });
             return(View(feature));
             //Parameters = new JavaScriptSerializer().Serialize(project)
         }
     }
     return(View(feature));
 }
Beispiel #5
0
 public ProductBO()
 {
     featureLogic         = new FeaturesLogic();
     productCategoryLogic = new ProductCategoryLogic();
 }
Beispiel #6
0
 public FetaureController()
 {
     logic = new FeaturesLogic();
 }