Esempio n. 1
0
        public ActionResult KeyPerformanceIndicators(int taskid, int id, FormCollection form)
        {
            string message = string.Empty;
            Dictionary <string, string> dict = new Dictionary <string, string>();

            dict = FormCollectionToDict(form);
            int approvallevel = PMSHelper.GetApprovalLevel(id, UserInfo.userinfo.ID);

            if (PMSModel.UpdateKPIScore(dict, approvallevel, out message))
            {
                return(Redirect("/Stage1Approval/CoreValues/" + taskid + "/" + id));
            }
            else
            {
                return(View());
            }
        }
Esempio n. 2
0
        public JsonResult KPISave(string[] KPIForDatabase)
        {
            string temp = KPIForDatabase[0];

            string[] splitString             = { "},{" };
            string[] result                  = temp.Substring(2, temp.Length - 2).Split(splitString, StringSplitOptions.None);
            Dictionary <string, string> dict = new Dictionary <string, string>();

            foreach (string s in result)
            {
                string[] kparray = s.Replace("\"", "").Split(',');
                dict.Add((kparray[0].Split(':'))[1], (kparray[1].Split(':'))[1]);
            }
            string message = string.Empty;

            PMSModel.UpdateKPIScore(dict, 0, out message);
            return(Json(message));
        }
Esempio n. 3
0
        public ActionResult KeyPerformanceIndicators(int taskid, int id, FormCollection form)
        {
            string message = string.Empty;
            Dictionary <string, string> dict = new Dictionary <string, string>();

            dict = FormCollectionToDict(form);

            if (PMSModel.UpdateKPIScore(dict, 0, out message))
            {
                TempData["AlertMessage"] = "KPI data saved successfully";
                return(Redirect("/Stage3/CoreValues/" + taskid + "/" + id));
            }
            else
            {
                TempData["AlertMessage"] = "Ops! KPI data saving failed, please try again or contact IT member";
                return(View());
            }
        }