예제 #1
0
        private void studentDetails_Load(object sender, EventArgs e)
        {
            studentGridView.DataSource = studentController.selectAllStudentRecordDataGridView();
            allCountTextBox.Text       = studentController.countAllStudent().ToString();

            foreach (var item in mec.departmentCombobox())
            {
                DepartComboBox.Items.Add(item);
            }
            foreach (var item in mec.classCombobox())
            {
                classComboBox.Items.Add(item);
            }


            for (int i = 1; i <= 30; i++)
            {
                dayComboBox.Items.Add(i.ToString());
            }
            for (int i = Year; i >= 1985; i--)
            {
                yearComboBox.Items.Add(i.ToString());
            }
            for (int i = 0; i < month.Length; i++)
            {
                monthComboBox.Items.Add(month[i]);
            }
            foreach (var item in mec.groupNameCombobox())
            {
                groupCombo.Items.Add(item);
            }
        }
예제 #2
0
        private void departmentCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            classAdmittedCombo.Items.Clear();
            currentClassCombo.Items.Clear();
            if (departmentCombo.Text != "")
            {
                int id = mec.departmentIdSelect(departmentCombo.Text);

                foreach (var item in mec.classCombobox(id))
                {
                    currentClassCombo.Items.Add(item);
                }

                foreach (var item in mec.classCombobox(id))
                {
                    classAdmittedCombo.Items.Add(item);
                }
            }
        }
예제 #3
0
        private void ClassSectionForm_Load(object sender, EventArgs e)
        {
            foreach (var item in mec.classCombobox())
            {
                classNameComb.Items.Add(item);
            }
            foreach (var item in mec.sectionCombobox())
            {
                sectionNameCombo.Items.Add(item);
            }

            classSectiondataGrid.DataSource = mec.classSectionDataGridView();
        }
        private void ClassSessionSubject_Load(object sender, EventArgs e)
        {
            classSubjectGridView.DataSource = mec.classSubjectDataGridView();
            foreach (var item in mec.classCombobox())
            {
                classNameComb.Items.Add(item);
            }

            foreach (var item in mec.subjectCombobox())
            {
                subjectNameCombo.Items.Add(item);
            }
        }
예제 #5
0
        private void ClassFee_Load(object sender, EventArgs e)
        {
            foreach (var item in mec.classCombobox())
            {
                classNameComb.Items.Add(item);
            }

            foreach (var item in mec.feeTypeCombobox())
            {
                feeTypeComb.Items.Add(item);
            }

            classFeeGridView.DataSource = mec.classFeeDataGridView();
        }
예제 #6
0
        private void GroupContactNo_Load(object sender, EventArgs e)
        {
            List <string> groupList = mobileSmsController.groupSMSNameCombobox();

            foreach (var item in groupList)
            {
                groupCombo.Items.Add(item);
            }


            foreach (var item in mec.classCombobox())
            {
                classNameComb.Items.Add(item);
            }
        }
예제 #7
0
        private void EditStudent_Load(object sender, EventArgs e)
        {
            string[] month = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };
            int      Year  = Convert.ToInt32(DateTime.Now.Year.ToString());

            foreach (var item in mec.departmentCombobox())
            {
                departmentCombo.Items.Add(item);
            }
            foreach (var item in mec.classCombobox())
            {
                classAdmittedCombo.Items.Add(item);
            }
            foreach (var item in mec.classCombobox())
            {
                currentClassCombo.Items.Add(item);
            }
            foreach (var item in mec.feeTypeCombobox())
            {
                feeTypeCombo.Items.Add(item);
            }
            for (int i = 1; i <= 30; i++)
            {
                dayComboBox.Items.Add(i.ToString());
            }
            for (int i = Year; i >= 1985; i--)
            {
                yearComboBox.Items.Add(i.ToString());
            }
            for (int i = 0; i < month.Length; i++)
            {
                monthComboBox.Items.Add(month[i]);
            }
            foreach (var item in mec.groupNameCombobox())
            {
                groupCombo.Items.Add(item);
            }

            List <string> l = studentController.selectStudentByGr(GrNo);


            int width = 100, height = 100;

            GRNo.Text               = GrNo.ToString();;
            studentName.Text        = l[0];
            shortName.Text          = l[1];
            guradianName.Text       = l[2];
            genderComb.Text         = l[3];
            bFormNo.Text            = l[4];
            dayComboBox.Text        = l[5];
            monthComboBox.Text      = l[6];
            yearComboBox.Text       = l[7];
            birthPlace.Text         = l[8];
            Religion.Text           = l[9];
            motherTongue.Text       = l[10];
            Nationality.Text        = l[11];
            bloodGroupComboBox.Text = l[12];

            //string pic = l[13];
            //string filePath = Application.StartupPath + "\\Images\\" + pic;
            //Image originalImage = Image.FromFile(filePath);

            //Bitmap result = new Bitmap(width, height);

            //using (Graphics g = Graphics.FromImage(result))
            //{
            //    // Draw the originam image in a new size.
            //    g.DrawImage(originalImage, 0, 0, width, height);
            //}


            //studentImage.Image = result;
            //imagePath = pic;

            string pic      = l[13];
            string filePath = Application.StartupPath + "\\Images\\" + pic;

            using (FileStream stream = new FileStream(filePath, FileMode.Open, FileAccess.Read))
            {
                Image originalImage = Image.FromStream(stream);

                Bitmap result = new Bitmap(width, height);

                using (Graphics g = Graphics.FromImage(result))
                {
                    // Draw the originam image in a new size.
                    g.DrawImage(originalImage, 0, 0, width, height);
                }
                studentImage.Image = result;
                imagePath          = pic;
                stream.Dispose();
            }


            classAdmittedCombo.Text = l[14];
            lastInsitute.Text       = l[15];
            currentStatusCombo.Text = l[16];
            AdmBasedComboBox.Text   = l[17];
            feeStatusCombo.Text     = l[18];


            if (l[19] == "Attend")
            {
                NazraCheckBox.Checked = true;
            }

            if (l[20] == "Ethics")
            {
                ikhlakiatRadio.Checked = true;
            }
            else
            {
                islamiatRadio.Checked = true;
            }


            dateOfAdmision.Text  = l[21];
            mb9thRollNo.Text     = l[22];
            mb10thRollNo.Text    = l[23];
            mbEnrollment.Text    = l[24];
            groupCombo.Text      = l[25];
            departmentCombo.Text = l[26];

            currentClassCombo.Items.Clear();
            int idd = mec.departmentIdSelect(departmentCombo.Text);

            foreach (var item in mec.classCombobox(idd))
            {
                currentClassCombo.Items.Add(item);
            }
            currentClassCombo.Text = l[27];

            sectionComboBox.Items.Clear();
            int id = mec.classIdSelect(currentClassCombo.Text);

            foreach (var item in mec.classSectionByClassId(id))
            {
                sectionComboBox.Items.Add(item);
            }

            sectionComboBox.Text = l[28];

            rollNo.Text       = l[29];
            feeTypeCombo.Text = l[30];

            kidsNo.Text      = l[31];
            homeAddress.Text = l[32];
            homePhoneNo.Text = l[33];
            fatherName.Text  = l[34];

            fatherMobile.Text    = l[35];
            fatherEducation.Text = l[36];
            Caste.Text           = l[37];
            monthlyIncome.Text   = l[38];
            officePhone.Text     = l[39];
            officeAddress.Text   = l[40];
            fathhCnicNo.Text     = l[41];
            faxNo.Text           = l[42];
            fatherEmail.Text     = l[43];
            fatherOccuption.Text = l[44];
            motherName.Text      = l[45];
            motherCnicNo.Text    = l[46];
            motherOccuption.Text = l[47];
            motherEducation.Text = l[48];
            motherMobile.Text    = l[49];
            familyCode.Text      = l[50];
            //oldClassSectionId = Convert.ToInt32(l[51]);
        }