public ActionResult Edit2([Bind(Include = "JobID,CompanyName,Details,Designation,LocationID,Number_of_Positions")] tbl_Student job)
        {
            if (ModelState.IsValid)
            {
                db.Entry(job).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            ViewBag.GraduationID = new SelectList(db.tbl_Graduation, "GraduationID", "GraduationName", job.GraduationID);

            return(View(job));
        }
예제 #2
0
        public ActionResult Edit([Bind(Include = "ApplyId,CertificationID,StudentID,Comments,StatusID")] tbl_Apply tbl_Apply)
        {
            if (ModelState.IsValid)
            {
                db.Entry(tbl_Apply).State = EntityState.Modified;
                db.SaveChanges();

                return(RedirectToAction("Index"));
            }
            List <SelectListItem> li = new List <SelectListItem>
            {
                new SelectListItem()
                {
                    Text = "Request", Value = "1"
                },
                new SelectListItem()
                {
                    Text = "Approved", Value = "2"
                },
                new SelectListItem()
                {
                    Text = "Cancelled", Value = "3"
                }
            };

            ViewBag.CertificationID = new SelectList(db.tbl_Certification, "CertificationID", "CertificationName", tbl_Apply.CertificationID);
            //ViewBag.StatusID = new SelectList(db.tbl_Status, "StatusID", "Status", tbl_Apply.StatusID);
            ViewBag.StatusID  = new SelectList(li, "Value", "Text");
            ViewBag.StudentID = new SelectList(db.tbl_Student, "StudentID", "FirstName", tbl_Apply.StudentID);
            return(View(tbl_Apply));
        }
예제 #3
0
 public ActionResult Edit(tbl_Certification tbl_Certification)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_Certification).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tbl_Certification));
 }
 public ActionResult Edit([Bind(Include = "ApplyId,JobID,StudentID,Skills")] ApplyJob applyjob)
 {
     if (ModelState.IsValid)
     {
         db.Entry(applyjob).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.JobID     = new SelectList(db.Jobs, "JobID", "CompanyName", applyjob.JobID);
     ViewBag.StudentID = new SelectList(db.tbl_Student, "StudentID", "FirstName", applyjob.StudentID);
     return(View(applyjob));
 }
        public ActionResult ResetPasswordforAdmin(tbl_Student obj)
        {
            int a = Convert.ToInt32(Session["AdminID"]);

            using (StudentRepositoryEntities1 db = new StudentRepositoryEntities1())
            {
                tbl_Admin u = db.tbl_Admin.Find(a);
                var       b = db.tbl_Admin.Where(e => e.Email.Equals(obj.Email) && e.LastName.Equals(obj.LastName) && e.Contact.Equals(obj.Contact)).FirstOrDefault();
                if (b != null)
                {
                    b.Password        = obj.Password;
                    db.Entry(b).State = System.Data.Entity.EntityState.Modified;
                    db.SaveChanges();
                }
                return(Content("<html><body><script>alert('Password Changed successfully'); window.location.href = '/Home/StudentLogin';</script></body></html>"));


                //return RedirectToAction("StudentLogin");
            }
        }