0% found this document useful (0 votes)
17 views4 pages

Villanueva 3

Uploaded by

paignadave
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views4 pages

Villanueva 3

Uploaded by

paignadave
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

using System;

using System.Collections;
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;

namespace WindowsFormsApp48
{
public partial class Form1 : Form
{

String ln;
String fn;
String mn;

public Form1()
{
InitializeComponent();

ArrayList programs = new ArrayList {"Bachelor of Science in Information


Technology",
"Bachelor of Science in Computer Science",
"Bachelor of Science in Hospitality Management",
"Bachelor of Science in Tourism Management",
"Bachelor of Science in Information Systems",
"Bachelor of Science in Business Management",
"Bachelor of Science In Computer Engineering" };

ArrayList day = new ArrayList();

foreach (String program in programs)


{
comboBox4.Items.Add(program);
}

for(int i = 0; i <= 31; i++)


{
comboBox1.Items.Add(i.ToString());
}

for (int i = 1990; i <= 2024; i++)


{
comboBox3.Items.Add(i.ToString());
}

comboBox2.Items.Add("January");
comboBox2.Items.Add("February");
comboBox2.Items.Add("March");
comboBox2.Items.Add("April");
comboBox2.Items.Add("May");
comboBox2.Items.Add("June");
comboBox2.Items.Add("July");
comboBox2.Items.Add("August");
comboBox2.Items.Add("September");
comboBox2.Items.Add("October");
comboBox2.Items.Add("November");
comboBox2.Items.Add("December");

private void button1_Click(object sender, EventArgs e)


{
String gender = (radioButton1.Checked) ? "Male" : "Female";

String ln = textBox1.Text;
String fn = textBox2.Text;
String mn = textBox3.Text;
string day = comboBox1.SelectedItem.ToString();
string month = comboBox2.SelectedItem.ToString();
string year = comboBox3.SelectedItem.ToString();
String program = comboBox4.SelectedItem.ToString();

info(fn, ln, program);


info(fn, mn, ln, program);
info(fn, mn, ln, gender, day, month, year, program);
}
public String info(String fn, String ln, String program)
{
String details = "Student name: " + fn + " " + ln + "\nProgram: " +
program;
MessageBox.Show(details);
return details;
}
public String info(String fn, String mn, String ln, String program)
{
String details = "Student name: " + fn + " " + mn + " " + ln + "\nProgram:
" + program;
MessageBox.Show(details);
return details;
}
public String info(String fn, String mn, String ln, String gender, String day,
String month, String year, String program)
{
String details = "Student name: " + fn + " " + mn + " " + ln + "\nGender:
" + gender + "\nDate of birth: " + day + "/" + month + "/" + year + "\nProgram: " +
program;
MessageBox.Show(details);
return details;
}

private void button2_Click(object sender, EventArgs e)


{

private void button2_Click_1(object sender, EventArgs e)


{
OpenFileDialog picture = new OpenFileDialog();
picture.ShowDialog();
pictureBox1.ImageLocation = picture.FileName;
}
}
}

You might also like