Professional Documents
Culture Documents
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Collections;
using System.Security.Cryptography.X509Certificates;
namespace StudentClass
public Form1()
InitializeComponent();
}
private void textBox7_TextChanged(object sender, EventArgs e)
StudentInfoClass.StudentNo = long.Parse(textBox1.Text);
StudentInfoClass.Program = comboBox1.Text.ToString();
StudentInfoClass.LastName = textBox2.Text.ToString();
StudentInfoClass.Firstname = textBox3.Text.ToString();
StudentInfoClass.MiddleName = textBox4.Text.ToString();
StudentInfoClass.Age = long.Parse(textBox5.Text.ToString());
StudentInfoClass.ContactNo = long.Parse(textBox6.Text.ToString());
StudentInfoClass.Address = textBox7.Text.ToString();
trees = frm.ShowDialog();
if (trees == DialogResult.OK)
comboBox1.SelectedIndex = 0;
textBox3.Text = " "; textBox2.Text = " "; textBox4.Text = " "; textBox7.Text = " ";
---------------------------------------------------------------------------------------------------
FORM2
namespace StudentClass
public Form2()
InitializeComponent();
label2.Text = DelStudNo(StudentInfoClass.StudentNo).ToString();
label4.Text = DelProgram(StudentInfoClass.Program);
label6.Text = DelLastName(StudentInfoClass.LastName);
label8.Text = DelFirstName(StudentInfoClass.Firstname);
label10.Text = DelMiddleName(StudentInfoClass.MiddleName);
label12.Text = DelNumAge(StudentInfoClass.Age).ToString();
label14.Text = DelNumContactNo(StudentInfoClass.ContactNo).ToString();
label16.Text = DelAddress(StudentInfoClass.Address);
this.DialogResult = DialogResult.OK;
this.Close();
}
}
----------------------------------------------------------------------------------------------------------------
CLASS1
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StudentClass
return firstName;
return lastName;
return middleName;
return address;
return program;
return age;
return contactNo;
return studentNo;