Masoom 2
Masoom 2
PROJECT REPORT
ON
MILL STORE ONLINE
FOR
Application Development Using .Net (MCAOE 3003)
SUBMITTED BY
MASOOM AHMAD – SOM23MCA041
IRFAN PATHAN - SOM23MCA050
SUBMITTED TO
D. Y. PATIL UNIVERSITY
SCHOOL OF MANAGEMENT, PUNE AMBI
MASTER OF COMPUTER APPLICATION
2023-24
1
Ref No: DYPSOM/MCA Date:
Certificate
Examined by:
Examiner 1
Examiner 2
2
Declaration
Date: Place:
3
Table of Content
SR. NO. TITLE PAGE NO.
1 INTRODUCTION 5 – 11
1.1 EXISTING SYSTEM AND NEED OF SYSTEM 5–6
1.2 SCOPE OF WORK 6–9
1.3 OPERATING ENVIRONMENT – HARDWARE AND 9
SOFTWARE
1.4 DESCRIPTION OF TECHNOLGY USED 10 – 11
2 PROPOSED SYSTEM 12 – 19
2.1 PROPOSED SYSTEM 12 – 14
2.2 OBJECTIVE OF SYSTEM 14
2.3 FEASIBILITY STUDY 14 – 17
2.4 USER REQUIREMENTS 18 - 19
4 USER MANUAL 41
4.1 USER MANUAL 41 – 42
4.2 PROGRAM SPECIFICATIONS / FLOW CHARTS 43
4
1. INTRODUCTION
EXISTING SYSTEM
The existing systems in schools often rely on manual record- keeping
using paper-based methods or basic software tools that do not provide
an integrated solution for managing various school functions like
student information, attendance, grades, and fees. These systems are
inefficient, prone to errors, and can be time-consuming for
administrators, teachers, and staff. For example, many schools still
track student attendance and grades manually, which increases the
likelihood of mistakes and delays in reporting. Additionally,
communication between students, teachers, and parents is often done
through paper notices or phone calls, which can be slow and
ineffective. Schools may also use separate systems for different
administrative functions, such as accounting or timetable
management, which leads to data inconsistency and inefficiencies.
Finally, many existing systems do not provide adequate security or
backup mechanisms, putting valuable school data at risk.
5
NEED OF SYSTEM
The School Addmission System (SAS), particularly in the context of a
mini project in C# .NET, is designed to address the limitations of existing
manual and fragmented systems. One of the primary needs for such a
system is centralized data management, which ensures that all school-
related data, including student details, grades, timetables, fees,
attendance, and teacher information, are stored in one unified platform.
This leads to better organization and easier access to critical information.
The system also promotes efficiency and time-saving by automating
repetitive tasks like generating attendance reports, student progress
reports, fee receipts, and timetables, thus reducing manual labour and
increasing administrative efficiency.
6
handle growing numbers of students and teachers as the school expands,
ensuring flexibility and long-term adaptability. Lastly, the SMS offers
robust student and faculty management, helping to efficiently track and
manage student records, teacher schedules, attendance, performance, and
school events, ultimately creating a more streamlined and effective
school environment.
SCOPE OF WORK
System Overview:
The School Addmission System (SAS) is designed to automate and
streamline various administrative functions in a school. This includes
managing student records, attendance, grades, fees, timetables, and
communication between students, teachers, and parents. The system
will be implemented using C# .NET and a SQL Server backend for
database management. The goal is to replace manual systems with an
integrated, efficient, and user-friendly solution.
1. Student Management:
Student Registration: Allows for the addition of new students, with
details like name, roll number, contact information, and admission
details.
7
Student Information: Store and manage student-related information
such as personal details, parent/guardian contact details, and enrolled
courses.
Student Attendance: Mark and track student attendance, and
generate attendance reports.
Student Progress: Store academic performance, grades, and report
cards, and track student progress over time.
2. Fee Management:
Fee Structure: Define the fee structure for different courses, grades,
or categories of students.
Fee Collection: Record student fee payments, manage fee dues, and
generate receipts.
Fee Reports: Generate reports for fee collection status, outstanding
payments, and income summaries.
Security and User Management
Role-Based Access Control: Implement different roles for users
(admin, teacher, student, parent) with specific access rights to
different sections of the system.
Authentication & Authorization: Secure login for different users,
ensuring that only authorized personnel can access sensitive data.
3. Technology Stack:
Frontend: The application will use C# .NET with Windows Forms
or WPF (Windows Presentation Foundation) for the user interface.
Backend: SQL Server for database management to store student,
teacher, attendance, fee, and exam data.
Development Tools: Visual Studio 2022 for development.
Security: User authentication and authorization will be implemented
using basic role-based security features in C# .NET.
4. System Constraints
Single User Interface: The application will have a single interface,
which might not support multiple users using the system
simultaneously without performance degradation.
8
Limited Customization: The scope is focused on basic
functionalities, so there may be limited options for customizing the
system without significant code changes.
Hardware Requirements -
Processor: Pentium i3 multi-core processor
Hard disk: 256GB
RAM: 8GB
Software Requirements -
Client-Side Software –
C#
.NET
SQL Server Management Studio
Server-Side Software –
Language:
C# (Version 6.0 Released by July 2015)
.NET (Version 4.0 Released by April 2010)
Database Server:
SQL Server Management Studio
(Version 2008)
9
DESCRIPTION OF TECHNOLGY USED
C#.NET:
The School Addmission System is a software application designed to
automate various administrative tasks within a school environment. Built
using C# .NET, this project provides an efficient solution for managing
essential school activities such as student and teacher records, attendance
tracking, fee management, and grade reporting. The system simplifies the
management of academic data, allowing for easier access, storage, and
processing of information. It aims to improve the administrative
workflow, reduce manual efforts, and provide a user-friendly interface
for school staff, teachers, and students.
SQL Server:
SQL Server serves as the database management system (DBMS) for the
School Management System. All data related to students, teachers,
courses, attendance, grades, and fees are stored securely within SQL
Server. This ensures data integrity, reliability, and efficient querying
capabilities.
The SQL Server Management Studio (SSMS) is used for database design,
management, and query execution. SSMS allows developers to create
and maintain database tables, relationships, and queries. In the School
Management System, the database includes tables such as Students,
Teachers, Classes, Subjects, Attendance, Fees, and Exams. These tables
are related to each other via primary and foreign keys, ensuring that all
data is properly linked and accessible.
10
Using SQL Server, the system can execute complex queries to retrieve
student details, attendance records, calculate fees, and generate academic
reports. The data stored in the database is used to perform key operations
such as updating attendance, generating fee receipts, or calculating exam
results, which are then displayed on the user interface.
11
2. PROPOSED SYSTEM
PROPOSED SYSTEM
The Proposed System for the School Addmission System (SAS) is a
comprehensive solution developed using C# .NET that will automate and
optimize various administrative tasks within the school environment. This
system is designed to improve the management of school data, streamline
processes, and enhance communication between teachers, students, and
administrators. By leveraging the power of C# .NET and SQL Server, the
proposed system aims to address the challenges faced by the existing manual
or outdated systems.
12
Fee payment status (whether paid or pending) will be tracked,
ensuring transparency and ease of access for administrators.
4. Admission Date and Documents:
The date of admission, as well as any related documents (such
as birth certificates, photos, proof of residence, medical records,
etc.), will be uploaded and stored securely in the system.
Scanned copies or digital files can be attached to the student’s
profile for easy reference and retrieval.
5. Unique Student ID:
Every student admitted into the system will be assigned
a unique student ID to differentiate them from other students.
This ID will be used in all future references within the system.
6. Admission Approval and Confirmation:
Once the admission details are entered, the system will allow
administrators to review the information for accuracy and
approve the admission.
Upon approval, a confirmation message will be sent to the
parent/guardian, along with the student’s enrollment details
(class, section, ID, etc.).
7. Student Admission Records:
The system will maintain a comprehensive database of all
students’ admission details, which can be viewed, edited, or
deleted by authorized personnel.
A search functionality will be provided to easily locate student
records based on various parameters such as name, student ID,
class, or admission date.
13
Contact Information (Phone/Email)
2. Fee Details:
Admission Fee
Tuition Fee
Other Applicable Fees
Fee Payment Status
3. Student ID:
Unique Student ID for identification within the system.
OBJECTIVE OF SYSTEM
The objective of the School Addmission System (SAS) is to
streamline and automate the administrative and academic processes
within a school, enhancing efficiency and reducing manual effort. The
system aims to provide a centralized platform that enables seamless
management of student data, course enrollment, attendance tracking,
grading, and communication between students, teachers, and
administrators. By integrating these functions into one cohesive
system, the SMS simplifies administrative tasks, improves data
accuracy, and ensures real-time access to critical information.
Additionally, it seeks to provide a user-friendly interface that supports
role-based access, ensuring that teachers, students, and school staff
can easily access the information and tools relevant to their needs.
Ultimately, the goal is to improve the overall efficiency of school
operations, enhance the learning experience, and ensure better
decision-making through easy access to detailed reports and analytics
FEASIBILITY STUDY
A Feasibility Study is an essential part of any project, as it helps
evaluate whether the proposed system can be realistically developed,
implemented, and maintained. In the case of the School Management
System (SMS) built using C# .NET and SQL Server, the feasibility
study will assess the system's technical feasibility, economic
feasibility, operational feasibility, and legal feasibility. The goal is to
determine if the project is viable, if it can be completed within budget
and time constraints, and if it can be used effectively by the intended
users.
14
1. Technical Feasibility
Technical feasibility involves assessing whether the proposed
system can be developed with the available technology and
resources.
Technological Requirements:
o The School Management System will be developed using C# .NET,
which is a widely used and supported technology. The framework
provides all the necessary features for building scalable desktop
applications with an intuitive user interface.
o The backend will use SQL Server for storing and managing data. SQL
Server is a powerful and secure relational database management
system that can handle large datasets and support complex queries.
o Microsoft Visual Studio will be used as the Integrated Development
Environment (IDE), which provides tools and features for developing,
debugging, and deploying applications built in C# .NET.
Hardware Requirements:
o The system can run on standard hardware typically available in most
schools. The minimum system requirements include:
A personal computer or server with at least 8 GB RAM,
2.0 GHz processor, and 512 GB of storage.
A local network setup for connecting multiple machines
if the system is to be used in a networked environment.
Skill Requirements:
Developers with proficiency in C# .NET, SQL Server, and
experience in database design and system integration will be
required to develop and maintain the system.
End users, such as administrators, teachers, and school staff,
will need basic computer literacy to operate the system.
Integration with Existing Systems:
If the school is already using other software or systems (e.g.,
Excel sheets, legacy systems), there may be a need for data
migration or system integration. This can be managed through
appropriate planning and the use of data import/export features.
2. Economic Feasibility
15
Economic feasibility assesses the financial aspects of the proposed
system, including cost-benefit analysis and the return on investment
(ROI).
Initial Costs:
Development Costs: The development of the system using C#
.NET will involve costs related to the salaries of developers,
project managers, and other personnel involved in the creation
of the system.
Software Costs: Microsoft Visual Studio is free for smaller-
scale projects, but the school may need to purchase licenses for
the SQL Server or other tools if they choose the paid versions.
Hardware Costs: If the school does not have sufficient
hardware, the cost of acquiring servers and computers will be
an additional cost to the project.
3. Operational Feasibility
Operational feasibility examines whether the system will be effective
and accepted by the intended users (administrators, teachers, students,
and parents), and whether it will function as intended within the
school’s operations.
User Acceptance:
The system's user interface (UI) will be designed to be user-
friendly, ensuring that non-technical staff can easily navigate the
application. Training sessions will be held to help users become
familiar with the system.
Feedback from early users during pilot testing will be collected
to ensure the system meets the needs of teachers, administrators,
and parents.
System Functionality:
The system will cover all critical functionalities such as student
and teacher management, attendance tracking, grade
management, fee collection, and report generation, ensuring it
integrates smoothly into daily school operations.
The system will be designed to be intuitive and minimize the
learning curve for users, with clear instructions and help options
available.
16
Support and Training:
The system will provide sufficient documentation, and help
resources will be integrated into the application. Additionally,
training will be provided to school staff to ensure they can use
the system effectively.
A support system (technical assistance and troubleshooting)
will be put in place to address any issues that may arise.
Scalability:
The system will be scalable, meaning it can grow along with the
school. As the number of students, teachers, or administrative
processes increases, the system will be able to handle additional
data and users without compromising performance.
4. Legal Feasibility
Legal feasibility involves examining whether the system complies
with any laws, regulations, and policies relevant to data management
and school operations.
Data Privacy and Security:
Since the system will store sensitive information such as
student academic records, personal data, and financial
information, it must adhere to data privacy regulations (e.g.,
GDPR, CCPA, or any local data protection laws).
Security measures, such as encrypted data storage, secure login
systems, and regular backups, will be implemented to protect
data from unauthorized access and breaches.
Licensing:
The system will use C# .NET and SQL Server, both of which
have licensing requirements. It’s important to ensure that all
software used in the development and deployment of the system
is properly licensed to avoid legal issues.
Compliance with Education Regulations:
The system will be designed to comply with any national or
local educational policies regarding record-keeping, reporting,
and student management
17
USER REQUIREMENTS
The User Requirements section outlines the specific needs and
expectations of the different user groups who will interact with the
School Management System (SMS). The system is designed to serve
various stakeholders, including administrators, teachers, students, and
parents. Each group will have different access levels and
functionalities, tailored to their needs to ensure smooth operation and
effective management of the school’s activities.
1. Administrator Requirements:
The Administrator is the key user responsible for overseeing the entire
system and managing all aspects of school operations. This user will have
the highest level of access to all features of the system.
User Authentication and Authorization:
Administrators must be able to securely log in using a unique
username and password.
Role-based access control to restrict certain functionalities for non-
admin users.
Student Management:
Ability to add, update, and delete student records.
Manage student admission details, including personal information,
class/section assignment, and fee structure.
View and track student performance, attendance, and fee payments.
Teacher Management:
Add and manage teacher records, including personal details,
subjects taught, and class assignments.
Schedule teacher timings, classes, and monitor performance and
attendance.
Fee Management:
Set up and manage the fee structure, including category-wise fees,
discounts, and payment deadlines.
18
Generate fee receipts and track fee payments for students.
Send fee reminders to parents when payments are due or overdue.
Reports and Analytics:
Generate and view customized reports based on student
performance, attendance, fee payments, and other administrative
tasks.
Print and export reports in formats like Table etc.
System Configuration:
Set up school policies, including grading systems, class structures,
and holiday schedules.
Configure system settings and preferences.
2. Student Requirements
The student is the primary user who will access the system to view their
own academic information, attendance, grades, and communicate with
teachers and administrators.
User Authentication:
Students must log in using their unique
username and password.
Personal Information:
View and update personal information, including contact details
and medical records, if necessary.
Fee Information:
View fee status, including due payments and payment history.
Receive reminders about due fees or upcoming fee deadlines.
19
3. ANALYSIS AND DESIGN
OBJECT DIAGRAM
o Admin Module:
20
CLASS DIAGRAM
o Faculty Module:
School Master
+Schoolid
Master
+School Name
+ClassId +School Owner
+Class Name 1 2 +Mobile No
New Student
+Fullname
+Studentid
+First Name
Student +Middle Name
5 Student Wise Admission
+Last Name
+Fullname +Mother Name +Fullname
+Studentid +Cast
+First Name +Mobile No
+Middle Name 3 +Address
+Last Name
+Mother Name
+Cast
+Mobile No
+Address 4
Student Payment
+Fullname
+Studentid
+First Name
+Middle Name
+Last Name
+Mobile No
+Total Remaining
+Amount
+Pay Date
21
USE CASE DIAGRAM
o Overall Project Use Case:
Admission
include
Admission Details
New Admission
Student wise
All Admission Details Admission Details
Student
Student Payment
Class Master
School Master
22
SEQUENCE DIAGRAM
o Main Activity:
Student Details
Server
X X X
23
ACTIVITY DIAGRAM
o Admin Module – Admission
Admission
No
Valid
Yes
New Admission
Admission Detail
Student wise
All Admission Detail Admission Detail
24
MODULE HIERARCHY DIAGRAM
Admin
All Admission
Payment Detail Detail
All Student Student wise
Payment Admission Detail
Student Wise
Payment
Student Detail
25
COMPONENT DIAGRAM
User Interface
Desktop
Application
Database Server
26
DEPLOYMENT DIAGRAM
Software
27
MODULE SPECIFICATIONS
Module 1: Master Class
Functionality:
o Define different classes or grade levels (e.g., 1st grade, 2nd
grade, etc.)
o Class scheduling and teacher assignment.
o Set class timings, subjects, and teachers.
o Option to edit, delete, or view the details of a class.
o List of students assigned to each class.
Features:
o Add Class: Allow adding new classes or grade levels.
o Edit Class: Modify details of an existing class.
o View Class: Display all class details including student lists and
teacher details.
Features:
o Assign Student to Class: Enroll students into the specific class.
o View Students in Class: Display students currently in a class.
o Edit Student Class: Option to change class assignment.
Features:
o Add New Student: Form to input details of a new student.
o Assign Class: Link the student to a class for admission.
28
o Edit Student Details: Modify student records as required.
Features:
o Add Payment: Record new payments made by students.
o Update Payment Status: Mark payments as completed or
pending.
o Generate Receipt: Automatically create and print receipts for
payments.
o Payment History: View a history of payments for each student.
Features:
o View All Payments: Display a list of all payments made by all
students.
o Filter Payments: Search for payments by student name,
payment date, or payment type.
o View Payment History: Display historical payments for each
student.
Features:
29
o View All Student Payments: A list showing the total payments
from all students.
Features:
o View Student Payments: Display all payments made by a
specific student.
o Outstanding Payment: Display any pending fees for the
student.
o Payment History: Show a detailed history of payments,
including dates and amounts.
Features:
o Add New Admission: Form to input details for a new student's
admission.
o Assign Class: Assign the student to the appropriate class level.
o Admission Fee Payment: Record initial admission fees.
o Admission Form Upload: Upload relevant student documents
such as birth certificates, etc.
Features:
o View All Admissions: Display a comprehensive list of all
students admitted.
Module 11: Student Wise Admission Detail
Functionality:
o Provide detailed admission records for individual students.
o View the complete admission process from start to finish for a
particular student.
Features:
o View Admission Record: Show the student's admission status,
class, and dates.
o Documents: Display uploaded documents related to the
admission.
o Admission History: Track changes in the student's admission
status over time.
31
USER INTERFACE DESIGN
Main Screen:
32
School Master Screen:
33
Student Payment Screen:
34
Studenwise Payment Screen:
Student Detail:
35
New Admission:
36
Studentwise Admission Detail:
37
TEST PROCEDURES AND IMPLEMENTATION
38
Testing Methodology: The testing methodology for the School
Management System (SMS) involves a structured approach to ensure the
application meets all functional, non-functional, and user requirements.
It begins with unit testing, where individual components or methods of
the system are tested in isolation to verify their correctness. This phase
ensures that the building blocks of the system, such as student
registration, grade management, and login functionality, work as
expected. Once unit testing is completed, the focus shifts to integration
testing, where different system components are tested together to ensure
that data flows correctly between modules like the database, user
interface, and business logic. This helps identify issues in how the
components interact with each other.
39
(IDE), where different classes, methods, and modules are created. The
core modules of the system, such as student management, teacher
management, course scheduling, and grade tracking, are developed using
C# classes and business logic. These modules are connected to a back-
end database, often SQL Server, to store and retrieve data like student
records, course details, and grades.
The user interface (UI) is implemented using Windows Forms or
ASP.NET (depending on whether it's a desktop or web-based
application), ensuring that the system is easy to navigate for both
administrators and users. Features such as user authentication, role-based
access control (for students, teachers, and administrators), and CRUD
operations (Create, Read, Update, Delete) for students, courses, and
grades are integrated. During implementation, error handling, data
validation, and exception management are included to ensure the system
runs smoothly and securely. The application is also tested progressively,
starting with unit tests for individual components, followed by integration
tests to ensure seamless interaction between modules. After the core
functionality is in place, performance optimization and security
measures, such as encryption for sensitive data, are incorporated.
Overall, the implementation phase involves coding, testing, and refining
the system until all requirements are met, ensuring that the School
Management System is fully functional, reliable, and ready for
deployment in the real world.
40
4. USER MANUAL
User Manual:
The School Management System (SMS) is designed to help manage
and streamline various administrative tasks for schools, enhancing
overall efficiency and effectiveness. This user manual provides a
comprehensive guide on how the system can be used
by Administrators, Teachers, Students, and Parents. Each group has
specific roles and functionalities, which are outlined below.
For Administrators, the system provides full access to all features,
enabling them to manage students, teachers, and school operations.
Administrators can create and manage student records, track
admissions, and monitor academic performance. They also have
control over fee management, including setting up fee structures,
generating fee receipts, and tracking payments. In addition,
administrators can create and assign timetables, generate various
reports (such as attendance and performance reports), and ensure data
security through secure login and password protection. The
administrator’s role also includes configuring system settings and
ensuring that the system operates smoothly and securely. They have
access to a wide range of reports and analytical tools that can assist in
decision-making for better school management.
Teachers, on the other hand, have access to features that allow them
to manage their classes and student progress. Teachers can update
class timetables, mark attendance, and input student grades. The
system also allows teachers to generate student progress reports and
provide feedback. Communication tools within the system enable
teachers to send messages or notices to students and parents regarding
assignments, grades, and upcoming exams. Teachers can also track
and monitor student attendance, and generate detailed attendance
reports, ensuring that they have all the information they need to assess
student performance effectively.
Students can use the system to track their academic progress and
attendance. Each student has a unique profile where they can access
their grades, view class timetables, and monitor their attendance
records. The system also allows students to view and manage their fee
41
status. Notifications regarding due dates for assignments or exams are
also available to keep students informed. Additionally, students can
communicate with teachers regarding academic concerns or queries,
making the system an effective tool for learning and communication.
For Parents, the system provides a transparent view of their child’s
academic progress and overall school performance. Parents can access
their child’s grades, attendance records, and fee information. The
system allows parents to stay informed about school events, parent-
teacher meetings, and other important notices. Parents can also use the
communication features to send messages to teachers or
administrators, ensuring that they are actively involved in their child’s
education. The system’s user-friendly interface and easy navigation
make it convenient for parents to keep track of their child’s schooling
and address any issues promptly.
Overall, the School Management System aims to simplify and
automate many school management processes. It ensures that all
stakeholders—administrators, teachers, students, and parents—have
the tools and information they need to efficiently manage and track
school activities. The system is designed to be user-friendly, with
intuitive interfaces that allow for seamless navigation and easy access
to essential data. It enhances communication within the school and
helps in making informed decisions, contributing to a more organized
and efficient school environment.
42
Flow Chart:
43
5. DRAWBACKS AND LIMITATIONS
44
6. PROPOSED ENHANCEMENTS
PROPOSED ENHANCEMENTS:
Improve the user interface with a more modern and intuitive design
to enhance usability for non-technical users.
Implement offline functionality, allowing users to continue using the
system without internet connectivity, with synchronization once the
connection is restored.
Introduce role-based access control to restrict access to sensitive
information based on the user's role (admin, student)
Provide detailed analytics and customizable reporting tools for better
tracking of student performance, attendance, and financial data.
Incorporate real-time alerts and notifications to inform users about
important events like exam schedules, fee dues, and attendance
issues.
Implement AI-based attendance systems using facial recognition or
biometric technologies to automate and improve attendance
marking.
Add integration with local payment systems for fee payments,
allowing parents to pay fees directly from the system.
Enhance data security by integrating encryption methods to protect
sensitive student and staff information from unauthorized access.
Allow users to create personalized dashboards with widgets that
show the most relevant data for their role.
Implement automatic data backup and restore functionality to ensure
data integrity and recovery in case of system failure.
45
7. CONCLUSIONS
CONCLUSIONS:
The system significantly enhances the efficiency of school
administration by automating repetitive tasks like management, and
fee processing.
Centralized storage of student, and administrative data improves
accessibility, organization, and data consistency across the school.
By integrating security features like role-based access control and
encryption, the system ensures the privacy and integrity of sensitive
data.
The system is scalable, allowing schools of different sizes to adapt as
they grow, managing increasing numbers of students.
Automation of administrative tasks reduces manual effort, saving time
and resources for school staff while also reducing the likelihood of
human errors.
The system’s intuitive user interface makes it easy for non-technical
users, such as teachers and parents, to interact with the system
effectively.
The system provides detailed tracking of student performance,
attendance, and progress, helping educators identify areas that need
attention.
The system can be tailored to meet the specific needs of individual
schools, making it a flexible solution for diverse educational
environments.
46
8. BIBLIOGRAPHY
Website:
https://www.google.com/
https://www.w3schools.com/
https://www.geeksforgeeks.org/
https://www.javatpoint.com/
https://www.youtube.com/
https://www.codeproject.com/
47
9. ANNEXURE
• SAMPLE PROGRAM CODE:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration;
namespace SchoolManagement
{
public partial class Newstudent : Form
{
SqlConnection con = new
SqlConnection(System.Configuration.ConfigurationSettings.AppSettings[
"School"].ToString());
public Newstudent()
{
InitializeComponent();
}
48
{
try
{
SqlCommand cmd = new SqlCommand();
if (studentid.Text == "")
{
cmd.Parameters.AddWithValue("@studentid", null);
}
else
{
cmd.Parameters.AddWithValue("@studentid",
studentid.Text);
}
cmd.Parameters.AddWithValue("@fname", fname.Text);
cmd.Parameters.AddWithValue("@mname", mname.Text);
cmd.Parameters.AddWithValue("@lname", lname.Text);
cmd.Parameters.AddWithValue("@mothername",
mothername.Text);
cmd.Parameters.AddWithValue("@scast", cast.Text);
cmd.Parameters.AddWithValue("@castcategory",
castcategory.Text);
cmd.Parameters.AddWithValue("@mobileno", mobileno.Text);
cmd.Parameters.AddWithValue("@contactno", contactno.Text);
cmd.Parameters.AddWithValue("@address", address.Text);
49
SqlParameter error = cmd.Parameters.Add("@Errormsg",
SqlDbType.VarChar, 500);
error.Direction = ParameterDirection.Output;
SqlParameter retval = cmd.Parameters.Add("@ret",
SqlDbType.Int);
retval.Direction = ParameterDirection.ReturnValue;
cmd.CommandText = "[sp_student]";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Connection = con;
con.Open();
cmd.ExecuteNonQuery();
if (ret > 0)
{
MessageBox.Show("Saved Successfully");
}
else
{
string err = (string)error.Value;
MessageBox.Show(err);
}
}
catch (Exception ex)
{
50
MessageBox.Show(ex.Message);
}
finally
{
con.Close();
}
}
51
listBox1.Items.Clear();
listBox1.Visible = false;
}
}
}
52
SqlDataAdapter adptr = new SqlDataAdapter("select * from
tblstudent where fullname='" + fullname.Text + "'", con);
DataSet ds = new DataSet();
adptr.Fill(ds);
if (ds.Tables[0].Rows.Count > 0)
{
studentid.Text = ds.Tables[0].Rows[0]["studentid"].ToString();
fname.Text = ds.Tables[0].Rows[0]["fname"].ToString();
mname.Text = ds.Tables[0].Rows[0]["mname"].ToString();
lname.Text = ds.Tables[0].Rows[0]["lname"].ToString();
mobileno.Text = ds.Tables[0].Rows[0]["mobileno"].ToString();
contactno.Text = ds.Tables[0].Rows[0]["contactno"].ToString();
mothername.Text =
ds.Tables[0].Rows[0]["mothername"].ToString();
cast.Text = ds.Tables[0].Rows[0]["scast"].ToString();
castcategory.Text =
ds.Tables[0].Rows[0]["castcategory"].ToString();
address.Text = ds.Tables[0].Rows[0]["address"].ToString();
}
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
53