Exemplo n.º 1
0
        public Graph AddGraph(Graph graph)
        {
            Graph g = context.Graphs.Add(graph);

            context.SaveChanges();
            return(g);
        }
Exemplo n.º 2
0
        public DashboardItem AddDashboardItem(DashboardItem item)
        {
            DashboardItem dbi = context.Dashboarditems.Add(item);

            context.SaveChanges();
            return(dbi);
        }
Exemplo n.º 3
0
        public Account CreateAccount(string id, string name, string mail)
        {
            Account account = new Account(id, name, mail);

            context.Accounts.Add(account);
            context.SaveChanges();
            return(account);
        }
Exemplo n.º 4
0
        public ActionResult Create([Bind(Include = "answerId,questionId,option1,option2,option3,option4,answer")] Answer answer)
        {
            if (ModelState.IsValid)
            {
                db.answers.Add(answer);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(answer));
        }
        public ActionResult Create(SkillGroup skillGroup)
        {
            if (ModelState.IsValid)
            {
                db.SkillGroups.Add(skillGroup);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(skillGroup));
        }
        public ActionResult Create([Bind(Include = "SkillGroupId,SkillGroupName,Skill,Mode")] SkillGroup skillGroup)
        {
            if (ModelState.IsValid)
            {
                db.SkillGroups.Add(skillGroup);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(skillGroup));
        }
Exemplo n.º 7
0
        public ActionResult Create([Bind(Include = "questionId,SkillGroupId")] Questions questions)
        {
            if (ModelState.IsValid)
            {
                db.questions.Add(questions);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(questions));
        }
Exemplo n.º 8
0
        public ActionResult Create([Bind(Include = "id,InterviewName,SkillLevel,AssessmentModes,Status,Questions")] Interview interview)
        {
            if (ModelState.IsValid)
            {
                interview.Status    = "Draft";
                interview.Questions = "Configure";
                db.interviews.Add(interview);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(interview));
        }
Exemplo n.º 9
0
 public SiteContent AddSiteContent(SiteContent sc)
 {
     try
     {
         SiteContent sc2 = context.SiteContents.Add(sc);
         context.SaveChanges();
         return(sc2);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
         return(null);
     }
 }
Exemplo n.º 10
0
 public void AddSubject(Subject subject)
 {
     context.Subjects.Add(subject);
     context.SaveChanges();
 }
Exemplo n.º 11
0
 public void CreateFeed(Feed feed)
 {
     context.Feeds.Add(feed);
     context.SaveChanges();
 }
Exemplo n.º 12
0
 public void AddAlert(Alert alert)
 {
     context.Alerts.Add(alert);
     context.SaveChanges();
 }
Exemplo n.º 13
0
 public void addTheme(Theme thema)
 {
     context.Subjects.Add(thema);
     context.SaveChanges();
 }