Esempio n. 1
0
        public ActionResult CoreValues(int taskid, int?id)
        {
            PMSPageInfo PI            = new PMSPageInfo();
            int         approvallevel = 0;

            if (id.HasValue)
            {
                var temp = PMSModel.GetApprisalByID(id.Value);
                ViewData["Stage"]  = temp.Stage;
                ViewData["Status"] = temp.Status;
                PMSHelper.GetSectionInfo(PI, id.Value);
                PI.ApprisalId = id.Value;

                int sectionId = PMSHelper.GetCurrentSectionID(PI.SCList, RouteData.Values["Action"].ToString());
                PMSHelper.GetBlockInfo(PI, sectionId);
                List <PMSCommentsInfo> comments = new List <PMSCommentsInfo>();
                PMSHelper.GetCoreValuesList(PI, id.Value);
                comments = PMSHelper.GetAllCoreValuesComments(PI.CoreValuesList);
                if (comments.Count > 0)
                {
                    foreach (PMSCoreValuesInfo kpiinfo in PI.CoreValuesList)
                    {
                        PMSHelper.GetEachCoreValuesComments(kpiinfo, comments);
                    }
                }
                approvallevel = PMSModel.GetApprovalLevel(id.Value, UserInfo.userinfo.ID);
            }
            ViewData.Model            = PI;
            ViewData["ApprovalLevel"] = id.HasValue ? PMSHelper.GetApprovalLevel(id.Value, UserInfo.userinfo.ID) : 0;
            return(View());
        }
Esempio n. 2
0
        public ActionResult PerformanceCoachingandReview(int taskid, int id, FormCollection form)
        {
            string message = string.Empty;
            int    status  = PMSModel.GetApprisalByID(id).StatusID;

            if (PMSModel.OnlyUpdateApprStatus(id, (int)ApprStatus.Draft, PMSHelper.GetApprovalLevel(id, UserInfo.userinfo.ID), form["ApORRe"].ToString(), out message))
            {
                TempData["AlertMessage"] = "PerformanceCoaching data saved successfully";
                return(Redirect("/Stage1Approval/CareerDevelopment/" + taskid + "/" + id));
            }
            else
            {
                TempData["AlertMessage"] = "Ops! PerformanceCoaching data saving failed, please try again or contact IT member";
                return(View());
            }
        }
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);
            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. 4
0
        public ActionResult CareerDevelopment(int taskid, int id, FormCollection form)
        {
            string message = string.Empty;
            Dictionary <string, string> dictform = new Dictionary <string, string>();

            dictform.Add("ModuleID", ModuleID.ToString());
            dictform.Add("TaskID", taskid.ToString());
            dictform.Add("UserID", UserInfo.userinfo.ID.ToString());
            dictform.Add("ApprID", id.ToString());
            int ApprovalLevel = PMSHelper.GetApprovalLevel(id, UserInfo.userinfo.ID);

            if (PMSModel.FinishTaskAndUpdateApprStatus(dictform, (int)ApprStatus.New, ApprovalLevel, "", out message))
            {
                TempData["AlertMessage"] = "CarrerDevelopment data saved successfully";
                return(Redirect("/"));
            }
            else
            {
                TempData["AlertMessage"] = "Ops! CarrerDevelopment data saving failed, please try again or contact IT member";
                return(View());
            }
        }