public function addStudentAction()
 {
     $student = new Entity\Student();
     $student->setStudentId($_POST["student_id"]);
     $student->setName($_POST["name"]);
     $student->setFaculty($_POST["faculty"]);
     $student->setBatch($_POST["batch"]);
     $student->setAddress($_POST["address"]);
     $student->setNic($_POST["nic"]);
     $telArray = array();
     $contact = new Entity\StudentContact();
     $contact->setStudentId($_POST["student_id"]);
     $telNo1 = $_POST["telNo1"];
     $telNo2 = $_POST["telNo2"];
     //$telArray[]=$contact;
     if ($telNo1 != "") {
         $contact = new Entity\StudentContact();
         $contact->setStudentId($_POST["student_id"]);
         $contact->setContactNo($telNo1);
         $telArray[] = $contact;
     }
     if ($telNo2 != "") {
         $contact2 = new Entity\StudentContact();
         $contact2->setStudentId($_POST["student_id"]);
         $contact2->setContactNo($telNo2);
         $telArray[] = $contact2;
     }
     //$v=$telArray[1];
     //echo $telArray.length;
     cont\StudentDBaccess::addStudent($student, $telArray);
     return $this->render('applicationMainBundle:Default:index.html.twig');
 }