private string MapFeedbackType(FeedbackTypes feedbackType)
        {
            string result = String.Empty;

            switch (feedbackType)
            {
            case FeedbackTypes.Idea:
                result = "Idea";
                break;

            case FeedbackTypes.Negative:
                result = "Negative";
                break;

            case FeedbackTypes.Positive:
                result = "Positive";
                break;

            case FeedbackTypes.Praise:
                result = "Praise";
                break;
            }

            return(result);
        }
Beispiel #2
0
        public ActionResult ShowType(int id)
        {
            FeedbackTypes type = db.FeedbackTypes.SqlQuery("Select * from FeedbackTypes where typeId = @id", new SqlParameter("@id", id)).FirstOrDefault();

            List <Departments> departments = db.Departments.SqlQuery("Select * from Departments join FeedbackTypesDepartments on id = Departments_id where FeedbackTypes_typeId = @id", new SqlParameter("@id", id)).ToList();

            List <Feedbacks> feedbacks = db.Feedbacks.SqlQuery("Select * from Feedbacks where typeId = @id", new SqlParameter("@id", id)).ToList();
            ShowFeedbackType show      = new ShowFeedbackType();

            show.type        = type;
            show.departments = departments;
            show.feedbacks   = feedbacks;
            return(View(show));
        }