public ActionResult Interview([Bind(Prefix = "Item1")] List <ViewModels.Interview> Rating, FormCollection frm)
        {
            int       Id_Interviewed;
            DBManager db = new DBManager();

            ViewModels.Interview objInt      = new ViewModels.Interview();
            InterviewComments    IntComments = new InterviewComments();
            int ReqId  = Convert.ToInt32(TempData["ReqId"]);
            int TempId = Convert.ToInt32(TempData["TempId"]);

            Id_Interviewed = Convert.ToInt32(TempData["Id_Interviewed"]);
            TempData.Keep();
            objInt.status   = frm["status"];
            objInt.comments = frm["comments"];
            string swg = System.Web.HttpContext.Current.Session["swgId"].ToString();

            IntComments.InterviewerId = swg;
            IntComments.Comments      = frm["comments"];
            IntComments.Status        = frm["status"];
            IntComments.Datetime      = DateTime.Now;
            if (Id_Interviewed != 0)
            {
                //Update interview table(new comments)
                db.UPDATEInterviews(Id_Interviewed, swg, IntComments.Status);
            }
            else
            {
                Id_Interviewed = db.Interviews(swg, objInt);
                int f = db.SetCandidateMapping(TempId, ReqId, Id_Interviewed);
                foreach (ViewModels.Interview i in Rating)
                {
                    int rating = i.Rating;
                    int skill  = i.SkillId;
                    db.SetRating(Id_Interviewed, rating, skill);
                }
            }
            int f1 = db.Interviewcomments(Id_Interviewed, swg, IntComments, TempId, ReqId);
            int f2 = db.UpdateCommentCandidate(frm["status"], TempId);

            return(RedirectToAction("GetCandidates", "Candidate", new { ReqId = ReqId }));
        }
Exemplo n.º 2
0
        // fill interview details in Interviewcomments
        public static string InterviewsQuerycomment(ViewModels.Interview interview, string swg)
        {
            String Query = "Insert into Interviewcomments (Interviewid,empid,comments,datetime,interviewstatus) values('" + "','" + interview.status + "')";

            return(Query);
        }
Exemplo n.º 3
0
        //Get interview id first interview
        public static string InterviewsQuery(ViewModels.Interview interview, string swg)
        {
            String Query = "Insert into Interviews (InterviewerId,status) Output Inserted.interviewId values('" + swg + "','" + interview.status + "')";

            return(Query);
        }