public ActionResult Approve() { var j = new JobHistory(); int BidId = Int32.Parse(Session["BidId"].ToString()); //job approve in jobhistory table var JobApprove = BidRepo.Get(BidId); j.JobId = JobApprove.JobId; j.BitBy = JobApprove.BidBy; j.Status = "Pending"; j.Rating = 0; //return Content(Bid.ToString()); JobHistoryRepo.Insert(j); // Modify in joblist table var joblist = JobListRepo.Get(JobApprove.JobId); joblist.Status = "Pending"; JobListRepo.Update(joblist); ////Add to messege table two way ato communication //var m = new Messege(); //m.SenderId = postedBy; //m.ReceiverId = Bid; //m.Messege1 = "Hello Mr/Ms " + j.User.Name+" I Have appointed you for this job"; //m.CreatedAt = DateTime.Now; //msgRepo.Insert(m); //var m2 = new Messege(); //m2.SenderId = Bid; //m2.ReceiverId = postedBy; //m2.Messege1 = "Lets Discuss About the Job in details"; //m2.CreatedAt = DateTime.Now; //msgRepo.Insert(m); return(RedirectToAction("Index", "JobList")); }