Docsity

Admission Form Application: Departments, Programs, and Merit Calculation, Assignments of Computer Architecture and Organization

Toggle sidebar
bg1
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 AdmissionForm
{
public partial class Form1 : Form
{
public Form1()
{ InitializeComponent(); }
private void Form1_Load(object sender, EventArgs e)
{
listDepart.Items.Add("Computer Science");
listDepart.Items.Add("Information Technology");
listDepart.Items.Add("TeleCommunication");
listProg.Items.Add("BSCS");
listProg.Items.Add("MCS");
listProg.Items.Add("MIT");
listProg.Items.Add("BS(TS)");
applicationNo.Enabled = false;
name.Enabled = false;
matricObMarks.Enabled = false;
matricToMarks.Enabled = false;
fscObMarks.Enabled = false;
fscToMarks.Enabled = false;
bscObMarks.Enabled = false;
bscToMarks.Enabled = false;
}
Page | 1
pf3
pf4
pf5

Partial preview of the text

Download Admission Form Application: Departments, Programs, and Merit Calculation and more Assignments Computer Architecture and Organization in PDF only on Docsity!

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 AdmissionForm { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { listDepart.Items.Add("Computer Science"); listDepart.Items.Add("Information Technology"); listDepart.Items.Add("TeleCommunication"); listProg.Items.Add("BSCS"); listProg.Items.Add("MCS"); listProg.Items.Add("MIT"); listProg.Items.Add("BS(TS)"); applicationNo.Enabled = false; name.Enabled = false; matricObMarks.Enabled = false; matricToMarks.Enabled = false; fscObMarks.Enabled = false; fscToMarks.Enabled = false; bscObMarks.Enabled = false; bscToMarks.Enabled = false; }

private void listProg_SelectedIndexChanged(object sender, EventArgs e) { if (listDepart.SelectedIndex == -1) { MessageBox.Show("Please First Select The Department"); } else if (listDepart.SelectedIndex == 0 && listProg.SelectedIndex == 0) { MessageBox.Show("Enter The Data"); applicationNo.Enabled = true; name.Enabled = true; fscObMarks.Enabled = true; fscToMarks.Enabled = true; bscObMarks.Enabled = false; bscToMarks.Enabled = false; matricObMarks.Enabled = false; matricToMarks.Enabled = false; } else if (listDepart.SelectedIndex == 0 && listProg.SelectedIndex == 1) { MessageBox.Show("Enter The Data"); applicationNo.Enabled = true; name.Enabled = true; matricObMarks.Enabled = true; matricToMarks.Enabled = true; fscObMarks.Enabled = true; fscToMarks.Enabled = true; bscObMarks.Enabled = true; bscToMarks.Enabled = true; } else if (listDepart.SelectedIndex == 1 && listProg.SelectedIndex == 2) { MessageBox.Show("Enter The Data"); applicationNo.Enabled = true; name.Enabled = true; matricObMarks.Enabled = true; matricToMarks.Enabled = true; fscObMarks.Enabled = true; fscToMarks.Enabled = true; bscObMarks.Enabled = true; bscToMarks.Enabled = true; }

else if ((listDepart.SelectedIndex == 0 && listProg.SelectedIndex == 1) || (listDepart.SelectedIndex == 1 && listProg.SelectedIndex == 2)) { double matricObtainMarks, matricTotalMarks, fscObtainMarks, fscTotalMarks, bscObtainMarks, bscTotalMarks,totalobtain; matricObtainMarks = Convert.ToDouble(matricObMarks.Text); matricTotalMarks = Convert.ToDouble(matricToMarks.Text); fscObtainMarks = Convert.ToDouble(fscObMarks.Text); fscTotalMarks = Convert.ToDouble(fscToMarks.Text); bscObtainMarks = Convert.ToDouble(bscObMarks.Text); bscTotalMarks = Convert.ToDouble(bscToMarks.Text); totalobtain = matricObtainMarks + fscObtainMarks + bscObtainMarks; double total = matricTotalMarks + fscTotalMarks + bscTotalMarks; if ((matricObtainMarks <= matricTotalMarks) && (fscObtainMarks <= fscTotalMarks) && (bscObtainMarks <= bscTotalMarks)) { double meritPer; meritPer = (totalobtain / total) * 100; merit.Text = meritPer.ToString("#.0"); if (meritPer >= 80) { remarks.Text = "Congratulation...!"; } else { remarks.Text = "See Next Merit list"; } } else { MessageBox.Show("ERROR:Obtain marks are greater then Total Marks"); } } } private void btnClear_Click(object sender, EventArgs e) {

applicationNo.Clear(); name.Clear(); matricObMarks.Clear(); matricToMarks.Clear(); fscObMarks.Clear(); fscToMarks.Clear(); bscObMarks.Clear(); bscToMarks.Clear(); merit.Clear(); remarks.Clear(); listDepart.SelectedIndex = -1; listProg.SelectedIndex = -1; applicationNo.Enabled = false; name.Enabled = false; matricObMarks.Enabled = false; matricToMarks.Enabled = false; fscObMarks.Enabled = false; fscToMarks.Enabled = false; bscObMarks.Enabled = false; bscToMarks.Enabled = false; } private void btnExit_Click(object sender, EventArgs e) { Application.Exit(); } } }