public ActionResult Create([Bind(Include = "SubtaskId,DeveloperId,ManagerId,Description,ProgressPercent,Deadline,CompletionStatus")] Subtask subtask)
        {
            if (ModelState.IsValid)
            {
                db.Subtasks.Add(subtask);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(subtask));
        }
示例#2
0
        public ActionResult Create([Bind(Include = "TaskId,ManagerId,Description,ProgressPercent,Deadline,CompletionStatus")] GetTaskInfo getTaskInfo)
        {
            if (ModelState.IsValid)
            {
                db.GetTaskInfoes.Add(getTaskInfo);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(getTaskInfo));
        }
示例#3
0
        public ActionResult Create([Bind(Include = "Id,Username,Password")] DeveloperLoginInfo developerLoginInfo)
        {
            if (ModelState.IsValid)
            {
                db.DeveloperLoginInfoes.Add(developerLoginInfo);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(developerLoginInfo));
        }
示例#4
0
        public ActionResult Create([Bind(Include = "UserName,Password,Name,Image_url")] ManagerLoginInfo managerLoginInfo)
        {
            if (ModelState.IsValid)
            {
                db.ManagerLoginInfoes.Add(managerLoginInfo);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(managerLoginInfo));
        }
示例#5
0
        public ActionResult FeedbackFormView([Bind(Include = "DeveloperId,SubtaskId,FeedbackStr,Positivity")] Feedback feedback)
        {
            Db_1Entities db = new Db_1Entities();

            if (ModelState.IsValid)
            {
                paralleldots pd        = new paralleldots("qZA1qGaGDNNbSUGiNSEOpBjxZreiijYM7y77VLCrlvw");
                var          sentiment = pd.sentiment(feedback.FeedbackStr);
                var          objects   = JObject.Parse(sentiment);
                var          posprob   = objects["probabilities"]["positive"].ToString();
                feedback.Positivity = Double.Parse(posprob);
                db.Feedbacks.Add(feedback);
                db.SaveChanges();
                return(RedirectToAction("FeedbackFormView"));
            }

            return(View(feedback));
        }