Пример #1
0
        public ActionResult Student(registrationdetail obj)

        {
            if (obj != null)
            {
                return(View(obj));
            }
            else
            {
                return(View());
            }
        }
Пример #2
0
 public ActionResult AddStudent(registrationdetail m)
 {
     if (ModelState.IsValid)
     {
         registrationdetail obj = new registrationdetail();
         obj.firstname       = m.firstname;
         obj.lastname        = m.lastname;
         obj.email           = m.email;
         obj.rollno          = m.rollno;
         obj.student_address = m.student_address;
         obj.student_state   = m.student_state;
         obj.mobile          = m.mobile;
         dbobj.registrationdetails.Add(obj);
         dbobj.SaveChanges();
     }
     ModelState.Clear();
     return(View("Student"));
 }