Exemplo n.º 1
0
        public JsonResult PerformanceCoachingandReviewSave(string KPIID, string Comments)
        {
            string message = string.Empty;
            List <Model.DTO.Appraisal.PerformanceCoachingComment> lst_comments = new List <Model.DTO.Appraisal.PerformanceCoachingComment>();

            Model.DTO.Appraisal.PerformanceCoachingComment obj_comment = new Model.DTO.Appraisal.PerformanceCoachingComment()
            {
                AppraisalPerformanceCoaching = new Model.DTO.Appraisal.PerformanceCoaching()
                {
                    Id = Convert.ToInt32(KPIID)
                },
                CommentedTimestamp = DateTime.Now,
                Commentor          = new Model.DTO.Core.Employee()
                {
                    Id = CurrentUser.Id
                },
                Comments     = Comments.Trim(),
                FormSaveOnly = true,
            };
            lst_comments.Add(obj_comment);

            Model.PMSModel.UpdateAppraisalPerformanceCoachingComment(lst_comments, out message);

            return(Json(message));
        }
Exemplo n.º 2
0
        public JsonResult PerformanceCoachingandReviewSave(string KPIID, string Comments)
        {
            string message = string.Empty;

            if (!string.IsNullOrEmpty(KPIID) && !string.IsNullOrEmpty(Comments))
            {
                List <Model.DTO.Appraisal.PerformanceCoachingComment> lst_comments = new List <Model.DTO.Appraisal.PerformanceCoachingComment>();

                Model.DTO.Appraisal.PerformanceCoachingComment obj_comment = new Model.DTO.Appraisal.PerformanceCoachingComment()
                {
                    AppraisalPerformanceCoaching = new Model.DTO.Appraisal.PerformanceCoaching()
                    {
                        Id = Convert.ToInt32(KPIID)
                    },
                    CommentedTimestamp = DateTime.Now,
                    Commentor          = new Model.DTO.Core.Employee()
                    {
                        Id = CurrentUser.Id
                    },
                    Comments = !string.IsNullOrEmpty(Comments) == true?Lib.Utility.Common.ReplaceLineBreaksForDatabase(Uri.UnescapeDataString(Comments.Trim())) : null,
                                   FormSaveOnly = true,
                };
                lst_comments.Add(obj_comment);

                Model.PMSModel.UpdateAppraisalPerformanceCoachingComment(lst_comments, out message);
            }
            return(Json(message));
        }
Exemplo n.º 3
0
        public ActionResult PerformanceCoachingandReview(int taskid, int id, FormCollection form)
        {
            string message = string.Empty;
            Dictionary <string, string> dict_comments = new Dictionary <string, string>();

            foreach (string key in form.AllKeys)
            {
                dict_comments.Add(key, form[key]);
            }

            List <Model.DTO.Appraisal.PerformanceCoachingComment> lst_comments = new List <Model.DTO.Appraisal.PerformanceCoachingComment>();

            Model.DTO.Appraisal.PerformanceCoachingComment obj_comment = new Model.DTO.Appraisal.PerformanceCoachingComment()
            {
                AppraisalPerformanceCoaching = new Model.DTO.Appraisal.PerformanceCoaching()
                {
                    Id = Convert.ToInt32(dict_comments["KPIID"])
                },
                CommentedTimestamp = DateTime.Now,
                Commentor          = new Model.DTO.Core.Employee()
                {
                    Id = CurrentUser.Id
                },
                //Comments = dict_comments["Comments"].Trim(),
                Comments     = Lib.Utility.Common.ReplaceLineBreaksForDatabase(Uri.UnescapeDataString(dict_comments["Comments"].Trim())),
                FormSaveOnly = true,
            };
            lst_comments.Add(obj_comment);

            if (Model.PMSModel.UpdateAppraisalPerformanceCoachingComment(lst_comments, out message))
            {
                //TempData["AlertMessage"] = "Appraisal information is saved.";
                return(Redirect(Url.Content("~/Stage1Approval/CareerDevelopment/" + taskid + "/" + id)));
            }
            else
            {
                ViewData["appraisalid"]  = id;
                TempData["AlertMessage"] = Resources.Resource.MSG_NEXT_FAIL;
                return(View());
            }
        }
Exemplo n.º 4
0
        public ActionResult PerformanceCoachingandReview(int taskid, int id, FormCollection form)
        {
            string message = string.Empty;
            Dictionary <string, string> dict_comments = new Dictionary <string, string>();

            foreach (string key in form.AllKeys)
            {
                dict_comments.Add(key, form[key]);
            }

            List <Model.DTO.Appraisal.PerformanceCoachingComment> lst_comments = new List <Model.DTO.Appraisal.PerformanceCoachingComment>();

            Model.DTO.Appraisal.PerformanceCoachingComment obj_comment = new Model.DTO.Appraisal.PerformanceCoachingComment()
            {
                AppraisalPerformanceCoaching = new Model.DTO.Appraisal.PerformanceCoaching()
                {
                    Id = Convert.ToInt32(dict_comments["KPIID"])
                },
                CommentedTimestamp = DateTime.Now,
                Commentor          = new Model.DTO.Core.Employee()
                {
                    Id = CurrentUser.Id
                },
                Comments     = dict_comments["Comments"].Trim(),
                FormSaveOnly = true,
            };
            lst_comments.Add(obj_comment);

            if (Model.PMSModel.UpdateAppraisalPerformanceCoachingComment(lst_comments, out message))
            {
                //TempData["AlertMessage"] = "Appraisal information is saved.";
                return(Redirect(Url.Content("~/Stage2Approval/CareerDevelopment/" + taskid + "/" + id)));
            }
            else
            {
                ViewData["appraisalid"]  = id;
                TempData["AlertMessage"] = "Unable to save Appraisal information. Please try again or contact IT Department.";
                return(View());
            }
        }
        public JsonResult PerformanceCoachingandReviewSave(string KPIID, string Comments)
        {
            string message = string.Empty;

            if (!string.IsNullOrEmpty(KPIID) && !string.IsNullOrEmpty(Comments))
            {
                List<Model.DTO.Appraisal.PerformanceCoachingComment> lst_comments = new List<Model.DTO.Appraisal.PerformanceCoachingComment>();

                Model.DTO.Appraisal.PerformanceCoachingComment obj_comment = new Model.DTO.Appraisal.PerformanceCoachingComment()
                {
                    AppraisalPerformanceCoaching = new Model.DTO.Appraisal.PerformanceCoaching() { Id = Convert.ToInt32(KPIID) },
                    CommentedTimestamp = DateTime.Now,
                    Commentor = new Model.DTO.Core.Employee() { Id = CurrentUser.Id },
                    Comments = !string.IsNullOrEmpty(Comments) == true ? Lib.Utility.Common.ReplaceLineBreaksForDatabase(Uri.UnescapeDataString(Comments.Trim())) : null,
                    FormSaveOnly = true,
                };
                lst_comments.Add(obj_comment);

                Model.PMSModel.UpdateAppraisalPerformanceCoachingComment(lst_comments, out message);
            }
            return Json(message);
        }
        public ActionResult PerformanceCoachingandReview(int taskid, int id, FormCollection form)
        {
            string message = string.Empty;
            Dictionary<string, string> dict_comments = new Dictionary<string, string>();
            foreach (string key in form.AllKeys)
            {
                dict_comments.Add(key, form[key]);
            }

            List<Model.DTO.Appraisal.PerformanceCoachingComment> lst_comments = new List<Model.DTO.Appraisal.PerformanceCoachingComment>();

            Model.DTO.Appraisal.PerformanceCoachingComment obj_comment = new Model.DTO.Appraisal.PerformanceCoachingComment()
            {
                AppraisalPerformanceCoaching = new Model.DTO.Appraisal.PerformanceCoaching() { Id = Convert.ToInt32(dict_comments["KPIID"]) },
                CommentedTimestamp = DateTime.Now,
                Commentor = new Model.DTO.Core.Employee() { Id = CurrentUser.Id },
                //Comments = dict_comments["Comments"].Trim(),
                Comments = Lib.Utility.Common.ReplaceLineBreaksForDatabase(Uri.UnescapeDataString(dict_comments["Comments"].Trim())),
                FormSaveOnly = true,
            };
            lst_comments.Add(obj_comment);

            if (Model.PMSModel.UpdateAppraisalPerformanceCoachingComment(lst_comments, out message))
            {
                //TempData["AlertMessage"] = "Appraisal information is saved.";
                return Redirect(Url.Content("~/Stage2Approval/CareerDevelopment/" + taskid + "/" + id));
            }
            else
            {
                ViewData["appraisalid"] = id;
                TempData["AlertMessage"] = Resources.Resource.MSG_NEXT_FAIL;
                return View();
            }
        }