public ActionResult confirm(int rid) { TRM t = new TRM(); var r = (from i in t.Requestinfos where i.Request_id == rid select i).FirstOrDefault(); r.Status = "confirmed"; t.SaveChanges(); return(RedirectToAction("Requestprocess", "Login")); }
public ActionResult Spocdb(int trainer, int exicutive) { int rid = int.Parse(Session["Request_id"].ToString()); TRM t = new TRM(); var r = (from i in t.Requestinfos where i.Request_id == rid select i).FirstOrDefault(); r.Exicutive_id = exicutive; r.Trainer_id = trainer; r.Status = "assigned"; t.SaveChanges(); return(RedirectToAction("Requestprocess", "Login")); }
public ActionResult AddRequest(string sk, DateTime sd, DateTime ed, string rn) { TRM t = new TRM(); Requestinfo r = new Requestinfo(); r.Skill = sk; r.Start_date = sd; r.End_date = ed; r.Status = "Request"; int id = int.Parse(Session["id"].ToString()); r.pm_id = id; r.Reqname = rn; t.Requestinfos.Add(r); t.SaveChanges(); return(RedirectToAction("Requestprocess", "Login")); }