Advertisement
RockField64

Student Registration Form First Form

Nov 12th, 2021
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.34 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace StudentRegistrationApplication
  12. {
  13.     public partial class frmStudentRegistration : Form
  14.     {
  15.         public frmStudentRegistration()
  16.         {
  17.  
  18.             InitializeComponent();
  19.             for (int day = 1; day <= 31; day++)
  20.             {
  21.                 ComboBoxDay.Items.Add(day);
  22.             }
  23.             for (int month = 1; month <= 12; month++)
  24.             {
  25.                 ComboBoxMonth.Items.Add(month);
  26.             }
  27.             for (int year = 1900; year <= 2021; year++)
  28.             {
  29.                 ComboBoxYear.Items.Add(year);
  30.             }
  31.            
  32.         }
  33.        
  34.  
  35.     private void BtnRegisterStudent_Click(object sender, EventArgs e)
  36.         {
  37.             String LastName = TxtboxLastName.Text;
  38.             String StudentName = TxtboxFirstName.Text;
  39.             String MiddleName = TxtboxMiddleName.Text;
  40.  
  41.             RadioButtonMale.Checked = true;
  42.             RadioButtonFemale.Checked = true;
  43.             this.Hide();
  44.             frmStudentRegistration2 fsr2 = new frmStudentRegistration2();
  45.             fsr2.ShowDialog();
  46.            
  47.         }
  48.  
  49.  
  50.        
  51.     }
  52. }
  53.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement