Exemple #1
0
        private void BuildDetailsFromEditableStudent()
        {
            EsName             = EditableStudent.Name;
            EsClass            = EditableStudent.StudyingClass;
            EsSessionStartYear = EditableStudent.StartSessionYear;
            EsSessionEndYear   = EditableStudent.EndSessionYear;
            if (EditableStudent.Sex == "M")
            {
                SexIndex = 0;
            }
            else if (EditableStudent.Sex == "F")
            {
                SexIndex = 1;
            }
            else
            {
                SexIndex = -1;
            }
            EsSectionIndex = Array.IndexOf(EsSection, EditableStudent.Section);
            EsRoll         = EditableStudent.Roll;
            if (EditableStudent.StudyingClass == "V")
            {
                SubHsVisibility = System.Windows.Visibility.Collapsed;
                Sub5Visibility  = System.Windows.Visibility.Visible;
            }
            else if (EditableStudent.StudyingClass == "XI" || EditableStudent.StudyingClass == "XII")
            {
                Sub5Visibility  = System.Windows.Visibility.Collapsed;
                SubHsVisibility = System.Windows.Visibility.Visible;

                StreamIndex = Array.IndexOf(Stream, EditableStudent.Stream);
                if (StreamIndex > -1)
                {
                    if (Stream[StreamIndex] == "ARTS")
                    {
                        HsActiveSubs = HsArtsSubs;
                    }
                    else if (Stream[StreamIndex] == "SCIENCE")
                    {
                        HsActiveSubs = HsSciSubs;
                    }
                    HsSub1Index = Array.IndexOf(HsActiveSubs1, EditableStudent.HsSub1);

                    HsSub2Index = HsActiveSubs2.IndexOf(EditableStudent.HsSub2);
                    HsSub3Index = HsActiveSubs3.IndexOf(EditableStudent.HsSub3);
                    HsSub4Index = HsActiveSubs4.IndexOf(EditableStudent.HsAdlSub);
                }
            }
            else
            {
                SubHsVisibility = System.Windows.Visibility.Collapsed;
                Sub5Visibility  = System.Windows.Visibility.Collapsed;
            }

            DobYYIndex = Array.IndexOf(YYYY, EditableStudent.Dob.Year);
            DobMMIndex = EditableStudent.Dob.Month - 1;
            DobDDIndex = Array.IndexOf(DD, EditableStudent.Dob.Day);

            EsAadhaar       = EditableStudent.Aadhar;
            EsReligionIndex = Array.IndexOf(EsReligion, EditableStudent.Religion);
            SocialCatIndex  = Array.IndexOf(SocialCatList, EditableStudent.SocialCategory);
            BloodGroupIndex = Array.IndexOf(BloodGroups, EditableStudent.BloodGroup);

            IsEsBpl  = EditableStudent.IsBpl;
            EsBplNo  = (IsEsBpl) ? EditableStudent.BplNo : string.Empty;
            IsEsPH   = EditableStudent.IsPH;
            EsPhType = (IsEsPH) ? EditableStudent.PhType : string.Empty;

            EsFather          = EditableStudent.FatherName;
            EsMother          = EditableStudent.MotherName;
            EsGuardian        = EditableStudent.GuardianName;
            EsGuardianRel     = EditableStudent.GuardianRelation;
            EsGuardianOccu    = EditableStudent.GuardianOccupation;
            EsGuardianAadhaar = EditableStudent.GuardianAadhar;
            EsGuardianEpic    = EditableStudent.GuardianEpic;

            EsAddr1    = EditableStudent.PstAddrLane1;
            EsAddr2    = EditableStudent.PstAddrLane2;
            EsAddrPO   = EditableStudent.PstAddrPO;
            EsAddrPS   = EditableStudent.PstAddrPS;
            EsAddrDist = EditableStudent.PstAddrDist;
            EsAddrPIN  = EditableStudent.PstAddrPin;

            EsPaddr1    = EditableStudent.PmtAddrLane1;
            EsPaddr2    = EditableStudent.PmtAddrLane2;
            EsPaddrPO   = EditableStudent.PmtAddrPO;
            EsPaddrPS   = EditableStudent.PmtAddrPS;
            EsPaddrDist = EditableStudent.PmtAddrDist;
            EsPaddrPIN  = EditableStudent.PmtAddrPin;

            EsMobile         = EditableStudent.Mobile;
            EsGuardianMobile = EditableStudent.GuardianMobile;
            EsEmail          = EditableStudent.Email;

            EsBankAccNo  = EditableStudent.BankAcc;
            EsBankName   = EditableStudent.BankName;
            EsBankBranch = EditableStudent.BankBranch;
            EsBankIfsc   = EditableStudent.Ifsc;
            EsBankMicr   = EditableStudent.MICR;

            EsLastSchool = EditableStudent.LastSchool;
            //EsBoard = "";
            EsTC = EditableStudent.TC;

            /*
             * Remaining properties
             *
             */
            EsAdmittedClassIndex = Array.IndexOf(EsSchoolClass, EditableStudent.AdmittedClass);
            EsAdmissionNo        = EditableStudent.AdmissionNo;

            MpRegisNo = EditableStudent.RegistrationNoMp;
            MpRoll    = EditableStudent.BoardRoll;
            MpNo      = EditableStudent.BoardNo;

            HsRegisNo = EditableStudent.RegistrationNoHs;
            HsRoll    = EditableStudent.CouncilRoll;
            HsNo      = EditableStudent.CouncilNo;
        }
Exemple #2
0
        private void TrimHsSubs(int subNo)
        {
            switch (subNo)
            {
            case 2:
                if (HsActiveSubs2 != null && HsActiveSubs2.Count > 0)
                {
                    HsActiveSubs2.Clear();
                }
                if (HsSub1Index != -1)
                {
                    string sub1 = HsActiveSubs1[HsSub1Index];
                    if (sub1 == "ARABIC" || sub1 == "ECONOMICS")
                    {
                        foreach (var item in HsActiveSubs1)
                        {
                            if (item == "ARABIC" || item == "ECONOMICS")
                            {
                                continue;
                            }
                            else
                            {
                                HsActiveSubs2.Add(item);
                            }
                        }
                    }
                    else
                    {
                        foreach (var item in HsActiveSubs1)
                        {
                            if (item == sub1)
                            {
                                continue;
                            }
                            else
                            {
                                HsActiveSubs2.Add(item);
                            }
                        }
                    }
                }
                break;

            case 3:
                if (HsActiveSubs3 != null && HsActiveSubs3.Count > 0)
                {
                    HsActiveSubs3.Clear();
                }
                if (HsSub2Index != -1)
                {
                    string sub2 = HsActiveSubs2[HsSub2Index];
                    if (sub2 == "ARABIC" || sub2 == "ECONOMICS")
                    {
                        foreach (var item in HsActiveSubs2)
                        {
                            if (item == "ARABIC" || item == "ECONOMICS")
                            {
                                continue;
                            }
                            else
                            {
                                HsActiveSubs3.Add(item);
                            }
                        }
                    }
                    else
                    {
                        foreach (var item in HsActiveSubs2)
                        {
                            if (item == sub2)
                            {
                                continue;
                            }
                            else
                            {
                                HsActiveSubs3.Add(item);
                            }
                        }
                    }
                }
                break;

            case 4:
                if (HsActiveSubs4 != null && HsActiveSubs4.Count > 0)
                {
                    HsActiveSubs4.Clear();
                }
                if (HsSub3Index != -1)
                {
                    int r = HsSub3Index;
                    ObservableCollection <string> tr = HsActiveSubs3;
                    string sub3 = HsActiveSubs3[HsSub3Index];
                    //  string sub3 = HsActiveSubs[HsSub3Index];

                    if (sub3 == "ARABIC" || sub3 == "ECONOMICS")
                    {
                        foreach (var item in HsActiveSubs3)
                        {
                            if (item == "ARABIC" || item == "ECONOMICS")
                            {
                                continue;
                            }
                            else
                            {
                                HsActiveSubs4.Add(item);
                            }
                        }
                    }
                    else
                    {
                        foreach (var item in HsActiveSubs3)
                        {
                            if (item == sub3)
                            {
                                continue;
                            }
                            else
                            {
                                HsActiveSubs4.Add(item);
                            }
                        }
                    }
                }
                break;

            default:
                break;
            }
        }