public void Accept()
        {
            Console.Write("Enter the Name : ");
            Name = Console.ReadLine();

            for (int i = 0; i < Name.Length; i++)
            {
                if (((Name[i] >= 'A') && (Name[i] <= 'Z')) || ((Name[i] >= 'a') && (Name[i] <= 'z')) || (Name[i] == ' '))
                {
                }
                else
                {
                    throw new InvalidNameException("Name Contain other than Characters.");;
                }
            }

            Console.Write("Enter the Age : ");
            Age = Convert.ToInt32(Console.ReadLine());
            if (Age < 0)
            {
                throw new AgeInvalidException("Invalid Age (Negative Age)");
            }

            Console.Write("Enter the Blood Group : ");
            Bloodgroup = Console.ReadLine();
            if ((Bloodgroup.Equals("A")) || (Bloodgroup.Equals("O")) || (Bloodgroup.Equals("B")) || (Bloodgroup.Equals("AB")))
            {
            }
            else
            {
                throw new BloodGroupInvalidException("INVALID BLOOD Group BloodGroup should be A,B,O,AB : you Enter " + Bloodgroup);
            }
        }
예제 #2
0
        public static ERPStudent_applicant Create(string title, string firstname, string middlename, string lastname, string program, long lmsonly, long paid, string namingseries, Applicationstatus applicationstatus, string applicationdate, string academicyear, string academicterm, string studentadmission, string image, string dateofbirth, Gender gender, Bloodgroup bloodgroup, string studentemailid, string studentmobilenumber, string nationality, string addressline1, string addressline2, string pincode, string city, string state, string guardians, string siblings, string amendedfrom)

        {
            ERPStudent_applicant obj = new ERPStudent_applicant();

            obj.title                 = title;
            obj.first_name            = firstname;
            obj.middle_name           = middlename;
            obj.last_name             = lastname;
            obj.program               = program;
            obj.lms_only              = lmsonly;
            obj.paid                  = paid;
            obj.naming_series         = namingseries;
            obj.application_status    = applicationstatus;
            obj.application_date      = applicationdate;
            obj.academic_year         = academicyear;
            obj.academic_term         = academicterm;
            obj.student_admission     = studentadmission;
            obj.image                 = image;
            obj.date_of_birth         = dateofbirth;
            obj.gender                = gender;
            obj.blood_group           = bloodgroup;
            obj.student_email_id      = studentemailid;
            obj.student_mobile_number = studentmobilenumber;
            obj.nationality           = nationality;
            obj.address_line_1        = addressline1;
            obj.address_line_2        = addressline2;
            obj.pincode               = pincode;
            obj.city                  = city;
            obj.state                 = state;
            obj.guardians             = guardians;
            obj.siblings              = siblings;
            obj.amended_from          = amendedfrom;
            return(obj);
        }
예제 #3
0
        public static ERPStudent Create(string title, long enabled, string firstname, string middlename, string lastname, string user, string namingseries, string studentemailid, string studentmobilenumber, string joiningdate, string image, string dateofbirth, Bloodgroup bloodgroup, Gender gender, string nationality, string studentapplicant, string addressline1, string addressline2, string pincode, string city, string state, string guardians, string siblings, string dateofleaving, string leavingcertificatenumber, string reasonforleaving)

        {
            ERPStudent obj = new ERPStudent();

            obj.title                      = title;
            obj.enabled                    = enabled;
            obj.first_name                 = firstname;
            obj.middle_name                = middlename;
            obj.last_name                  = lastname;
            obj.user                       = user;
            obj.naming_series              = namingseries;
            obj.student_email_id           = studentemailid;
            obj.student_mobile_number      = studentmobilenumber;
            obj.joining_date               = joiningdate;
            obj.image                      = image;
            obj.date_of_birth              = dateofbirth;
            obj.blood_group                = bloodgroup;
            obj.gender                     = gender;
            obj.nationality                = nationality;
            obj.student_applicant          = studentapplicant;
            obj.address_line_1             = addressline1;
            obj.address_line_2             = addressline2;
            obj.pincode                    = pincode;
            obj.city                       = city;
            obj.state                      = state;
            obj.guardians                  = guardians;
            obj.siblings                   = siblings;
            obj.date_of_leaving            = dateofleaving;
            obj.leaving_certificate_number = leavingcertificatenumber;
            obj.reason_for_leaving         = reasonforleaving;
            return(obj);
        }