Professional Documents
Culture Documents
FrmStudentRecords
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;
namespace FrmLab1
{
public partial class FrmStudentRecord : Form
{
public FrmStudentRecord()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
this.Hide();
FrmRegistration registration = new FrmRegistration();
registration.ShowDialog();
}
private void button2_Click(object sender, EventArgs e)
{
string docPath2 = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
MessageBox.Show(docPath2, "Directory", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void button3_Click(object sender, EventArgs e)
{
MessageBox.Show("'Successfully Uploaded!'", "Message", MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
}
}
FrmRegistration
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace FrmLab1
{
public partial class FrmRegistration : Form
{
public FrmRegistration()
{
Ralph Jasper Adano Even-Driven Programming
InitializeComponent();
}
private void FrmRegistration_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
string getBirthday = dateTimePicker1.Text;
string getProgram = comboBox1.Text;
string getFirstName = textBox4.Text;
string getMiddleName = textBox5.Text;
string getGender = comboBox2.Text;
string getStudentNo = textBox1.Text;
string getLastName = textBox2.Text;
string getAge = textBox3.Text;
string getContactNo = textBox6.Text;
string SetFileName = string.Concat(getStudentNo, ".txt");
Console.WriteLine(getStudentNo);
foreach (string i in info)
outputFile.WriteLine(i);
outputFile.Close();
Close();
}
public string[] getStudentNo { get; set; }
Form1
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace FrmLab1
{
public partial class Form1 : Form
Ralph Jasper Adano Even-Driven Programming
{
public Form1()
{
InitializeComponent();
}
FrmFileName
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;
namespace FrmLab1
{
public partial class FrmFileName : Form
{
public FrmFileName()
{
InitializeComponent();
}
private void btnOkay_Click(object sender, EventArgs e)
{
SetFileName = txtFileName.Text + ".txt";
Close();
FrmRegistration reg = new FrmRegistration();
reg.ShowDialog();
}
public static string SetFileName { get; set; }
}
}