66 lines
1.6 KiB
C#
66 lines
1.6 KiB
C#
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 MySQL_Database
|
|
{
|
|
public partial class addNewStudent : Form
|
|
{
|
|
MySqlConnector connector = new MySqlConnector();
|
|
public addNewStudent()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void label3_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void guna2Button2_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
studinfoForm adminform = new studinfoForm();
|
|
adminform.Show();
|
|
}
|
|
|
|
private void FirstName_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void guna2TextBox3_TextChanged(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void addNewStudent_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void emailTextbox_TextChanged(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void guna2Button1_Click(object sender, EventArgs e)
|
|
{
|
|
string fullname = firstnameTB.Text + " " + middlenameTB.Text + " " + lastName;
|
|
int creds = 1;
|
|
MySqlConnector.AddStudent(studentIDTB.Text, fullname, int.Parse(ageTB.Text), sexCB.Text, addressTB.Text, emailTB.Text, int.Parse(connumTB.Text), studenttypeTB.Text, yearlvlTB.Text, programTB.Text, creds, null);
|
|
}
|
|
|
|
private void panel1_Paint(object sender, PaintEventArgs e)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|