public ActionResult ReviewManagersComment(QuadrantMeasuresViewModel objQuadViewModel)
        {
            try
            {
                cReviewRating objReviewRating = cReviewRating.Create();
                objReviewRating.sManagerComment       = objQuadViewModel.objReviewRating.sManagerComment;
                objReviewRating.sManagerSignature     = objQuadViewModel.ManagerName;
                objReviewRating.objRatings.iObjectID  = objQuadViewModel.objReviewRating.objRatings;
                objReviewRating.objEmpLogin.iObjectID = objQuadViewModel.hdnEmployeeID;
                objReviewRating.Save();
                Session["RevMgrComment"]       = "Manager Comment added successfully";
                objQuadrantMeasure.RatingModel = getRatingList();
                DataTable dt = cQuadrantMeasure.getEmployeeManagerName(objQuadViewModel.hdnEmployeeID);
                objQuadrantMeasure.ManagerName  = dt.Rows[0]["ManagerName"].ToString();
                objQuadrantMeasure.EmployeeName = dt.Rows[0]["EmployeeName"].ToString();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(RedirectToAction("ManagerReviewRating/" + objQuadViewModel.hdnEmployeeID));
            //  return View(objQuadrantMeasure);
            //return RedirectToAction("ManagerReviewRating");

            //return RedirectToAction("ManagerReviewRating", objQuadViewModel.hdnEmployeeID);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Finds and return cReviewRating objects matching the specified criteria
        /// </summary>
        /// <param name="i_oFilter">Filter criteria (WHERE clause)</param>
        /// <returns>cReviewRating objects</returns>
        public static List <cReviewRating> Find(cFilter i_oFilter)
        {
            DataTable            dt = Find_DataTable(i_oFilter, null);
            List <cReviewRating> l  = new List <cReviewRating>();
            cReviewRating        oObj;

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                oObj                   = new cReviewRating();
                oObj.m_iID             = Convert.ToInt32(dt.Rows[i]["iID"]);
                oObj.m_sName           = dt.Rows[i]["sName"].ToString();
                oObj.m_dtCreatedOn     = Convert.ToDateTime(dt.Rows[i]["dtCreatedOn"]);
                oObj.m_dtLastUpdatedOn = Convert.ToDateTime(dt.Rows[i]["dtLastUpdatedOn"]);

                oObj.m_sManagerComment       = Convert.ToString(dt.Rows[i]["sManagerComment"]);
                oObj.m_objRatings.iObjectID  = Convert.ToInt32(dt.Rows[i]["objRatings"].ToString());
                oObj.m_sManagerSignature     = Convert.ToString(dt.Rows[i]["sManagerSignature"]);
                oObj.m_sEmployeeAcceptance   = Convert.ToString(dt.Rows[i]["sEmployeeAcceptance"]);
                oObj.m_sEmployeeSignature    = Convert.ToString(dt.Rows[i]["sEmployeeSignature"]);
                oObj.m_objEmpLogin.iObjectID = Convert.ToInt32(dt.Rows[i]["objEmpLogin"].ToString());
                oObj.m_iEmployeeID           = Convert.ToInt32(dt.Rows[i]["iEmployeeID"]);
                oObj.m_bEmpFlag     = Convert.ToBoolean(dt.Rows[i]["bEmpFlag"]);
                oObj.m_bManagerFlag = Convert.ToBoolean(dt.Rows[i]["bManagerFlag"]);
                oObj.m_bInvalid     = false;
                l.Add(oObj);
            }
            return(l);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Creates a cReviewRating object. It will be saved in permanent storage only
        /// on calling Save()
        /// </summary>
        /// <returns>cReviewRating object</returns>
        public static cReviewRating Create()
        {
            cReviewRating oObj = new cReviewRating();

            SecurityCheck((int)enReviewRating_Action.Create);

            // Create an object in memory, will be saved to storage on calling Save()
            oObj.m_bCreating = true;
            oObj.m_bInvalid  = false;
            return(oObj);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Ensures that an object with the specified name exists, while creating other properties are set to their default values
        /// </summary>
        /// <param name="i_sName">Name</param>
        /// <returns>cReviewRating object</returns>
        public static cReviewRating CreateIfRequiredAndGet(string i_sName)
        {
            cReviewRating oObj = cReviewRating.Get_Name(i_sName);

            if (oObj == null)
            {
                oObj       = cReviewRating.Create();
                oObj.sName = i_sName;
                oObj.Save();
            }
            return(oObj);
        }
 public ActionResult ManagersComment(QuadrantMeasuresViewModel objQuadViewModel)
 {
     try
     {
         cReviewRating objReviewRating = cReviewRating.Create();
         objReviewRating.sManagerComment       = objQuadViewModel.objReviewRating.sManagerComment;
         objReviewRating.sManagerSignature     = objQuadViewModel.ManagerName;
         objReviewRating.objRatings.iObjectID  = objQuadViewModel.objReviewRating.objRatings;
         objReviewRating.objEmpLogin.iObjectID = Convert.ToInt32(HttpContext.User.Identity.Name);
         objReviewRating.Save();
         ViewBag.DataSaved = "External head added successfully";
         //objQuadrantMeasure.RatingModel = getRatingList();
         //int LoginId = Convert.ToInt32(HttpContext.User.Identity.Name);
         //DataTable dt = cQuadrantMeasure.getEmployeeManagerName(LoginId);
         //objQuadrantMeasure.ManagerName = dt.Rows[0]["ManagerName"].ToString();
         // return View(objQuadrantMeasure);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(RedirectToAction("ReviewRatings"));
 }
Exemplo n.º 6
0
using System;