private void studentsComboBox_SelectedIndexChanged(object sender, EventArgs e) { var studentReader = new StudentReader(); var currentSelectedItem = studentsComboBox.SelectedItem; if (currentSelectedItem is StudentImport) { currentStudentInComboBox = (StudentImport)currentSelectedItem; } else { throw new Exception("Selected Item is no student!"); } var currentStudent = StudentReader.GetStudentsByCustomerNo((currentStudentInComboBox.CustomerNo)); StudentTextBox.Text = currentStudent.FirstOrDefault().ToAddressString(); importRefId = currentStudentInComboBox.Id; }
public DataSet ExcelToDataSet(StudentImport student) { var excelFilePathFull = GetExcelSheetFullPath(student.CustomerNo); return(ExcelToDataSet(excelFilePathFull)); }
public ActionResult AddStudentImport() { StudentImport student = new StudentImport(); return(PartialView("~/Views/Shared/EditorTemplates/StudentImport.cshtml", student)); }