The Students Course Enrollment Management System has the advantage of decreasing the time and effort in the student enrollment process. This system aids you to eliminate unnecessary paperwork and bringing a new level of enrollment transaction. The Students Course Enrollment Management System is an easy way of retrieving and storing student information made easy and for future use.
The Students Course Enrollment Management System was developed using C# and MySQL database.
Functional Requirements of Univesity Course Enrollment Management System
Students
- Students can Register New Student
- Students can see the List of Students
Enrollment
- The registrar can Enroll Students
- Students can see a list of Enrolled Students
- The student can print Student Enrolled Subjects
Subjects
- The student can Add New Subject
- The registrar can view a list of Subjects
Maintenance
- Insert, delete, view, update School Year
- Insert, delete, view, update Level
- Insert, delete, view, update Section Per Level
Reports
- Print Master List
- Print Analytics Reports
Manage Users
- The user can log in and Logout
Login details
Username: admin
Password: admin
frmAddStudent.cs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
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 EnrollmentSystem.Includes; using EnrollmentSystem.Properties; namespace EnrollmentSystem { public partial class frmAddStudent : Form { public frmAddStudent() { InitializeComponent(); } SQLConfig config = new SQLConfig(); usableFunction func = new usableFunction(); string sql, radioSEX, Ryesno, Nyesno, Pyesno, Cyesno; private void ts_Close_Click(object sender, EventArgs e) { this.Close(); } private void dtpDbirth_ValueChanged(object sender, EventArgs e) { int age; age = int.Parse(DateTime.Now.ToString("yyyy")) - int.Parse(dtpDbirth.Value.ToString("yyyy")); txtAge.Text = age.ToString(); } private void tsNew_Click(object sender, EventArgs e) { func.clearTxt(GroupBox1); txtStudentId.Clear(); rdoMale.Checked = true; rdoFemale.Checked = false; chkBirthCert.Checked = false; chkPic.Checked = false; chkReportCard.Checked = false; chkCertification.Checked = false; sql = "SELECT ACADYR FROM ay"; config.fiil_CBO(sql, cboAddSy); } private void frmAddStudent_Load(object sender, EventArgs e) { tsNew_Click(sender, e); config.autonumber("StudentID", txtStudentId); txtLName.Focus(); } private void tsSave_Click(object sender, EventArgs e) { if(txtStudentId.Text == "") { MessageBox.Show("One of the box is empty on the student details,You must fill it", "Invalid", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } //foreach(Control txt in GroupBox1.Controls) //{ // if(txt is TextBox) // { // MessageBox.Show("One of the box is empty on the student details,You must fill it", "Invalid", MessageBoxButtons.OK, MessageBoxIcon.Error); // return; // } //} if (rdoMale.Checked) { radioSEX = "MALE"; } else { radioSEX = "FEMALE"; } Nyesno = func.checkOption(chkBirthCert); Cyesno = func.checkOption(chkCertification); Pyesno = func.checkOption(chkPic); Ryesno = func.checkOption(chkReportCard); sql = "INSERT INTO `tblrequirements` (`NSO`, `PICID`, `REPORTCARD`, `CERTIFICATE_OF_TRANSFER`, `IDNO`) " + "VALUES ('" + Nyesno + "','" + Pyesno + "','" + Ryesno + "','" + Cyesno + "','" + txtStudentId.Text + "')"; config.Execute_Query(sql); sql = "INSERT INTO tblstudent(`IDNO`, `FNAME`, `LNAME`, `MNAME`, `SEX`, `BDAY`, `BPLACE`, `AGE`, `HOME_ADD`, `GUARDIAN`,`GUARDIAN_ADD`,`GUARDIAN_TEL`,`LASTSCHOOLATTEND`,`HEIGTH`,`WEIGTH`) " + "VALUES ('" + txtStudentId.Text + "','" + txtFName.Text + "','" + txtLName.Text + "','" + txtMName.Text + "','" + radioSEX + "','" + dtpDbirth.Text + "','" + txtPBirth.Text + "','" + txtAge.Text + "','" + txtAddress.Text + "','" + txtguardian.Text + "','" + txtguardianadd.Text + "','" + txtguardiantel.Text + "','" + txtLastSchoolAttend.Text + "','" + txtHeight.Text + "','" + txtWeigth.Text + "')"; config.Execute_CUD(sql, "error to save the data", "Student has been registered."); sql = "Update tblautonumber set EndValue = EndValue + IncrementValue WHERE Remarks='StudentID'"; config.Execute_Query(sql); tsNew_Click(sender, e); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 |
namespace EnrollmentSystem { partial class frmAddStudent { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.GroupBox2 = new System.Windows.Forms.GroupBox(); this.chkReportCard = new System.Windows.Forms.CheckBox(); this.chkCertification = new System.Windows.Forms.CheckBox(); this.chkBirthCert = new System.Windows.Forms.CheckBox(); this.chkPic = new System.Windows.Forms.CheckBox(); this.txtguardianadd = new System.Windows.Forms.RichTextBox(); this.Label61 = new System.Windows.Forms.Label(); this.txtguardiantel = new System.Windows.Forms.TextBox(); this.Label60 = new System.Windows.Forms.Label(); this.txtguardian = new System.Windows.Forms.TextBox(); this.Label59 = new System.Windows.Forms.Label(); this.cboAddSy = new System.Windows.Forms.ComboBox(); this.txtLastSchoolAttend = new System.Windows.Forms.RichTextBox(); this.txtPBirth = new System.Windows.Forms.RichTextBox(); this.txtAddress = new System.Windows.Forms.RichTextBox(); this.Label51 = new System.Windows.Forms.Label(); this.rdoFemale = new System.Windows.Forms.RadioButton(); this.ToolStrip1 = new System.Windows.Forms.ToolStrip(); this.Label29 = new System.Windows.Forms.Label(); this.rdoMale = new System.Windows.Forms.RadioButton(); this.dtpDbirth = new System.Windows.Forms.DateTimePicker(); this.txtHeight = new System.Windows.Forms.TextBox(); this.Label10 = new System.Windows.Forms.Label(); this.txtWeigth = new System.Windows.Forms.TextBox(); this.Label9 = new System.Windows.Forms.Label(); this.Label8 = new System.Windows.Forms.Label(); this.txtAge = new System.Windows.Forms.TextBox(); this.Label7 = new System.Windows.Forms.Label(); this.Label6 = new System.Windows.Forms.Label(); this.GroupBox1 = new System.Windows.Forms.GroupBox(); this.Label5 = new System.Windows.Forms.Label(); this.Label4 = new System.Windows.Forms.Label(); this.txtMName = new System.Windows.Forms.TextBox(); this.Label3 = new System.Windows.Forms.Label(); this.txtFName = new System.Windows.Forms.TextBox(); this.Label2 = new System.Windows.Forms.Label(); this.txtLName = new System.Windows.Forms.TextBox(); this.Label1 = new System.Windows.Forms.Label(); this.Label27 = new System.Windows.Forms.Label(); this.txtStudentId = new System.Windows.Forms.TextBox(); this.tsSave = new System.Windows.Forms.ToolStripButton(); this.tsNew = new System.Windows.Forms.ToolStripButton(); this.ts_Close = new System.Windows.Forms.ToolStripButton(); this.GroupBox2.SuspendLayout(); this.ToolStrip1.SuspendLayout(); this.GroupBox1.SuspendLayout(); this.SuspendLayout(); // // GroupBox2 // this.GroupBox2.Controls.Add(this.chkReportCard); this.GroupBox2.Controls.Add(this.chkCertification); this.GroupBox2.Controls.Add(this.chkBirthCert); this.GroupBox2.Controls.Add(this.chkPic); this.GroupBox2.Location = new System.Drawing.Point(749, 19); this.GroupBox2.Name = "GroupBox2"; this.GroupBox2.Size = new System.Drawing.Size(200, 265); this.GroupBox2.TabIndex = 33; this.GroupBox2.TabStop = false; this.GroupBox2.Text = "Requirements"; // // chkReportCard // this.chkReportCard.AutoSize = true; this.chkReportCard.Location = new System.Drawing.Point(26, 41); this.chkReportCard.Name = "chkReportCard"; this.chkReportCard.Size = new System.Drawing.Size(115, 24); this.chkReportCard.TabIndex = 16; this.chkReportCard.Text = "Report Card"; this.chkReportCard.UseVisualStyleBackColor = true; // // chkCertification // this.chkCertification.AutoSize = true; this.chkCertification.Location = new System.Drawing.Point(28, 203); this.chkCertification.Name = "chkCertification"; this.chkCertification.Size = new System.Drawing.Size(112, 24); this.chkCertification.TabIndex = 19; this.chkCertification.Text = "Certification"; this.chkCertification.UseVisualStyleBackColor = true; // // chkBirthCert // this.chkBirthCert.AutoSize = true; this.chkBirthCert.Location = new System.Drawing.Point(26, 99); this.chkBirthCert.Name = "chkBirthCert"; this.chkBirthCert.Size = new System.Drawing.Size(137, 24); this.chkBirthCert.TabIndex = 17; this.chkBirthCert.Text = "Birth Certificate"; this.chkBirthCert.UseVisualStyleBackColor = true; // // chkPic // this.chkPic.AutoSize = true; this.chkPic.Location = new System.Drawing.Point(26, 156); this.chkPic.Name = "chkPic"; this.chkPic.Size = new System.Drawing.Size(127, 24); this.chkPic.TabIndex = 18; this.chkPic.Text = "1x1 ID Picture"; this.chkPic.UseVisualStyleBackColor = true; // // txtguardianadd // this.txtguardianadd.Location = new System.Drawing.Point(382, 220); this.txtguardianadd.Name = "txtguardianadd"; this.txtguardianadd.Size = new System.Drawing.Size(361, 66); this.txtguardianadd.TabIndex = 13; this.txtguardianadd.Text = ""; // // Label61 // this.Label61.AutoSize = true; this.Label61.Location = new System.Drawing.Point(381, 197); this.Label61.Name = "Label61"; this.Label61.Size = new System.Drawing.Size(76, 20); this.Label61.TabIndex = 34; this.Label61.Text = "Address :"; // // txtguardiantel // this.txtguardiantel.Location = new System.Drawing.Point(9, 260); this.txtguardiantel.Name = "txtguardiantel"; this.txtguardiantel.Size = new System.Drawing.Size(367, 26); this.txtguardiantel.TabIndex = 12; // // Label60 // this.Label60.AutoSize = true; this.Label60.Location = new System.Drawing.Point(6, 238); this.Label60.Name = "Label60"; this.Label60.Size = new System.Drawing.Size(38, 20); this.Label60.TabIndex = 32; this.Label60.Text = "Tel :"; // // txtguardian // this.txtguardian.Location = new System.Drawing.Point(9, 212); this.txtguardian.Name = "txtguardian"; this.txtguardian.Size = new System.Drawing.Size(367, 26); this.txtguardian.TabIndex = 11; // // Label59 // this.Label59.AutoSize = true; this.Label59.Location = new System.Drawing.Point(6, 189); this.Label59.Name = "Label59"; this.Label59.Size = new System.Drawing.Size(83, 20); this.Label59.TabIndex = 30; this.Label59.Text = "Guardian :"; // // cboAddSy // this.cboAddSy.FormattingEnabled = true; this.cboAddSy.Location = new System.Drawing.Point(643, 312); this.cboAddSy.Name = "cboAddSy"; this.cboAddSy.Size = new System.Drawing.Size(306, 28); this.cboAddSy.TabIndex = 15; // // txtLastSchoolAttend // this.txtLastSchoolAttend.Location = new System.Drawing.Point(10, 312); this.txtLastSchoolAttend.Name = "txtLastSchoolAttend"; this.txtLastSchoolAttend.Size = new System.Drawing.Size(628, 42); this.txtLastSchoolAttend.TabIndex = 14; this.txtLastSchoolAttend.Text = ""; // // txtPBirth // this.txtPBirth.Location = new System.Drawing.Point(382, 101); this.txtPBirth.Name = "txtPBirth"; this.txtPBirth.Size = new System.Drawing.Size(361, 37); this.txtPBirth.TabIndex = 5; this.txtPBirth.Text = ""; // // txtAddress // this.txtAddress.Location = new System.Drawing.Point(9, 101); this.txtAddress.Name = "txtAddress"; this.txtAddress.Size = new System.Drawing.Size(367, 37); this.txtAddress.TabIndex = 4; this.txtAddress.Text = ""; // // Label51 // this.Label51.AutoSize = true; this.Label51.Location = new System.Drawing.Point(6, 289); this.Label51.Name = "Label51"; this.Label51.Size = new System.Drawing.Size(171, 20); this.Label51.TabIndex = 23; this.Label51.Text = "Last School Attended :"; // // rdoFemale // this.rdoFemale.AutoSize = true; this.rdoFemale.Location = new System.Drawing.Point(385, 164); this.rdoFemale.Name = "rdoFemale"; this.rdoFemale.Size = new System.Drawing.Size(80, 24); this.rdoFemale.TabIndex = 8; this.rdoFemale.Text = "Female"; this.rdoFemale.UseVisualStyleBackColor = true; // // ToolStrip1 // this.ToolStrip1.BackColor = System.Drawing.Color.White; this.ToolStrip1.Dock = System.Windows.Forms.DockStyle.Bottom; this.ToolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; this.ToolStrip1.ImageScalingSize = new System.Drawing.Size(40, 40); this.ToolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsSave, this.tsNew, this.ts_Close}); this.ToolStrip1.Location = new System.Drawing.Point(0, 429); this.ToolStrip1.Name = "ToolStrip1"; this.ToolStrip1.Size = new System.Drawing.Size(993, 47); this.ToolStrip1.TabIndex = 40; this.ToolStrip1.Text = "ToolStrip1"; // // Label29 // this.Label29.AutoSize = true; this.Label29.Location = new System.Drawing.Point(639, 289); this.Label29.Name = "Label29"; this.Label29.Size = new System.Drawing.Size(104, 20); this.Label29.TabIndex = 23; this.Label29.Text = "School Year :"; // // rdoMale // this.rdoMale.AutoSize = true; this.rdoMale.Checked = true; this.rdoMale.Location = new System.Drawing.Point(329, 163); this.rdoMale.Name = "rdoMale"; this.rdoMale.Size = new System.Drawing.Size(61, 24); this.rdoMale.TabIndex = 7; this.rdoMale.TabStop = true; this.rdoMale.Text = "Male"; this.rdoMale.UseVisualStyleBackColor = true; // // dtpDbirth // this.dtpDbirth.CustomFormat = "yyyy-MM-dd"; this.dtpDbirth.Format = System.Windows.Forms.DateTimePickerFormat.Custom; this.dtpDbirth.Location = new System.Drawing.Point(10, 163); this.dtpDbirth.Name = "dtpDbirth"; this.dtpDbirth.Size = new System.Drawing.Size(158, 26); this.dtpDbirth.TabIndex = 6; this.dtpDbirth.ValueChanged += new System.EventHandler(this.dtpDbirth_ValueChanged); // // txtHeight // this.txtHeight.Location = new System.Drawing.Point(597, 164); this.txtHeight.Name = "txtHeight"; this.txtHeight.Size = new System.Drawing.Size(146, 26); this.txtHeight.TabIndex = 10; // // Label10 // this.Label10.AutoSize = true; this.Label10.Location = new System.Drawing.Point(593, 139); this.Label10.Name = "Label10"; this.Label10.Size = new System.Drawing.Size(95, 20); this.Label10.TabIndex = 18; this.Label10.Text = "Height (cm):"; // // txtWeigth // this.txtWeigth.Location = new System.Drawing.Point(468, 164); this.txtWeigth.Name = "txtWeigth"; this.txtWeigth.Size = new System.Drawing.Size(126, 26); this.txtWeigth.TabIndex = 9; // // Label9 // this.Label9.AutoSize = true; this.Label9.Location = new System.Drawing.Point(466, 141); this.Label9.Name = "Label9"; this.Label9.Size = new System.Drawing.Size(94, 20); this.Label9.TabIndex = 16; this.Label9.Text = "Weight (kg):"; // // Label8 // this.Label8.AutoSize = true; this.Label8.Location = new System.Drawing.Point(335, 140); this.Label8.Name = "Label8"; this.Label8.Size = new System.Drawing.Size(44, 20); this.Label8.TabIndex = 14; this.Label8.Text = "Sex :"; // // txtAge // this.txtAge.Enabled = false; this.txtAge.Location = new System.Drawing.Point(174, 162); this.txtAge.Name = "txtAge"; this.txtAge.Size = new System.Drawing.Size(143, 26); this.txtAge.TabIndex = 8; // // Label7 // this.Label7.AutoSize = true; this.Label7.Location = new System.Drawing.Point(170, 139); this.Label7.Name = "Label7"; this.Label7.Size = new System.Drawing.Size(46, 20); this.Label7.TabIndex = 12; this.Label7.Text = "Age :"; // // Label6 // this.Label6.AutoSize = true; this.Label6.Location = new System.Drawing.Point(6, 140); this.Label6.Name = "Label6"; this.Label6.Size = new System.Drawing.Size(110, 20); this.Label6.TabIndex = 10; this.Label6.Text = "Date Of Birth :"; // // GroupBox1 // this.GroupBox1.BackColor = System.Drawing.Color.Transparent; this.GroupBox1.Controls.Add(this.GroupBox2); this.GroupBox1.Controls.Add(this.txtguardianadd); this.GroupBox1.Controls.Add(this.Label61); this.GroupBox1.Controls.Add(this.txtguardiantel); this.GroupBox1.Controls.Add(this.Label60); this.GroupBox1.Controls.Add(this.txtguardian); this.GroupBox1.Controls.Add(this.Label59); this.GroupBox1.Controls.Add(this.cboAddSy); this.GroupBox1.Controls.Add(this.txtLastSchoolAttend); this.GroupBox1.Controls.Add(this.txtPBirth); this.GroupBox1.Controls.Add(this.txtAddress); this.GroupBox1.Controls.Add(this.Label29); this.GroupBox1.Controls.Add(this.Label51); this.GroupBox1.Controls.Add(this.rdoFemale); this.GroupBox1.Controls.Add(this.rdoMale); this.GroupBox1.Controls.Add(this.dtpDbirth); this.GroupBox1.Controls.Add(this.txtHeight); this.GroupBox1.Controls.Add(this.Label10); this.GroupBox1.Controls.Add(this.txtWeigth); this.GroupBox1.Controls.Add(this.Label9); this.GroupBox1.Controls.Add(this.Label8); this.GroupBox1.Controls.Add(this.txtAge); this.GroupBox1.Controls.Add(this.Label7); this.GroupBox1.Controls.Add(this.Label6); this.GroupBox1.Controls.Add(this.Label5); this.GroupBox1.Controls.Add(this.Label4); this.GroupBox1.Controls.Add(this.txtMName); this.GroupBox1.Controls.Add(this.Label3); this.GroupBox1.Controls.Add(this.txtFName); this.GroupBox1.Controls.Add(this.Label2); this.GroupBox1.Controls.Add(this.txtLName); this.GroupBox1.Controls.Add(this.Label1); this.GroupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.GroupBox1.Location = new System.Drawing.Point(20, 44); this.GroupBox1.Name = "GroupBox1"; this.GroupBox1.Size = new System.Drawing.Size(963, 373); this.GroupBox1.TabIndex = 36; this.GroupBox1.TabStop = false; this.GroupBox1.Text = "Basic Information"; // // Label5 // this.Label5.AutoSize = true; this.Label5.Location = new System.Drawing.Point(379, 79); this.Label5.Name = "Label5"; this.Label5.Size = new System.Drawing.Size(114, 20); this.Label5.TabIndex = 8; this.Label5.Text = "Place Of Birth :"; // // Label4 // this.Label4.AutoSize = true; this.Label4.Location = new System.Drawing.Point(6, 79); this.Label4.Name = "Label4"; this.Label4.Size = new System.Drawing.Size(76, 20); this.Label4.TabIndex = 6; this.Label4.Text = "Address :"; // // txtMName // this.txtMName.Location = new System.Drawing.Point(519, 53); this.txtMName.Name = "txtMName"; this.txtMName.Size = new System.Drawing.Size(224, 26); this.txtMName.TabIndex = 3; // // Label3 // this.Label3.AutoSize = true; this.Label3.Location = new System.Drawing.Point(516, 29); this.Label3.Name = "Label3"; this.Label3.Size = new System.Drawing.Size(109, 20); this.Label3.TabIndex = 4; this.Label3.Text = "Middle Name :"; // // txtFName // this.txtFName.Location = new System.Drawing.Point(287, 53); this.txtFName.Name = "txtFName"; this.txtFName.Size = new System.Drawing.Size(226, 26); this.txtFName.TabIndex = 2; // // Label2 // this.Label2.AutoSize = true; this.Label2.Location = new System.Drawing.Point(284, 32); this.Label2.Name = "Label2"; this.Label2.Size = new System.Drawing.Size(104, 20); this.Label2.TabIndex = 2; this.Label2.Text = "Given Name :"; // // txtLName // this.txtLName.Location = new System.Drawing.Point(9, 53); this.txtLName.Name = "txtLName"; this.txtLName.Size = new System.Drawing.Size(272, 26); this.txtLName.TabIndex = 1; // // Label1 // this.Label1.AutoSize = true; this.Label1.Location = new System.Drawing.Point(6, 32); this.Label1.Name = "Label1"; this.Label1.Size = new System.Drawing.Size(108, 20); this.Label1.TabIndex = 0; this.Label1.Text = "Family Name :"; // // Label27 // this.Label27.AutoSize = true; this.Label27.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Label27.Location = new System.Drawing.Point(26, 15); this.Label27.Name = "Label27"; this.Label27.Size = new System.Drawing.Size(95, 20); this.Label27.TabIndex = 37; this.Label27.Text = "Student ID :"; // // txtStudentId // this.txtStudentId.Enabled = false; this.txtStudentId.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txtStudentId.Location = new System.Drawing.Point(122, 12); this.txtStudentId.Name = "txtStudentId"; this.txtStudentId.Size = new System.Drawing.Size(355, 26); this.txtStudentId.TabIndex = 35; // // tsSave // this.tsSave.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsSave.Image = global::EnrollmentSystem.Properties.Resources.save; this.tsSave.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsSave.Name = "tsSave"; this.tsSave.Size = new System.Drawing.Size(44, 44); this.tsSave.Text = "Save"; this.tsSave.Click += new System.EventHandler(this.tsSave_Click); // // tsNew // this.tsNew.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsNew.Image = global::EnrollmentSystem.Properties.Resources.refresh; this.tsNew.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsNew.Name = "tsNew"; this.tsNew.Size = new System.Drawing.Size(44, 44); this.tsNew.Text = "New"; this.tsNew.Click += new System.EventHandler(this.tsNew_Click); // // ts_Close // this.ts_Close.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.ts_Close.Image = global::EnrollmentSystem.Properties.Resources.close; this.ts_Close.ImageTransparentColor = System.Drawing.Color.Magenta; this.ts_Close.Name = "ts_Close"; this.ts_Close.Size = new System.Drawing.Size(44, 44); this.ts_Close.Text = "Close"; this.ts_Close.Click += new System.EventHandler(this.ts_Close_Click); // // frmAddStudent // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(993, 476); this.Controls.Add(this.ToolStrip1); this.Controls.Add(this.txtStudentId); this.Controls.Add(this.Label27); this.Controls.Add(this.GroupBox1); this.Name = "frmAddStudent"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Register New Student"; this.Load += new System.EventHandler(this.frmAddStudent_Load); this.GroupBox2.ResumeLayout(false); this.GroupBox2.PerformLayout(); this.ToolStrip1.ResumeLayout(false); this.ToolStrip1.PerformLayout(); this.GroupBox1.ResumeLayout(false); this.GroupBox1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); } #endregion internal System.Windows.Forms.GroupBox GroupBox2; internal System.Windows.Forms.CheckBox chkReportCard; internal System.Windows.Forms.CheckBox chkCertification; internal System.Windows.Forms.CheckBox chkBirthCert; internal System.Windows.Forms.CheckBox chkPic; internal System.Windows.Forms.RichTextBox txtguardianadd; internal System.Windows.Forms.Label Label61; internal System.Windows.Forms.TextBox txtguardiantel; internal System.Windows.Forms.Label Label60; internal System.Windows.Forms.TextBox txtguardian; internal System.Windows.Forms.Label Label59; internal System.Windows.Forms.ComboBox cboAddSy; internal System.Windows.Forms.RichTextBox txtLastSchoolAttend; internal System.Windows.Forms.RichTextBox txtPBirth; internal System.Windows.Forms.RichTextBox txtAddress; internal System.Windows.Forms.Label Label51; internal System.Windows.Forms.RadioButton rdoFemale; internal System.Windows.Forms.ToolStripButton tsNew; internal System.Windows.Forms.ToolStrip ToolStrip1; internal System.Windows.Forms.ToolStripButton tsSave; internal System.Windows.Forms.Label Label29; internal System.Windows.Forms.RadioButton rdoMale; internal System.Windows.Forms.DateTimePicker dtpDbirth; internal System.Windows.Forms.TextBox txtHeight; internal System.Windows.Forms.Label Label10; internal System.Windows.Forms.TextBox txtWeigth; internal System.Windows.Forms.Label Label9; internal System.Windows.Forms.Label Label8; internal System.Windows.Forms.TextBox txtAge; internal System.Windows.Forms.Label Label7; internal System.Windows.Forms.Label Label6; internal System.Windows.Forms.GroupBox GroupBox1; internal System.Windows.Forms.Label Label5; internal System.Windows.Forms.Label Label4; internal System.Windows.Forms.TextBox txtMName; internal System.Windows.Forms.Label Label3; internal System.Windows.Forms.TextBox txtFName; internal System.Windows.Forms.Label Label2; internal System.Windows.Forms.TextBox txtLName; internal System.Windows.Forms.Label Label1; internal System.Windows.Forms.Label Label27; internal System.Windows.Forms.TextBox txtStudentId; private System.Windows.Forms.ToolStripButton ts_Close; } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
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 EnrollmentSystem.Includes; using EnrollmentSystem.Properties; namespace EnrollmentSystem { public partial class frmEditStudent : Form { public frmEditStudent(string studentid) { InitializeComponent(); txtStudentId.Text = studentid; } SQLConfig config = new SQLConfig(); usableFunction func = new usableFunction(); string sql, radioSEX, Ryesno, Nyesno, Pyesno, Cyesno; private void tsSave_Click(object sender, EventArgs e) { if (rdoMale.Checked) { radioSEX = "MALE"; } else { radioSEX = "FEMALE"; } Nyesno = func.checkOption(chkBirthCert); Cyesno = func.checkOption(chkCertification); Pyesno = func.checkOption(chkPic); Ryesno = func.checkOption(chkReportCard); //'student(requirements) sql = "UPDATE `tblrequirements` SET `NSO`='" + Nyesno + "', `PICID`='" + Pyesno + "', `REPORTCARD`='" + Ryesno + "', `CERTIFICATE_OF_TRANSFER`='" + Cyesno + "' WHERE IDNO='" + txtStudentId.Text + "'"; config.Execute_Query(sql); //'student basic info sql = "UPDATE tblstudent SET `FNAME`='" + txtFName.Text + "', `LNAME`='" + txtLName.Text + "', `MNAME`='" + txtMName.Text + "', `SEX`='" + radioSEX + "', `BDAY`='" + dtpDbirth.Text + "', `BPLACE`='" + txtPBirth.Text + "', `AGE`='" + txtAge.Text + "', `HOME_ADD`='" + txtAddress.Text + "',GUARDIAN='" + txtguardian.Text + "',GUARDIAN_ADD ='" + txtguardianadd.Text + "',GUARDIAN_TEL ='" + txtguardiantel.Text + "',`LASTSCHOOLATTEND`='" + txtLastSchoolAttend.Text + "', WEIGTH='" + txtWeigth.Text + "',HEIGTH='" + txtHeight.Text + "' WHERE IDNO='" + txtStudentId.Text + "'"; config.Execute_CUD(sql, "error to update the data", "Student information has been updated."); } private void ts_Close_Click(object sender, EventArgs e) { this.Close(); } private void tsNew_Click(object sender, EventArgs e) { txtStudentId_TextChanged(sender, e); } private void txtStudentId_TextChanged(object sender, EventArgs e) { sql = "SELECT ACADYR FROM ay"; config.fiil_CBO(sql, cboAddSy); sql = "SELECT * FROM tblstudent WHERE IDNO = '" + txtStudentId.Text + "'"; config.singleResult(sql); if(config.dt.Rows.Count > 0) { txtFName.Text = config.dt.Rows[0].Field<string>("FNAME"); txtLName.Text =config.dt.Rows[0].Field<string>("LNAME"); txtMName.Text =config.dt.Rows[0].Field<string>("MNAME"); txtAddress.Text =config.dt.Rows[0].Field<string>("HOME_ADD"); txtguardian.Text =config.dt.Rows[0].Field<string>("GUARDIAN"); txtguardianadd.Text =config.dt.Rows[0].Field<string>("GUARDIAN_ADD"); txtguardiantel.Text =config.dt.Rows[0].Field<int>("GUARDIAN_TEL").ToString(); txtPBirth.Text =config.dt.Rows[0].Field<string>("BPLACE"); dtpDbirth.Text =config.dt.Rows[0].Field<DateTime>("BDAY").ToString(); txtAge.Text =config.dt.Rows[0].Field<int>("AGE").ToString(); txtWeigth.Text =config.dt.Rows[0].Field<int>("WEIGTH").ToString(); txtHeight.Text =config.dt.Rows[0].Field<int>("HEIGTH").ToString(); txtLastSchoolAttend.Text =config.dt.Rows[0].Field<string>("LASTSCHOOLATTEND"); if (config.dt.Rows[0].Field<string>("SEX") == "FEMALE") { rdoFemale.Checked = true; } else { rdoMale.Checked = true; } // 'students requirements sql = "SELECT * FROM `tblrequirements` WHERE IDNO = '" + txtStudentId.Text + "'"; config.singleResult(sql); if (config.dt.Rows.Count > 0) { if(config.dt.Rows[0].Field<string>("NSO") == "Yes") { chkBirthCert.Checked = true; } else { chkBirthCert.Checked = false; } if(config.dt.Rows[0].Field<string>("PICID") == "Yes") { chkPic.Checked = true; } else { chkPic.Checked = false; } if(config.dt.Rows[0].Field<string>("REPORTCARD") == "Yes") { chkReportCard.Checked =true; } else { chkReportCard.Checked = false; } if(config.dt.Rows[0].Field<string>("CERTIFICATE_OF_TRANSFER") == "Yes") { chkCertification.Checked = true; } else { chkCertification.Checked = false; } } } } private void frmEditStudent_Load(object sender, EventArgs e) { } } } |