コード例 #1
0
ファイル: StudentsController.cs プロジェクト: Rashid75/Fyp
        public ActionResult Create(AddStudentVM vm, HttpPostedFileBase upload)
        {
            var id = _work.EnrollDep.Find(x => x.Depid == vm.Depid && x.Campid == vm.Campid).Select(x => x.DepEnrolId);
            int enrollid = id.Single();

            var id2 = _work.EnrollBatch.Find(x => x.batch_id == vm.batch_id && x.DepEnrolId == enrollid).Select(x => x.BatchEnrolId);
            int BatchEnrollId = id2.Single();

            var SecEnrollId = _work.EnrollSection.Find(x => x.sec_id == vm.sec_id && x.BatchEnrolId == BatchEnrollId).Select(x => x.SecEnrolId).Single();

            Files f = new Files();
            Student st = new Student();

            st.Name = vm.Name;
            st.Email = vm.Email;
            st.Phone = vm.Phone;
            st.SecEnrolId = SecEnrollId;
            st.CreateDate = vm.CreateDate;
            st.semester = Semester.First.ToString();

            var errors = ModelState.Values.SelectMany(v => v.Errors);
            if (ModelState.IsValid)
            {
                if (upload != null && upload.ContentLength > 0)
                {

                    string path = Path.Combine(Server.MapPath("~/ProfilePhotos"),
                                      Path.GetFileName(upload.FileName));
                    upload.SaveAs(path);

                    ViewBag.Message = "File uploaded successfully";

                    f.FileName = Path.GetFileName(upload.FileName);
                }

                st.file = f;

                IEnumerable<CourseToDep> Allcourse = _work.CourseToDep.Find(x => x.semester == Semester.First && x.DepEnrolId == enrollid);

                List<StudentRegistration> obj = new List<StudentRegistration>();

                foreach (CourseToDep c in Allcourse)
                {
                    StudentRegistration reg = new StudentRegistration();
                    reg.Grades = Grades.initial;
                    reg.PersonId = f.PersonId;
                    reg.Semester = Semester.First;
                    reg.CId = c.CId;
                    reg.CreateDate = vm.CreateDate;
                    obj.Add(reg);
                }
                st.StudentReg = obj;

                _work.Student.Insert(st);
                _work.Save();

            }
            return RedirectToAction("Index");
        }
コード例 #2
0
 public JsonResult GetAllStudentRecords()
 {
     return(Json(StudentRegistration.getInstance().getAllStudent()));
 }
コード例 #3
0
 public List <Student> GetAllStudents()
 {
     return(StudentRegistration.getInstance().getAllStudent());
 }
コード例 #4
0
 public String DeleteStudentRecord(String regdNum)
 {
     Console.WriteLine("In deleteStudentRecord");
     return(StudentRegistration.getInstance().Remove(regdNum));
 }
コード例 #5
0
 public JsonResult UpdateStudentRecord(Student stdn)
 {
     Console.WriteLine("In updateStudentRecord");
     return(Json(StudentRegistration.getInstance().UpdateStudent(stdn)));
 }
コード例 #6
0
 private static void ValidateStudentRegistrationOnCreate(StudentRegistration studentRegistration)
 {
     ValidateStudentRegistrationIsNull(studentRegistration);
     ValidateStudentRegistrationIds(studentRegistration.StudentId, studentRegistration.RegistrationId);
 }
コード例 #7
0
        private void SaveStudentDetails()
        {
            try
            {
                _studentViewModel = new StudentViewModel();
                // _studentViewModel.StudentModel.Academic_Year = Common.Get_Current_Academic_Year();
                //long? _changedRegistrationNo = string.IsNullOrWhiteSpace(hdnRegistrationNo.Text) ? null : (long?)Convert.ToInt64(hdnRegistrationNo.Text);
                _studentViewModel.StudentModel.StudentID      = string.IsNullOrWhiteSpace(hdnStudentID.Text) ? null : (long?)Convert.ToInt64(hdnStudentID.Text);
                _studentViewModel.StudentModel.RegistrationNo = string.IsNullOrWhiteSpace(txtRegistrationNo.Text) ? null : (long?)Convert.ToInt64(txtRegistrationNo.Text);
                _studentViewModel.StudentModel.FirstName      = txtFirstName.Text.ToProper();
                _studentViewModel.StudentModel.MiddleName     = txtMiddleName.Text.ToProper();
                _studentViewModel.StudentModel.LastName       = txtLastName.Text.ToProper();
                _studentViewModel.StudentModel.FatherName     = txtFatherName.Text.ToProper();
                _studentViewModel.StudentModel.MotherName     = txtMotherName.Text.ToProper();
                _studentViewModel.StudentModel.GenderID       = Convert.ToByte(ddlGender.SelectedValue);
                //_studentViewModel.StudentModel.BirthDate = DateTime.ParseExact(txtMaskedBirthDate.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture);//Convert.ToDateTime(txtMaskedBirthDate.Text);
                //_studentViewModel.StudentModel.RegistrationDate = DateTime.ParseExact(txtMaskedRegistrationDate.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture); //Convert.ToDateTime(txtMaskedRegistrationDate.Text);

                _studentViewModel.StudentModel.BirthDate        = Common.Convert_String_To_Date(txtMaskedBirthDate.Text);
                _studentViewModel.StudentModel.RegistrationDate = Common.Convert_String_To_Date(txtMaskedRegistrationDate.Text);


                _studentViewModel.StudentModel.IsStaffChild   = chkStaffChild.Checked == true ? true : false;
                _studentViewModel.StudentModel.IsTcSubmit     = chkTcAvailable.Checked == true ? true : false;
                _studentViewModel.StudentModel.CurrentClass   = Convert.ToInt16(ddlCurrentClass.SelectedValue) == 0 ? null : (short?)Convert.ToInt16(ddlCurrentClass.SelectedValue);
                _studentViewModel.StudentModel.CurrentSection = Convert.ToInt16(ddlCurrentSection.SelectedValue) == 0 ? null : (Int16?)Convert.ToInt16(ddlCurrentSection.SelectedValue);
                _studentViewModel.StudentModel.StudentImage   = _tcStudentImagebytes;
                _studentViewModel.StudentModel.IsActive       = chkISActive.Checked == true ? true : false;
                _studentViewModel.StudentModel.Is_RTE_Student = chkIsRTEStudent.Checked == true ? true : false;

                _studentViewModel.StudentModel.CountryID        = Convert.ToInt16(ddlNationality.SelectedValue) == 0 ? null : (short?)Convert.ToInt16(ddlNationality.SelectedValue);
                _studentViewModel.StudentModel.ReligionID       = Convert.ToInt16(ddlReligion.SelectedValue) == 0 ? null : (short?)Convert.ToInt16(ddlReligion.SelectedValue);
                _studentViewModel.StudentModel.CasteID          = Convert.ToInt16(ddlCaste.SelectedValue) == 0 ? null : (short?)Convert.ToInt16(ddlCaste.SelectedValue);
                _studentViewModel.StudentModel.TransportRouteID = Convert.ToInt16(ddlTransportArea.SelectedValue) == 0 ? null : (short?)Convert.ToInt16(ddlTransportArea.SelectedValue);

                _studentViewModel.AddressModel.AddressID      = string.IsNullOrWhiteSpace(hdnAddressID.Text) ? null : (long?)Convert.ToInt64(hdnAddressID.Text);
                _studentViewModel.AddressModel.Address        = txtAddress.Text.ToProper();
                _studentViewModel.AddressModel.Pincode        = txtPincode.Text;
                _studentViewModel.AddressModel.LandlineNumber = txtLandlineNo.Text;
                _studentViewModel.AddressModel.MobileNo1      = txtMobileNo1.Text;
                _studentViewModel.AddressModel.MobileNo2      = txtMobileNo2.Text;

                _studentViewModel.ExSchoolModel.ExSchoolID      = string.IsNullOrWhiteSpace(hdnExSchoolID.Text) ? null : (long?)Convert.ToInt64(hdnExSchoolID.Text);
                _studentViewModel.ExSchoolModel.SchoolName      = txtSchoolName.Text.ToProper();
                _studentViewModel.ExSchoolModel.Address         = txtExSchoolAddress.Text.ToProper();
                _studentViewModel.ExSchoolModel.ContactNo       = txtExSchoolContactNo.Text;
                _studentViewModel.ExSchoolModel.EnrollmentClass = Convert.ToInt16(ddlEnrollmentClass.SelectedValue);
                _studentViewModel.ExSchoolModel.TCImage         = _tcFilebytes;
                _studentViewModel.ExSchoolModel.TCNumber        = string.IsNullOrWhiteSpace(txtTCNumber.Text) ? null : (Int32?)Convert.ToInt32(txtTCNumber.Text);
                _studentViewModel.ExSchoolModel.TCFileType      = string.IsNullOrWhiteSpace(hdnTCFileType.Text) ? null : hdnTCFileType.Text;

                _studentAdmission = new StudentRegistration();
                short result = _studentAdmission.SaveStudentDetails(_studentViewModel);
                switch (result)
                {
                case 0:
                    ShowError("\u2022 Registration number already exit.\n");
                    break;

                case 1:
                    MessageBox.Show("Record saved successfully.", "Registration", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    break;

                case -1:
                    ShowError("\u2022 Error! Please try again,\n or contact to admin.\n");
                    break;
                }
            }
            catch (Exception ex)
            {
            }
            finally
            {
                SetDefaultFocus();
            }
        }
コード例 #8
0
        private void LoadStudentDetails(long?RegistrationNumber)
        {
            //txtMaskedRegistrationDate.Text = String.Format("{0:dd/MM/yyyy}", DateTime.Now.ToString("dd/MM/yyyy"));
            //chkISActive.Checked = true;
            //btnSave.Enabled = true;
            // ClearFileds();

            //RadWaitingBar radWaitingBar = new RadWaitingBar();
            //radWaitingBar.WaitingStyle = Telerik.WinControls.Enumerations.WaitingBarStyles.DotsRing;
            //radWaitingBar.WaitingDirection = ProgressOrientation.Left;
            //this.Controls.Add(radWaitingBar);

            // LoadingPanel.ShowPleaseWait();
            try
            {
                _studentAdmission = new StudentRegistration();
                _studentViewModel = new StudentViewModel();
                _studentViewModel = _studentAdmission.GetStudentDetails(RegistrationNumber);

                if (_studentViewModel.ListGender.Count > 0)
                {
                    ddlGender.DataSource    = _studentViewModel.ListGender;
                    ddlGender.DisplayMember = "Type";
                    ddlGender.ValueMember   = "GenderID";
                }

                if (_studentViewModel.ListCountry != null && _studentViewModel.ListCountry.Count > 0)
                {
                    List <CountryModel> listCountry = new List <CountryModel>(_studentViewModel.ListCountry);
                    listCountry.Add(new CountryModel {
                        CountryID = 0, CountryName = "Select"
                    });
                    ddlNationality.DataSource    = listCountry.OrderBy(x => x.CountryID).ToList();
                    ddlNationality.DisplayMember = "CountryName";
                    ddlNationality.ValueMember   = "CountryID";
                }

                if (_studentViewModel.ListReligionType != null && _studentViewModel.ListReligionType.Count > 0)
                {
                    List <ReligionTypeModel> listReligion = new List <ReligionTypeModel>(_studentViewModel.ListReligionType);
                    listReligion.Add(new ReligionTypeModel {
                        ReligionID = 0, ReligionName = "Select"
                    });
                    ddlReligion.DataSource    = listReligion.OrderBy(x => x.ReligionID).ToList();
                    ddlReligion.DisplayMember = "ReligionName";
                    ddlReligion.ValueMember   = "ReligionID";
                }

                if (_studentViewModel.ListCaste != null && _studentViewModel.ListCaste.Count > 0)
                {
                    List <CasteTypeModel> listCaste = new List <CasteTypeModel>(_studentViewModel.ListCaste);
                    listCaste.Add(new CasteTypeModel {
                        CasteID = 0, CasteName = "Select"
                    });
                    ddlCaste.DataSource    = listCaste.OrderBy(x => x.CasteID).ToList();
                    ddlCaste.DisplayMember = "CasteName";
                    ddlCaste.ValueMember   = "CasteID";
                }

                // List<TransportRouteModel> listTransport = new List<TransportRouteModel>()
                if (_studentViewModel.ListTrasport != null && _studentViewModel.ListTrasport.Count > 0)
                {
                    List <TransportRouteModel> listTransport = new List <TransportRouteModel>(_studentViewModel.ListTrasport);
                    listTransport.Add(new TransportRouteModel {
                        RouteID = 0, RouteName = "Select"
                    });
                    ddlTransportArea.DataSource    = listTransport.OrderBy(x => x.RouteID).ToList();
                    ddlTransportArea.DisplayMember = "RouteName";
                    ddlTransportArea.ValueMember   = "RouteID";
                }


                if (_studentViewModel.ListClass.Count > 0)
                {
                    List <ClassTypeModel> listClass = new List <ClassTypeModel>(_studentViewModel.ListClass);
                    ddlEnrollmentClass.DataSource    = _studentViewModel.ListClass;
                    ddlEnrollmentClass.DisplayMember = "ClassName";
                    ddlEnrollmentClass.ValueMember   = "ClassID";

                    //List<ClassModel> listCurrentClass = new List<ClassModel>(_studentViewModel.ListClass);
                    ddlCurrentClass.DataSource    = listClass;
                    ddlCurrentClass.DisplayMember = "ClassName";
                    ddlCurrentClass.ValueMember   = "ClassID";
                }

                if (_studentViewModel.ListClassSection.Count > 0)
                {
                    ddlCurrentSection.DataSource    = _studentViewModel.ListClassSection;
                    ddlCurrentSection.DisplayMember = "SectionName";
                    ddlCurrentSection.ValueMember   = "ClassSectionID";
                }

                //Checking for TC is Issued Or Not
                if (_studentViewModel.Student_TC_Info.Student_ID != null)
                {
                    chkISActive.Enabled = false;
                }
                else
                {
                    chkISActive.Enabled = true;
                }

                if (_studentViewModel.StudentModel.StudentID != null)
                {
                    //Show Group Fee Setting
                    groupFeeSetting.Visible = true;

                    hdnStudentID.Text = Convert.ToString(_studentViewModel.StudentModel.StudentID);
                    //hdnRegistrationNo.Text = Convert.ToString(_studentViewModel.StudentModel.RegistrationNo);
                    txtRegistrationNo.Text = Convert.ToString(_studentViewModel.StudentModel.RegistrationNo);
                    hdnRegistrationNo.Text = Convert.ToString(_studentViewModel.StudentModel.RegistrationNo);
                    txtFirstName.Text      = Convert.ToString(_studentViewModel.StudentModel.FirstName);
                    txtMiddleName.Text     = Convert.ToString(_studentViewModel.StudentModel.MiddleName);
                    txtLastName.Text       = Convert.ToString(_studentViewModel.StudentModel.LastName);
                    txtFatherName.Text     = Convert.ToString(_studentViewModel.StudentModel.FatherName);
                    txtMotherName.Text     = Convert.ToString(_studentViewModel.StudentModel.MotherName);

                    if (_studentViewModel.StudentModel.CountryID != null)
                    {
                        ddlNationality.SelectedValue = Convert.ToInt16(_studentViewModel.StudentModel.CountryID);
                    }

                    if (_studentViewModel.StudentModel.ReligionID != null)
                    {
                        ddlReligion.SelectedValue = Convert.ToInt16(_studentViewModel.StudentModel.ReligionID);
                    }

                    if (_studentViewModel.StudentModel.CasteID != null)
                    {
                        ddlCaste.SelectedValue = Convert.ToInt16(_studentViewModel.StudentModel.CasteID);
                    }

                    if (_studentViewModel.StudentModel.TransportRouteID != null)
                    {
                        ddlTransportArea.SelectedValue = Convert.ToInt16(_studentViewModel.StudentModel.TransportRouteID);
                    }

                    if (_studentViewModel.StudentModel.GenderID != null)
                    {
                        ddlGender.SelectedValue = Convert.ToByte(_studentViewModel.StudentModel.GenderID);
                    }

                    if (_studentViewModel.StudentModel.CurrentClass != null)
                    {
                        ddlCurrentClass.SelectedValue = Convert.ToInt16(_studentViewModel.StudentModel.CurrentClass);
                    }

                    if (_studentViewModel.StudentModel.CurrentSection != null)
                    {
                        ddlCurrentSection.SelectedValue = Convert.ToInt16(_studentViewModel.StudentModel.CurrentSection);
                    }

                    if (_studentViewModel.StudentModel.BirthDate != null)
                    {
                        txtMaskedBirthDate.Text = String.Format("{0:dd.MM.yyyy}", _studentViewModel.StudentModel.BirthDate);
                    }

                    if (_studentViewModel.StudentModel.RegistrationDate != null)
                    {
                        txtMaskedRegistrationDate.Text = String.Format("{0:dd.MM.yyyy}", _studentViewModel.StudentModel.RegistrationDate);
                    }

                    if (_studentViewModel.StudentModel.IsTcSubmit == true)
                    {
                        chkTcAvailable.Checked = true;
                    }

                    if (_studentViewModel.StudentModel.IsStaffChild == true)
                    {
                        chkStaffChild.Checked = true;
                    }

                    if (_studentViewModel.StudentModel.IsActive == true)
                    {
                        chkISActive.Checked = true;
                    }
                    else
                    {
                        chkISActive.Checked = false;
                    }

                    if (_studentViewModel.StudentModel.Is_RTE_Student == true)
                    {
                        chkIsRTEStudent.Checked = true;
                    }
                    else
                    {
                        chkIsRTEStudent.Checked = false;
                    }

                    if (_studentViewModel.StudentModel.StudentImage != null)
                    {
                        MemoryStream memoryStream = new MemoryStream(_studentViewModel.StudentModel.StudentImage);
                        pictureStudent.Image             = new Bitmap(memoryStream);
                        pictureStudent.SizeMode          = PictureBoxSizeMode.Zoom;
                        lblStudentImage.Visible          = true;
                        lblStudentImage.Text             = "Image attached.";
                        linkDownloadStudentImage.Visible = true;
                        _tcStudentImagebytes             = _studentViewModel.StudentModel.StudentImage;
                    }
                    else
                    {
                        lblStudentImage.Visible = true;
                        lblStudentImage.Text    = "Image not attached.";
                    }

                    if (_studentViewModel.StudentModel.IsNewAdmission == true)
                    {
                        lblGenerateAdmissionFee.Visible = true;
                        btnGenerateFee.Visible          = true;
                    }
                    else
                    {
                        lblGenerateAdmissionFee.Visible = false;
                        btnGenerateFee.Visible          = false;
                    }

                    hdnAddressID.Text  = Convert.ToString(_studentViewModel.AddressModel.AddressID);
                    txtAddress.Text    = Convert.ToString(_studentViewModel.AddressModel.Address);
                    txtPincode.Text    = Convert.ToString(_studentViewModel.AddressModel.Pincode);
                    txtLandlineNo.Text = Convert.ToString(_studentViewModel.AddressModel.LandlineNumber);
                    txtMobileNo1.Text  = Convert.ToString(_studentViewModel.AddressModel.MobileNo1);
                    txtMobileNo2.Text  = Convert.ToString(_studentViewModel.AddressModel.MobileNo2);

                    hdnExSchoolID.Text        = Convert.ToString(_studentViewModel.ExSchoolModel.ExSchoolID);
                    hdnTCFileType.Text        = _studentViewModel.ExSchoolModel.TCFileType;
                    txtSchoolName.Text        = Convert.ToString(_studentViewModel.ExSchoolModel.SchoolName);
                    txtTCNumber.Text          = Convert.ToString(_studentViewModel.ExSchoolModel.TCNumber);
                    txtExSchoolContactNo.Text = Convert.ToString(_studentViewModel.ExSchoolModel.ContactNo);
                    txtExSchoolAddress.Text   = Convert.ToString(_studentViewModel.ExSchoolModel.Address).ToProper();


                    if (_studentViewModel.ExSchoolModel.EnrollmentClass != null)
                    {
                        ddlEnrollmentClass.SelectedValue = Convert.ToInt16(_studentViewModel.ExSchoolModel.EnrollmentClass);
                    }

                    if (_studentViewModel.StudentModel.TransportRouteID != null)
                    {
                        ddlTransportArea.SelectedValue = Convert.ToInt32(_studentViewModel.StudentModel.TransportRouteID);
                    }

                    if (_studentViewModel.ExSchoolModel.TCImage != null)
                    {
                        lblTCFile.Visible          = true;
                        lblTCFile.Text             = "File attached.";
                        linkDownloadTCFile.Visible = true;
                        _tcFilebytes = _studentViewModel.ExSchoolModel.TCImage;
                    }
                    else
                    {
                        lblTCFile.Visible = true;
                        lblTCFile.Text    = "File not attached.";
                    }
                }
                else
                {
                    if (RegistrationNumber != null)
                    {
                        ClearFileds();
                        ShowError("\u2022 Sorry! No record found.\n Please enter correct Registration Number.");
                        txtRegistrationNo.Text = Convert.ToString(RegistrationNumber);
                    }

                    //Hide Group Fee Setting
                    groupFeeSetting.Visible = false;
                }
            }
            catch (Exception ex)
            {
                ShowError("\u2022 Error! Please contact to admin.");
                btnSave.Enabled = false;
            }
            finally
            {
                // SetDefaultFocus();
                //  LoadingPanel.HidePleaseWait();
            }
        }
コード例 #9
0
ファイル: StudentUpdater.cs プロジェクト: voxes96/ZAI-Capri
        public async Task <IServiceResult <StudentViewModel> > Update(
            int id,
            StudentRegistration newData)
        {
            if (newData.ProposalId != null)
            {
                var proposal = await _context.Proposals.FirstOrDefaultAsync(p => p.Id == newData.ProposalId);

                if (proposal == null)
                {
                    return(ServiceResult <StudentViewModel> .Error(
                               $"The proposal with id {newData.ProposalId} does not exist"
                               ));
                }
            }

            var isIndexNumberTaken = await IsIndexNumberTaken(id, newData.IndexNumber);

            if (isIndexNumberTaken)
            {
                return(ServiceResult <StudentViewModel> .Error(
                           $"Index number {newData.IndexNumber} is already taken"
                           ));
            }

            var existingStudent =
                await _context
                .Students
                .FirstOrDefaultAsync(p => p.Id == id);

            if (existingStudent == null)
            {
                return(ServiceResult <StudentViewModel> .Error(
                           $"Student with id {id} does not exist"));
            }

            var credentials = new UserCredentials
            {
                Email    = newData.Email,
                Password = newData.Password
            };

            var result = await _userUpdater.Update(
                existingStudent.UserId,
                credentials,
                new RoleType[] {
                RoleType.Student
            });

            if (!result.Successful())
            {
                var errors = result.GetAggregatedErrors();
                return(ServiceResult <StudentViewModel> .Error(errors));
            }

            existingStudent = _mapper.Map(newData, existingStudent);

            _context.Students.Update(existingStudent);
            await _context.SaveChangesAsync();

            var studentViewModel = _mapper.Map <StudentViewModel>(existingStudent);

            return(ServiceResult <StudentViewModel> .Success(studentViewModel));
        }
コード例 #10
0
 public void AddNewRecord(StudentRegistration newRecord)
 {
     _libraryUnitOfWork.StudentRegistrationRepository.Add(newRecord);
     _libraryUnitOfWork.Save();
 }
 public String PutStudentRecord(Student stdn)
 {
     Console.WriteLine("In updateStudentRecord");
     return(StudentRegistration.getInstance().UpdateStudent(stdn));
 }
コード例 #12
0
ファイル: StudentsForm.cs プロジェクト: Gauss-IT/GaussLMS
 private void button2_Click(object sender, EventArgs e)
 {
     var studentRegistrationForm = new StudentRegistration();
     studentRegistrationForm.Show();
 }
 public Student DeleteStudent(String registrationNumber)
 {
     return(StudentRegistration.getInstance().Remove(registrationNumber));
 }
コード例 #14
0
        public ActionResult Index(StudentRegistration sm)
        {
            if (ModelState.IsValid)
            {
                ViewBag.Name          = sm.Name;
                ViewBag.Rno           = sm.Rno;
                ViewBag.Age           = sm.Age;
                ViewBag.DOB           = sm.DOB;
                ViewBag.Gender        = sm.Gender;
                ViewBag.StudentCourse = sm.StudentCourse;
                ViewBag.Email         = sm.Email;
                ViewBag.PhoneNumber   = sm.PhoneNumber;
                ViewBag.Ssc           = sm.Ssc;
                ViewBag.Hsc           = sm.Hsc;
                return(View());
            }
            else
            {
                ViewBag.Name          = "No Data";
                ViewBag.Rno           = "No Data";
                ViewBag.Age           = "No Data";
                ViewBag.DOB           = "No Data";
                ViewBag.Gender        = "No Data";
                ViewBag.StudentCourse = "No Data";
                ViewBag.Course        = "No Data";
                ViewBag.Email         = "No Data";
                ViewBag.PhoneNumber   = "No Data";
                ViewBag.Ssc           = "No Data";
                ViewBag.Hsc           = "No Data";
                return(View());
            }

            /*
             * public ActionResult Index(string name,string rno, string age, string dob, string gender, string email,string phone, string ssc, string hsc)
             * {
             *
             *
             * if (ModelState.IsValid)
             * {
             *  ViewBag.Name = name;
             *  ViewBag.Rno = rno;
             *  ViewBag.Age = age;
             *  ViewBag.DOB = dob;
             *  ViewBag.Gender = gender;
             *  ViewBag.Email = email;
             *  ViewBag.PhoneNumber = phone;
             *  ViewBag.Ssc = ssc;
             *  ViewBag.Hsc = hsc;
             *  return View();
             * }
             * else
             * {
             *
             *  ViewBag.Name = "No Data";
             *  ViewBag.Rno = "No Data";
             *  ViewBag.Age = "No Data";
             *  ViewBag.DOB = "No Data";
             *  ViewBag.Gender = "No Data";
             *  ViewBag.Course = "No Data";
             *  ViewBag.Email = "No Data";
             *  ViewBag.PhoneNumber = "No Data";
             *  ViewBag.Ssc = "No Data";
             *  ViewBag.Hsc = "No Data";
             *  return View();
             * }*/
        }