public ActionResult Insert(Application app, Processed_applications pa)
        {
            Application ap = new Application();

            ap.Branch_id = int.Parse(Request.Form["ddlbranch"].ToString());

            ap.Class_id = int.Parse(Request.Form["ddlclass"].ToString());

            ap.Name = Request.Form["txtname"].ToString();

            ap.Age = int.Parse(Request.Form["txtage"].ToString());

            ap.DOB = DateTime.Parse(Request.Form["dtdate"].ToString());

            ap.Address = Request.Form["txtadd"].ToString();

            pa.Comments = "Not yet Processed,check later";
            oaf.Processed_applications.Add(pa);
            oaf.Applications.Add(ap);
            var res = oaf.SaveChanges();

            if (res > 0)
            {
                Response.Write("Your Application has been submitted, Application Id :" + ap.Id);
            }
            return(View());
        }
        public ActionResult Status(Processed_applications pa)
        {
            int id     = int.Parse(Request.Form["txtid"].ToString());
            var status = oaf.Processed_applications.Where(x => x.App_id == id).SingleOrDefault();

            if (status != null)
            {
                if (status.Comments == "Processed")
                {
                    Response.Write("Your application is processed");
                }
                else
                {
                    Response.Write("Your application is yet to be resolved");
                }
            }
            else
            {
                Response.Write("Invalid ID");
            }

            return(View());
        }