Answer to Question #318842 in C# for busi

Question #318842

Create a C# Windows Forms application for Eduvos using Visual Studio. The application should be titled “Eduvos Registration App”. It must consist of the Eduvos Logo, which you can get from the internet (see Figure 1). The application must allow the user to enter their student registration details and store them. Your application must consist of a class for handling the student details. The student details you need to capture are the Student Number, Name, ID Number, Cell Number and the enrolled degree. The class must also consist of a constructor which initialises the public properties. The class must also contain a constructor which sets the properties to values received from the main form. The application should accept values from a user which will be typed into the textboxes. The application must look as follows:


1
Expert's answer
2022-03-27T05:46:49-0400
namespace EduvosRegistrationApp
{
    partial class MainForm
    {
        /// <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.StudentNumberTextBox = new System.Windows.Forms.TextBox();
            this.IDNumberTextBox = new System.Windows.Forms.TextBox();
            this.NameStudentTextBox = new System.Windows.Forms.TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.labeIDNumberl3 = new System.Windows.Forms.Label();
            this.CellNumberTextBox = new System.Windows.Forms.TextBox();
            this.EnrolledDegreeTextBox = new System.Windows.Forms.TextBox();
            this.label4 = new System.Windows.Forms.Label();
            this.label5 = new System.Windows.Forms.Label();
            this.AddStudentButton = new System.Windows.Forms.Button();
            this.SuspendLayout();
            // 
            // StudentNumberTextBox
            // 
            this.StudentNumberTextBox.Location = new System.Drawing.Point(173, 39);
            this.StudentNumberTextBox.Name = "StudentNumberTextBox";
            this.StudentNumberTextBox.Size = new System.Drawing.Size(136, 20);
            this.StudentNumberTextBox.TabIndex = 0;
            // 
            // IDNumberTextBox
            // 
            this.IDNumberTextBox.Location = new System.Drawing.Point(173, 132);
            this.IDNumberTextBox.Name = "IDNumberTextBox";
            this.IDNumberTextBox.Size = new System.Drawing.Size(136, 20);
            this.IDNumberTextBox.TabIndex = 1;
            // 
            // NameStudentTextBox
            // 
            this.NameStudentTextBox.Location = new System.Drawing.Point(173, 84);
            this.NameStudentTextBox.Name = "NameStudentTextBox";
            this.NameStudentTextBox.Size = new System.Drawing.Size(136, 20);
            this.NameStudentTextBox.TabIndex = 2;
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(77, 42);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(81, 13);
            this.label1.TabIndex = 3;
            this.label1.Text = "StudentNumber";
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(106, 90);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(35, 13);
            this.label2.TabIndex = 4;
            this.label2.Text = "Name";
            // 
            // labeIDNumberl3
            // 
            this.labeIDNumberl3.AutoSize = true;
            this.labeIDNumberl3.Location = new System.Drawing.Point(106, 135);
            this.labeIDNumberl3.Name = "labeIDNumberl3";
            this.labeIDNumberl3.Size = new System.Drawing.Size(55, 13);
            this.labeIDNumberl3.TabIndex = 5;
            this.labeIDNumberl3.Text = "IDNumber";
            // 
            // CellNumberTextBox
            // 
            this.CellNumberTextBox.Location = new System.Drawing.Point(173, 182);
            this.CellNumberTextBox.Name = "CellNumberTextBox";
            this.CellNumberTextBox.Size = new System.Drawing.Size(136, 20);
            this.CellNumberTextBox.TabIndex = 6;
            // 
            // EnrolledDegreeTextBox
            // 
            this.EnrolledDegreeTextBox.Location = new System.Drawing.Point(173, 220);
            this.EnrolledDegreeTextBox.Name = "EnrolledDegreeTextBox";
            this.EnrolledDegreeTextBox.Size = new System.Drawing.Size(136, 20);
            this.EnrolledDegreeTextBox.TabIndex = 7;
            // 
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(81, 182);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(61, 13);
            this.label4.TabIndex = 8;
            this.label4.Text = "CellNumber";
            // 
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(81, 223);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(80, 13);
            this.label5.TabIndex = 9;
            this.label5.Text = "EnrolledDegree";
            // 
            // AddStudentButton
            // 
            this.AddStudentButton.Location = new System.Drawing.Point(135, 278);
            this.AddStudentButton.Name = "AddStudentButton";
            this.AddStudentButton.Size = new System.Drawing.Size(196, 23);
            this.AddStudentButton.TabIndex = 10;
            this.AddStudentButton.Text = "Add";
            this.AddStudentButton.Click += new System.EventHandler(this.AddStudentButton_Click);
            this.AddStudentButton.UseVisualStyleBackColor = true;
            // 
            // MainForm
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(451, 322);
            this.Controls.Add(this.AddStudentButton);
            this.Controls.Add(this.label5);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.EnrolledDegreeTextBox);
            this.Controls.Add(this.CellNumberTextBox);
            this.Controls.Add(this.labeIDNumberl3);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.NameStudentTextBox);
            this.Controls.Add(this.IDNumberTextBox);
            this.Controls.Add(this.StudentNumberTextBox);
            this.Name = "MainForm";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "MainForm";
            this.ResumeLayout(false);
            this.PerformLayout();


        }


        #endregion


        private System.Windows.Forms.TextBox StudentNumberTextBox;
        private System.Windows.Forms.TextBox IDNumberTextBox;
        private System.Windows.Forms.TextBox NameStudentTextBox;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Label labeIDNumberl3;
        private System.Windows.Forms.TextBox CellNumberTextBox;
        private System.Windows.Forms.TextBox EnrolledDegreeTextBox;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.Button AddStudentButton;
    }
}

using System;
using System.Collections.Generic;
using System.Windows.Forms;


namespace EduvosRegistrationApp
{
    class Student
    {
        public int StudentNumber { get; set; }
        public string Name { get; set; }
        public int IDNumber { get; set; }
        public int CellNumber { get; set; }
        public string EnrolledDegree { get; set; }


        public Student()
        {


        }


        public Student(int studentNumber, string name, int IDNumber, int cellNumber, string enrolledDegree)
        {
            StudentNumber = studentNumber;
            Name = name;
            this.IDNumber = IDNumber;
            CellNumber = cellNumber;
            EnrolledDegree = enrolledDegree;
        }
    }
    public partial class MainForm : Form
    {
        List<Student> students = new List<Student>();
        public MainForm()
        {
            InitializeComponent();
        }
        private void AddStudentButton_Click(object sender, EventArgs e)
        {
            students.Add(new Student(int.Parse(StudentNumberTextBox.Text), NameStudentTextBox.Text,
                int.Parse(IDNumberTextBox.Text), int.Parse(CellNumberTextBox.Text), EnrolledDegreeTextBox.Text));
            MessageBox.Show(
        "Student successfully added",
        "Message",
        MessageBoxButtons.OK,
        MessageBoxIcon.Information,
        MessageBoxDefaultButton.Button1,
        MessageBoxOptions.DefaultDesktopOnly);
        }
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS