コード例 #1
0
 private void studentRegisterdButton_Click(object sender, EventArgs e)
 {
     string msg;
     StudentInformation aStudentInformation = new StudentInformation(studentRegisteredNoTextBos.Text, studentNameTextBox.Text, studentEmailTextBox.Text);
     msg = aDepertment.RegisterStudent(aStudentInformation);
     MessageBox.Show(msg);
 }
コード例 #2
0
        public async Task <IActionResult> Edit(int id, [Bind("AccountId,ClassId,FirstName,LastName,Phone,Address,BirthDay,CreateAt,UpdateAt")] StudentInformation studentInformation)
        {
            if (id != studentInformation.AccountId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(studentInformation);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!StudentInformationExists(studentInformation.AccountId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["AccountId"] = new SelectList(_context.Account, "Id", "Id", studentInformation.AccountId);
            ViewData["ClassId"]   = new SelectList(_context.Classroom, "Id", "Id", studentInformation.ClassId);
            return(View(studentInformation));
        }
コード例 #3
0
        public List <StudentInformation> ShowStudentInformations(string studentId)
        {
            Query = "SELECT * FROM StudentInformation WHERE StudentId='" + studentId + "'";

            Command = new SqlCommand(Query, Connection);

            Connection.Open();

            Reader = Command.ExecuteReader();

            List <StudentInformation> informations = new List <StudentInformation>();

            while (Reader.Read())
            {
                StudentInformation aStudentInformation = new StudentInformation();

                aStudentInformation.StudentInformationId = (int)Reader["StudentInformationId"];
                aStudentInformation.StudentName          = Reader["StudentName"].ToString();
                aStudentInformation.StudentId            = Reader["StudentId"].ToString();
                aStudentInformation.StudentEmail         = Reader["StudentEmail"].ToString();
                aStudentInformation.BloodGroup           = Reader["BloodGroup"].ToString();


                informations.Add(aStudentInformation);
            }

            Reader.Close();
            Connection.Close();

            return(informations);
        }
コード例 #4
0
        private void MoveToDownStudent(int index)
        {
            int largerChild;
            StudentInformation top = agacDugumleri[index];

            while (index < currentSize / 2)
            {
                int leftChild  = 2 * index + 1;
                int rightChild = leftChild + 1;

                if (rightChild < currentSize && agacDugumleri[leftChild].schoolDepartments[0].GPA < agacDugumleri[rightChild].schoolDepartments[0].GPA)
                {
                    largerChild = rightChild;
                }
                else
                {
                    largerChild = leftChild;
                }
                if (top.schoolDepartments[0].GPA > agacDugumleri[largerChild].schoolDepartments[0].GPA)
                {
                    break;
                }
                agacDugumleri[index] = agacDugumleri[largerChild];
                index = largerChild;
            }
            agacDugumleri[index] = top;
        }
コード例 #5
0
        void loadStudentInformation(string StudentCode)
        {
            StudentInformation item = StudentInformationDAO.Instance.loadStudentInformationlist(StudentCode);

            this.txbDisplayNameStudent.Text = item.HoTen;

            txbCodeStudent.AppendText(item.MaHocSinh);

            txbName.AppendText(item.HoTen);

            if (item.GioiTinh)
                ckbMale.Checked = true;
            else
                ckbFemale.Checked = true;

            DateTime d = item.NgaySinh;
            txbDateBorn.AppendText(d.ToString("dd/MM/yyyy"));

            this.txbNativeBorn.AppendText(item.NoiSinh);

            this.txbAddress.AppendText(item.DiaChi);

            this.txbNation.AppendText(item.MaDanToc);

            this.txbReligion.AppendText(item.MaTonGiao);

            this.txbParentName.AppendText(item.TenNguoiThan);

        }
コード例 #6
0
        public DataTable EvaluationInformationInTextboxBLL(StudentInformation aStudent, string details)
        {
            StudentInformatioDAL aStudentInformation = new StudentInformatioDAL();
            DataTable            dt = aStudentInformation.EvaluationInformationInTextboxDAL(aStudent, details);

            return(dt);
        }
コード例 #7
0
ファイル: DataManager.cs プロジェクト: arslan77/FYP
        public List <StudentInformation> getStudentsFromClass(int classID)
        {
            List <StudentInformation> list     = new List <StudentInformation>();
            List <Student>            students = db.Students.Where(o => o.Classes.Any(c => c.classID == classID)).ToList <Student>();

            foreach (var item in students)
            {
                StudentInformation obj = new StudentInformation();
                obj.rollNo      = item.rollNo;
                obj.studentName = item.fullName;
                obj.fatherName  = item.fatherName;
                obj.gender      = item.gender;
                if (item.guardianID.HasValue)
                {
                    obj.guardianId = item.guardianID + "";
                }
                else
                {
                    obj.guardianId = "-1";
                }
                obj.sessionName = db.Sessions.Find(item.sessionID).name;
                list.Add(obj);
            }
            return(list);
        }
コード例 #8
0
        /// <summary>
        /// Analyze data for separate groups and record.
        /// </summary>
        /// <param name="students"></param>
        /// <param name="groupName"></param>
        /// <param name="results"></param>
        /// <returns></returns>
        private static GroupInformation InvestigateForEachGroup(List <Students> students, string groupName, out List <int> results)
        {
            List <StudentInformation> stInfoList = new List <StudentInformation>();
            List <int> groupResults = new List <int>();

            foreach (Students student in students)
            {
                StudentInformation stInfo = new StudentInformation
                {
                    Name    = student.Name,
                    Average = (int)Math.Round((decimal)(
                                                  (student.Math * 40) +
                                                  (student.Physics * 35) +
                                                  (student.English * 25)) / 100)
                };
                groupResults.AddRange(new List <int> {
                    student.Math, student.English, student.Physics
                });
                stInfoList.Add(stInfo);
            }

            results = groupResults;
            GroupInformation GroupInfo = new GroupInformation
            {
                Group        = groupName,
                StudentsInfo = stInfoList,
                Median       = CalculateMedian(groupResults),
                Modus        = CalculateModus(groupResults),
                Average      = CalculateAverage(groupResults)
            };

            return(GroupInfo);
        }
        private List <StudentInformation> ImportStudents()
        {
            List <StudentInformation> studentList = new List <StudentInformation>();

            List <BusinessOfferInformation> businessOfferInformations    = InformationBase.Offers.GetAll().ToList();
            List <ContactInformation>       contactInformations          = InformationBase.Contact.GetAll().ToList();
            List <IDInformation>            IDInformations               = InformationBase.ID.GetAll().ToList();
            List <InternCompany>            internCompanies              = InformationBase.Intern.GetAll().ToList();
            List <PersonelInformation>      personelInformations         = InformationBase.Personel.GetAll().ToList();
            List <DepartmentInformation>    schoolDepartmentInformations = InformationBase.Department.GetAll().ToList();
            List <VolunteerInformation>     volunteerInformations        = InformationBase.Volunteer.GetAll().ToList();


            for (int numberRecorder = 0; numberRecorder < IDInformations.Count; numberRecorder++)
            {
                StudentInformation studentInformation = new StudentInformation();

                studentInformation.businessOffers            = GetStudentOffers(numberRecorder, businessOfferInformations);
                studentInformation.contactInformation        = contactInformations[numberRecorder];
                studentInformation.identificationInformation = IDInformations[numberRecorder];
                studentInformation.internCompanies           = GetStudentIntern(numberRecorder, internCompanies);
                studentInformation.personelInformation       = personelInformations[numberRecorder];
                studentInformation.schoolDepartments         = GetSchoolInformation(numberRecorder, schoolDepartmentInformations);
                studentInformation.volunteerInformations     = GetStudentVolunteer(numberRecorder, volunteerInformations);

                studentList.Add(studentInformation);
            }

            return(studentList);
        }
コード例 #10
0
        private void EvaluationdataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            string             Details  = Evaluation_CourseDetailscomboBox1.Text;
            StudentInformation aStudent = new StudentInformation();

            aStudent.StudentID = EvaluationdataGridView1.SelectedRows[0].Cells[0].Value.ToString();
            aStudent.CID       = EvaluationdataGridView1.SelectedRows[0].Cells[2].Value.ToString();

            StudentInformationBLL aStudents = new StudentInformationBLL();
            DataTable             dt2       = aStudents.EvaluationInformationInTextboxBLL(aStudent, Details);

            try
            {
                EvaluationCoursetextBox1.Text       = dt2.Rows[0][16].ToString();
                Evaluation_StudentNametextBox2.Text = dt2.Rows[0][3].ToString();
                EvaluationStudenIDtextBox3.Text     = dt2.Rows[0][2].ToString();

                Quiz_1textBox12.Text      = dt2.Rows[0][7].ToString();
                Quiz_2textBox10.Text      = dt2.Rows[0][8].ToString();
                Quiz_3textBox14.Text      = dt2.Rows[0][9].ToString();
                QUIZ_textBox9.Text        = dt2.Rows[0][10].ToString();
                Attendance_textBox8.Text  = dt2.Rows[0][4].ToString();
                AssignmenttextBox4.Text   = dt2.Rows[0][6].ToString();
                MidtermtextBox5.Text      = dt2.Rows[0][11].ToString();
                FinaltextBox6.Text        = dt2.Rows[0][12].ToString();
                PresentationtextBox7.Text = dt2.Rows[0][5].ToString();
                TotalMarkstextBox13.Text  = dt2.Rows[0][13].ToString();
                EvaluationGrade.Text      = dt2.Rows[0][14].ToString();
            }
            catch
            {
                MessageBox.Show("dufgy");
            }
        }
コード例 #11
0
        private void SaveorUpdateEvaluationbutton1_Click(object sender, EventArgs e)
        {
            Course aCourse = new Course();

            aCourse.CourseID = EvaluationCoursetextBox1.Text;

            StudentInformation aStudent = new StudentInformation();

            aStudent.StudentID       = EvaluationStudenIDtextBox3.Text;
            aStudent.Quiz1           = float.Parse(Quiz_1textBox12.Text);
            aStudent.Quiz2           = float.Parse(Quiz_2textBox10.Text);
            aStudent.Quiz3           = float.Parse(Quiz_3textBox14.Text);
            aStudent.QUIZ            = float.Parse(QUIZ_textBox9.Text);
            aStudent.Assignment      = float.Parse(AssignmenttextBox4.Text);
            aStudent.Attendance      = float.Parse(Attendance_textBox8.Text);
            aStudent.Presentation    = float.Parse(PresentationtextBox7.Text);
            aStudent.Mid             = float.Parse(MidtermtextBox5.Text);
            aStudent.Final           = float.Parse(FinaltextBox6.Text);
            aStudent.Total           = float.Parse(TotalMarkstextBox13.Text);
            aStudent.EvaluationGrade = EvaluationGrade.Text;

            StudentInformationBLL aStudents = new StudentInformationBLL();
            bool res = aStudents.SaveEvaluationBLL(aStudent, aCourse);

            if (res)
            {
                MessageBox.Show("Marks Evaluated Successfully!!!");
                clearCourseTextBoxes();
                LoadCoursesDataGridView();
            }
            else
            {
                MessageBox.Show("Error!");
            }
        }
コード例 #12
0
        public string StudentInformationSave(StudentInformation aStudentInformation)
        {
            bool isStudentIdExists = aStudentInformationGateway.IsStudentIdExists(aStudentInformation);

            if (isStudentIdExists)
            {
                return("The Student Id Already Exists");
            }

            else
            {
                bool isEmailExist = aStudentInformationGateway.IsEmailExists(aStudentInformation);

                if (isEmailExist)
                {
                    return("Email Already Exists");
                }
                else
                {
                    int rowAffected = aStudentInformationGateway.NewRegistrationSave(aStudentInformation);

                    if (rowAffected > 0)
                    {
                        return("Student Information Saved successfully");
                    }
                    else
                    {
                        return("Save failed");
                    }
                }
            }
        }
コード例 #13
0
        public IHttpActionResult PutStudentInformation(StudentInformation studentInformation)
        {
            int id = studentInformation.StudentId;

            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != studentInformation.StudentId)
            {
                return(BadRequest());
            }

            db.Entry(studentInformation).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!StudentInformationExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
コード例 #14
0
        public bool DeleteAccount()
        {
            try
            {
                LoginBase.MemberStudent.Remove(memberStudent);
                LoginBase.Complete();

                StudentInformation studentInformation = ViewStudentInformation();

                InformationBase.ID.Remove(studentInformation.identificationInformation);
                InformationBase.Contact.Remove(studentInformation.contactInformation);
                InformationBase.Personel.Remove(studentInformation.personelInformation);

                InformationBase.Department.RemoveAll(studentID);
                InformationBase.Intern.RemoveAll(studentID);
                InformationBase.Volunteer.RemoveAll(studentID);
                InformationBase.Offers.RemoveAll(studentID);

                InformationBase.Complete();

                return(true);
            }

            catch
            {
                return(false);
            }
        }
コード例 #15
0
        public async Task <IActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            var studentInformationVM = new StudentInformationVM();

            {
                StudentInformation studentInformation = await _context.StudentInformation.SingleOrDefaultAsync(c =>
                                                                                                               c.StudentID == id);

                if (studentInformation == null)
                {
                    return(NoContent());
                }
                studentInformationVM.StudentID         = studentInformation.StudentID;
                studentInformationVM.StudentName       = studentInformation.StudentName;
                studentInformationVM.FathersName       = studentInformation.FathersName;
                studentInformationVM.MothersName       = studentInformation.MothersName;
                studentInformationVM.DOB               = studentInformation.DOB;
                studentInformationVM.Religion          = studentInformation.Religion;
                studentInformationVM.GurdiansCellPhone = studentInformation.GurdiansCellPhone;
                studentInformationVM.StudentAddress    = studentInformation.StudentAddress;
                studentInformationVM.ImagePath         = studentInformation.ImagePath;

                studentInformationVM.ClassID = studentInformation.ClassID;
            }
            ViewData["ClassID"] = new SelectList(_context.ClassInformation, "ClassID", "ClassName", studentInformationVM.ClassID);
            return(View(studentInformationVM));
        }
コード例 #16
0
        public bool SaveEvaluationBLL(StudentInformation aStudent, Course aCourse)
        {
            StudentInformatioDAL aStudents = new StudentInformatioDAL();
            bool res = aStudents.SaveEvaluationDAL(aStudent, aCourse);

            return(res);
        }
コード例 #17
0
        private void MoveToDownStudent(int index)
        {
            int largerChild;
            StudentInformation top = agacDugumleri[index];

            while (index < currentSize / 2)
            {
                int leftChild  = 2 * index + 1;
                int rightChild = leftChild + 1;

                if (rightChild < currentSize && string.Compare(agacDugumleri[leftChild].personelInformation.KnowledgeEnglish, agacDugumleri[rightChild].personelInformation.KnowledgeEnglish) == -1)
                {
                    largerChild = rightChild;
                }
                else
                {
                    largerChild = leftChild;
                }
                if (string.Compare(top.personelInformation.KnowledgeEnglish, agacDugumleri[largerChild].personelInformation.KnowledgeEnglish) == 1)
                {
                    break;
                }
                agacDugumleri[index] = agacDugumleri[largerChild];
                index = largerChild;
            }
            agacDugumleri[index] = top;
        }
コード例 #18
0
        private StudentInformation Remove(int index)
        {
            StudentInformation root = agacDugumleri[index];

            agacDugumleri[index] = agacDugumleri[--currentSize];
            MoveToDownStudent(index);
            return(root);
        }
コード例 #19
0
        public ActionResult DeleteConfirmed(string id)
        {
            StudentInformation studentInformation = db.Students.Find(id);

            db.Students.Remove(studentInformation);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #20
0
        public StudentInformation loadStudentInformationlist(string StudentCode)
        {
            DataTable data = DataProvider.Instance.ExecuteQuery("usp_GetStudentInformationByStudentCode @MaHocSinh ='" + StudentCode + "'");

            StudentInformation Infor = new StudentInformation(data);

            return(Infor);
        }
コード例 #21
0
        public ActionResult NewRegistrationSave(StudentInformation aStudentInformation)
        {
            List <StudentInformation> bloodGroups = GetAllBloodGroup();

            ViewBag.bloodGroups = bloodGroups.ToList();
            ViewBag.Message     = aStudentInformationManager.StudentInformationSave(aStudentInformation);

            return(View());
        }
コード例 #22
0
 //method for filling the student grid with student information panels
 public void FillStudentGrid(MainWindow mainWindow, WrapPanel StudentPanel)
 {
     foreach (var student in list)
     {
         var studentInformation =
             new StudentInformation(mainWindow, student);
         StudentPanel.Children.Add(studentInformation);
     }
 }
コード例 #23
0
 public ActionResult Edit([Bind(Include = "UserId,Email,Surname,Full_Names,Identity_Number,Gender,postal_address,Image")] StudentInformation studentInformation)
 {
     if (ModelState.IsValid)
     {
         db.Entry(studentInformation).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(studentInformation));
 }
コード例 #24
0
 private void SaveStudentInformation(StudentInformation studentInformation)
 {
     //var student = new StudentInformation();
     //StudentManager.CreateStudentDataInServer(studentInformation);
     if (studentInformation.OperationType == OperationType.ClientAnswer)
     {
         MessageBox.Show("Answers Received at Server. Please go to specific folder to read the answers",
                         "File received!", MessageBoxButtons.OK);
     }
 }
コード例 #25
0
        public IHttpActionResult GetStudentInformation(int id)
        {
            StudentInformation studentInformation = db.StudentInformations.Find(id);

            if (studentInformation == null)
            {
                return(NotFound());
            }
            return(Ok(studentInformation));
        }
コード例 #26
0
 // GET: Information
 public InformationController()
 {
     studentInformation           = new StudentInformation();
     roomInformation              = new RoomInformation();
     districtInformation          = new DistrictInformation();
     addressInformation           = new AddressInformation();
     departmentInformation        = new DepartmentInformation();
     studentDepartmentInformation = new StudentDepartmentInformation();
     mealInformation              = new MealInformation();
     accountInformation           = new AccountInformation();
 }
コード例 #27
0
        private void SubmitStudentToDataGrid(StudentInformation student)
        {
            /* Invoke((Action)delegate
             * {
             *   dataGridView.Rows.Add(student.StudentId);
             * });*/
            var index = dataGridView.Rows.Add();

            dataGridView.Rows[index].Cells["Column1"].Value = student.StudentId;
            //DataGridViewRow row = (DataGridViewRow) dataGridView.Rows[0]
        }
コード例 #28
0
        public DataTable EvaluationInformationInTextboxDAL(StudentInformation aStudent, string details)
        {
            SqlConnection  connection = DBconnection.OpenConnection();
            string         query      = "select *  from Students join Course on Course.ID=Students.CID where Students.StudentID='" + aStudent.StudentID + "' and students.CID=(select ID from course where details='" + details + "')";
            SqlCommand     action     = new SqlCommand(query, connection);
            DataTable      dTable     = new DataTable();
            SqlDataAdapter Sda        = new SqlDataAdapter();

            Sda.SelectCommand = action;
            Sda.Fill(dTable);
            return(dTable);
        }
コード例 #29
0
        public IHttpActionResult PostStudentInformation(StudentInformation studentInformation)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.StudentInformations.Add(studentInformation);
            db.SaveChanges();

            return(StatusCode(HttpStatusCode.NoContent));
        }
コード例 #30
0
 private bool ExamFinished(StudentInformation studentInformation)
 {
     if (studentInformation.ExamEndTime < DateTime.Now)
     {
         //Processing report here - lots of new threads/task in here as well
         return(false);
     }
     else
     {
         return(true);
     }
 }
コード例 #31
0
ファイル: Default.aspx.cs プロジェクト: gamma9mu/HomeRoom
    public void submitQuery(object sender, EventArgs e)
    {
        quantifySurvey();

        StudentInformation student = new StudentInformation(visual, aural, tactile);

        Controller controller = Controller.getInstance();
        Request request = new Request(student, query.Text, Int32.Parse(speed.SelectedValue));
        controller.addRequest(request);

        query.Text = "";
        results.Text = "Submission successful!";
    }
コード例 #32
0
 /// <summary>
 /// Convenience constructor.
 /// </summary>
 /// <param name="student">The value for <code>studentInformation</code>
 /// .</param>
 /// <param name="topic">The value for <code>topic</code>.</param>
 /// <param name="connectionSpeed">The value for
 /// <code>connectionSpeed</code>.</param>
 public Request(StudentInformation student, string topic, int connectionSpeed)
 {
     this.studentInformation = student;
     this.topic = topic;
     this.connectionSpeed = connectionSpeed;
 }