Вы находитесь на странице: 1из 14

PROBLEM STATEMENT

This CRIMINAL DATABASE system can efficiently store and retrieve data of staff including name, ID, address.

HARDWARE AND SOFTWARE REQUIREMENT


SOFTWARE REQUIREMENT
FRONT END

Microsoft Visual C# 2008 Express Edition

Microsoft Visual Studio Express is a set of freeware[ integrated development environments (IDE) developed by Microsoft that are lightweight versions of theMicrosoft Visual Studio product line. Express Editions were conceived beginning with Visual Studio 2005. The idea of Express editions, according to Microsoft, is to provide streamlined, easy-to-use and easy-to-learn IDEs for users other than professional software developers, such as hobbyists and students. Visual C# Express is an easy-to-use, free, lightweight, integrated development environment (IDE) designed for beginning developers, students, and hobbyists interested in building console-based applications, class libraries, Windows Forms and Windows Presentation Foundation applications. It can be used to create applications and games for Windows, Xbox 360 and Zune.

BACK END - Microsoft Office Access 2007 Microsoft Office Access, previously known as Microsoft Access, is a relational database management system from Microsoft that combines the relationalMicrosoft Jet Database Engine with a graphical user interface and

software-development tools. It is a member of the Microsoft Office suite of applications, included in the Professional and higher editions or sold separately.MS Access stores data in its own format based on the Access Jet Database Engine. It can also import or link directly to data stored in other applications and databases.[. Software developers and data architects can use Microsoft Access to develop application software, and "power users" can use it to build simple applications. Like other Office applications, Access is supported by Visual Basic for Applications, an object-oriented programming language that can reference a variety of objects including DAO (Data Access Objects), ActiveX Data Objects, and many other ActiveX components. Visual objects used in forms and reports expose their methods and properties in the VBA programming environment, and VBA code modules may declare and call Windows operating-system functions

1. OPERATING SYSTEM - Windows XP or higher versions

HARDWARE REQUIREMENTS

1. 2. 3. 4. 5.

PROCESSOR HARD DISK MONITOR RAM KEYBOARD

: Intel Core : 1 GB or more : VGA/SVGA : 16 MB or more : 104 keys : 2 or 3 buttons

6. MOUSE

SCREENSHOTS

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; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

private void toolStripMenuItem2_Click(object sender, EventArgs e) { frmstaff frmstf = new frmstaff(); frmstf.Show(); } private void toolStripMenuItem3_Click(object sender, EventArgs e) { frmview fv = new frmview(); fv.Show(); } private void toolStripMenuItem4_Click(object sender, EventArgs e) { frmdel fd = new frmdel(); fd.Show(); } private void toolStripMenuItem5_Click(object sender, EventArgs e) { frmupdate fu = new frmupdate(); fu.Show(); } private void toolStripMenuItem6_Click(object sender, EventArgs e) { this.Close(); } private void Form1_Load(object sender, EventArgs e) { } private void label6_Click(object sender, EventArgs e) { } } }

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.OleDb; namespace WindowsFormsApplication1 { public partial class frmstaff : Form { public frmstaff() { InitializeComponent(); } private void Form2_Load(object sender, EventArgs e) {

btnsave.Enabled = false; } private void btnadd_Click(object sender, EventArgs e) {

//Provider=Microsoft.ACE.OLEDB.12.0;Data Source="C:\Documents and Settings\DIGIT\Desktop\student.accdb" OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Users\\nitheesh\\Desktop\\criminals.accdb"); OleDbCommand command = new OleDbCommand(); command.Connection = con; if (txtNme.Text != "" && cmbDpt.Text != "" && cmbDsgn.Text != "" && txtSal.Text != "") { command.CommandText = "insert into criminal values(" + txtSId.Text + ",'" + txtNme.Text.ToString() + "','" + cmbDpt.Text.ToString() ")"; command.CommandType = CommandType.Text; con.Open(); command.ExecuteNonQuery(); MessageBox.Show("New criminals added successfully"); txtSId.Text = ""; txtNme.Text = ""; cmbDpt.Text = ""; cmbDsgn.Text = ""; txtSal.Text = ""; } else { MessageBox.Show("Plz Enter All details......"); }

} private void txtSId_TextChanged(object sender, EventArgs e) { OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Users\\Nitheesh\\Desktop\\criminals.accdb"); OleDbCommand command = new OleDbCommand(); command.Connection = con; if (txtSId.Text != "") { command.CommandText = "select * from Criminals where SId=" + txtSId.Text; command.CommandType = CommandType.Text; con.Open(); OleDbDataReader dr = command.ExecuteReader();

if (dr.Read()) { btnsave.Enabled = false;

} else { btnsave.Enabled = true; } } else { btnsave.Enabled = false; }

private void btncancel_Click(object sender, EventArgs e) { txtSId.Text = ""; txtNme.Text = ""; cmbDpt.Text = ""; cmbDsgn.Text = ""; txtSal.Text = ""; } private void btnexit_Click(object sender, EventArgs e) { this.Close(); } private void cmbDpt_SelectedIndexChanged(object sender, EventArgs e) { } private void label6_Click(object sender, EventArgs e) { } private void label1_Click(object sender, EventArgs e) { } } }

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.OleDb; namespace WindowsFormsApplication1 { public partial class frmview : Form { public frmview() { InitializeComponent(); } private void btnsave_Click(object sender, EventArgs e) { OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Users\\Nitheesh\\criminals.accdb"); OleDbCommand command = new OleDbCommand();

command.Connection = con; command.CommandText = "select * from criminals where SId=" + txtSId.Text; command.CommandType = CommandType.Text; con.Open(); OleDbDataReader dr = command.ExecuteReader(); if (dr.Read()) { txtNme.Text = dr["Nme"].ToString(); cmbDpt.Text = dr["Dpt"].ToString(); cmbDsgn.Text = dr["Dsgn"].ToString(); txtSal.Text = dr["Sal"].ToString(); /*txtSId.Text = ""; txtNme.Text = ""; cmbDpt.Text = ""; cmbDsgn.Text = ""; txtSal.Text = ""; */ } else { MessageBox.Show("Invalid ID No:..."); txtSId.Text = ""; }

private void btncancel_Click(object sender, EventArgs e) { txtSId.Text = ""; txtNme.Text = ""; cmbDpt.Text = ""; cmbDsgn.Text = ""; txtSal.Text = ""; } private void btnexit_Click(object sender, EventArgs e) { this.Close(); } private void frmview_Load(object sender, EventArgs e) { btnview.Enabled = false; } private void txtSId_TextChanged(object sender, EventArgs e) { if (txtSId.Text != "") { btnview.Enabled = true; } else

{ } } private void cmbDpt_TextChanged(object sender, EventArgs e) { } private void label6_Click(object sender, EventArgs e) { } } } btnview.Enabled =false;

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.OleDb; namespace WindowsFormsApplication1 { public partial class frmupdate : Form { public frmupdate() { InitializeComponent(); } private void txtSId_TextChanged(object sender, EventArgs e) {

OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Users\\Nitheesh\\criminals.accdb"); OleDbCommand command = new OleDbCommand(); command.Connection = con; if (txtSId.Text != "") { command.CommandText = "select * from Criminals where SId=" + txtSId.Text; command.CommandType = CommandType.Text; con.Open(); OleDbDataReader dr = command.ExecuteReader(); if (dr.Read()) { btnUPDATE.Enabled = true; txtNme.Text = dr["Nme"].ToString(); cmbDpt.Text = dr["Dpt"].ToString(); cmbDsgn.Text = dr["Dsgn"].ToString(); txtSal.Text = dr["Sal"].ToString(); /*txtSId.Text = ""; txtNme.Text = ""; cmbDpt.Text = ""; cmbDsgn.Text = ""; txtSal.Text = ""; */ } else { btnUPDATE.Enabled = false; txtNme.Text = ""; cmbDpt.Text = ""; cmbDsgn.Text = ""; txtSal.Text = ""; } } else { btnUPDATE.Enabled = false; txtSId.Text = ""; txtNme.Text = ""; cmbDpt.Text = ""; cmbDsgn.Text = ""; txtSal.Text = ""; } } private void btnUPDATE_Click(object sender, EventArgs e) { DialogResult rs = MessageBox.Show("Are you Sure to update it?", "", MessageBoxButtons.YesNo);

if (rs == DialogResult.Yes) { //MessageBox.Show("hai..."); OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Users\\Nitheesh\\criminals.accdb"); OleDbCommand command = new OleDbCommand(); command.Connection = con; //command.CommandText = "update stud set Nme='" + txtNme.Text.ToString() + "',Brch='" + txtBrch.Text.ToString() + "',Roll=" + txtRNo.Text + ",Sem=" + txtSem.Text + "' where AdNo=" + txtAdNo.Text; command.CommandText = "update staff set Nme='" + txtNme.Text.ToString() + "',Dpt='" + cmbDpt.Text.ToString() + "',Dsgn='" + cmbDsgn.Text + "' ,Sal=" + txtSal.Text + " where SId=" + txtSId.Text; command.CommandType = CommandType.Text; con.Open(); command.ExecuteNonQuery(); MessageBox.Show("Updated..."); txtNme.Text = ""; txtSId.Text = ""; txtNme.Text = ""; cmbDpt.Text = ""; cmbDsgn.Text = ""; txtSal.Text = ""; } } private void btncancel_Click(object sender, EventArgs e) { txtSId.Text = ""; txtNme.Text = ""; cmbDpt.Text = ""; cmbDsgn.Text = ""; txtSal.Text = ""; } private void btnexit_Click(object sender, EventArgs e) { this.Close(); } private void frmupdate_Load(object sender, EventArgs e) { btnUPDATE.Enabled = false; } } }

Вам также может понравиться