























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A student project focusing on the development of an inventory management system for food shops using c# programming within the .net framework. The project aims to streamline inventory tracking, ordering, and sales processes, enhancing efficiency and accuracy. A brief overview of the system's design, architecture, and functionalities, highlighting the use of object-oriented principles and a user-friendly interface. It also discusses the challenges faced by food shops in managing inventory effectively and the benefits of implementing such systems.
Typology: Thesis
1 / 63
This page cannot be seen from the preview
Don't miss anything!
























































Due Date: 30 April, 2024
Abstract: My report presents an inventory management system tailored for food shops, developed using C# programming language within the .NET framework. The system aims to streamline inventory tracking, ordering, and sales processes to enhance efficiency and accuracy. Utilizing object-oriented principles, the system employs a user- friendly interface for easy navigation and interaction. The general theoretical approach incorporates principles of database management and user interface design. Research methods involve iterative development cycles, incorporating feedback from potential end-users to refine functionality and usability. By leveraging C# and .NET, the system ensures scalability, reliability, and compatibility with modern computing environments. This abstract provides a succinct overview of the food shop inventory management system, highlighting its significance in optimizing operations and improving business outcomes Introduction: i. The research question addressed in this paper revolves around the development and implementation of a food shop inventory management system using C# programming within the .NET framework. The primary purpose is to create a software solution that streamlines inventory management processes, enhances accuracy, and improves overall efficiency in food shop operations. ii. The significance of this study lies in the growing need for efficient inventory management systems in food shops to meet the demands of an increasingly competitive market. By automating inventory tracking, ordering, and sales processes, businesses can reduce errors, minimize stockouts, optimize inventory levels, and ultimately improve customer satisfaction and profitability. iii. In exploring this research question, a background analysis reveals the challenges faced by food shops in managing their inventory effectively. Literature review indicates that while various inventory management systems exist, customization to suit the specific needs of food shops is often necessary for optimal performance. Relevant studies also highlight the benefits of implementing such systems, including cost savings, time efficiency, and improved decision-making. iv. The data for this study primarily comprise input from food shop owners, managers, and employees regarding their current inventory management practices, challenges faced, and desired features in an ideal system. The methodology involves iterative development cycles, incorporating feedback from stakeholders to refine the system's functionality and usability. Additionally, the development process adheres to established software engineering principles to ensure reliability, scalability, and maintainability. v. This paper is organized as follows: The next section provides an overview of the theoretical framework and design principles underlying the development of the inventory management system. Subsequent sections detail the system's architecture, features, and functionalities. The paper concludes with a discussion on the implications of the system for food shop operations and potential areas for future research and development. Main Body:
business logic or rules of the application. This layer contains the code that defines how data should be processed, validated, and manipulated to achieve specific business requirements. UI(User Interface): The UI layer files are responsible for presenting information to the user and capturing user input. It includes the graphical components, such as forms, controls, and widgets, that allow users to interact with the application.
using AnyStore.UI; 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 AnyStore { public partial class frmAdminDashboard : Form { public frmAdminDashboard() { InitializeComponent(); } private void usersToolStripMenuItem_Click(object sender, EventArgs e) { frmUsers user = new frmUsers(); user.Show(); } private void frmAdminDashboard_FormClosed(object sender, FormClosedEventArgs e) {
frmLogin login = new frmLogin(); login.Show(); this.Hide(); } private void frmAdminDashboard_Load(object sender, EventArgs e) { lblLoggedInUser.Text = frmLogin.loggedIn; } private void categoryToolStripMenuItem_Click(object sender, EventArgs e) { frmCategories category = new frmCategories(); category.Show(); } private void productsToolStripMenuItem_Click(object sender, EventArgs e) { frmProducts product = new frmProducts(); product.Show(); } private void deealerAndCustomerToolStripMenuItem_Click(object sender, EventArgs e) { frmDeaCust DeaCust = new frmDeaCust(); DeaCust.Show(); } private void transactionToolStripMenuItem_Click(object sender, EventArgs e) { frmTransactions transaction = new frmTransactions(); transaction.Show(); } private void inventoryToolStripMenuItem_Click(object sender, EventArgs e) { frmInventory inventory = new frmInventory(); inventory.Show(); } } }
public void Clear() { txtCategoryID.Text = ""; txtTitle.Text = ""; txtDescription.Text = ""; txtSearch.Text = ""; } private void frmCategories_Load(object sender, EventArgs e) { //Here write the code to display all the categries in DAta Grid View DataTable dt = dal.Select(); dgvCategories.DataSource = dt; } private void dgvCategories_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { //Finding the Row Index of the Row Clicked on Data Grid View int RowIndex = e.RowIndex; txtCategoryID.Text = dgvCategories.Rows[RowIndex].Cells[0].Value.ToString(); txtTitle.Text = dgvCategories.Rows[RowIndex].Cells[1].Value.ToString(); txtDescription.Text = dgvCategories.Rows[RowIndex].Cells[2].Value.ToString(); } private void btnUpdate_Click(object sender, EventArgs e) { //Get the Values from the CAtegory form c.id = int.Parse(txtCategoryID.Text); c.title = txtTitle.Text; c.description = txtDescription.Text; c.added_date = DateTime.Now; //Getting ID in Added by field string loggedUser = frmLogin.loggedIn; userBLL usr = udal.GetIDFromUsername(loggedUser); //Passign the id of Logged in User in added by field c.added_by = usr.id; //Creating Boolean variable to update categories and check bool success = dal.Update(c); //If the cateory is updated successfully then the value of success will be true else it will be false if(success==true) { //CAtegory updated Successfully MessageBox.Show("Category Updated Successfully"); Clear(); //Refresh Data Gid View DataTable dt = dal.Select(); dgvCategories.DataSource = dt; } else { //FAiled to Update Category MessageBox.Show("Failed to Update Category"); } } private void btnDelete_Click(object sender, EventArgs e) { //Get te ID of the Category Which we want to Delete c.id = int.Parse(txtCategoryID.Text); //Creating Boolean Variable to Delete The CAtegory bool success = dal.Delete(c);
//If the CAtegory id Deleted Successfully then the vaue of success will be true else it will be false if(success==true) { //Category Deleted Successfully MessageBox.Show("Category Deleted Successfully"); Clear(); //REfreshing DAta Grid View DataTable dt = dal.Select(); dgvCategories.DataSource = dt; } else { //FAiled to Delete CAtegory MessageBox.Show("Failed to Delete CAtegory"); } } private void txtSearch_TextChanged(object sender, EventArgs e) { //Get the Keywords string keywords = txtSearch.Text; //Filte the categories based on keywords if(keywords!=null) { //Use Searh Method To Display Categoreis DataTable dt = dal.Search(keywords); dgvCategories.DataSource = dt; } else { //Use Select Method to Display All Categories DataTable dt = dal.Select(); dgvCategories.DataSource = dt; } } } }
txtDeaCustID.Text = ""; txtName.Text = ""; txtEmail.Text = ""; txtContact.Text = ""; txtAddress.Text = ""; txtSearch.Text = ""; } private void frmDeaCust_Load(object sender, EventArgs e) { //Refresh Data Grid View DataTable dt = dcDal.Select(); dgvDeaCust.DataSource = dt; } private void dgvDeaCust_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { //int variable to get the identityof row clicked int rowIndex = e.RowIndex; txtDeaCustID.Text = dgvDeaCust.Rows[rowIndex].Cells[0].Value.ToString(); cmbDeaCust.Text = dgvDeaCust.Rows[rowIndex].Cells[1].Value.ToString(); txtName.Text = dgvDeaCust.Rows[rowIndex].Cells[2].Value.ToString(); txtEmail.Text = dgvDeaCust.Rows[rowIndex].Cells[3].Value.ToString(); txtContact.Text = dgvDeaCust.Rows[rowIndex].Cells[4].Value.ToString(); txtAddress.Text = dgvDeaCust.Rows[rowIndex].Cells[5].Value.ToString(); } private void btnUpdate_Click(object sender, EventArgs e) { //Get the values from Form dc.id = int.Parse(txtDeaCustID.Text); dc.type = cmbDeaCust.Text; dc.name = txtName.Text; dc.email = txtEmail.Text; dc.contact = txtContact.Text; dc.address = txtAddress.Text; dc.added_date = DateTime.Now; //Getting the ID to Logged in user and passign its value in dealer or cutomer module string loggedUsr = frmLogin.loggedIn; userBLL usr = uDal.GetIDFromUsername(loggedUsr); dc.added_by = usr.id; //create boolean variable to check whether the dealer or customer is updated or not bool success = dcDal.Update(dc); if(success==true) { //Dealer and Customer update Successfully MessageBox.Show("Dealer or Customer updated Successfully"); Clear(); //Refresh the Data Grid View DataTable dt = dcDal.Select(); dgvDeaCust.DataSource = dt; } else { //Failed to udate Dealer or Customer MessageBox.Show("Failed to Udpate Dealer or Customer"); } } private void btnDelete_Click(object sender, EventArgs e) { //Get the id of the user to be deleted from form
dc.id = int.Parse(txtDeaCustID.Text); //Create boolean variable to check wheteher the dealer or customer is deleted or not bool success = dcDal.Delete(dc); if(success==true) { //Dealer or Customer Deleted Successfully MessageBox.Show("Dealer or Customer Deleted Successfully"); Clear(); //Refresh the Data Grid View DataTable dt = dcDal.Select(); dgvDeaCust.DataSource = dt; } else { //Dealer or Customer Failed to Delete MessageBox.Show("Failed to Delete Dealer or Customer"); } } private void txtSearch_TextChanged(object sender, EventArgs e) { //Get the keyowrd from text box string keyword = txtSearch.Text; if(keyword!=null) { //Search the Dealer or Customer DataTable dt = dcDal.Search(keyword); dgvDeaCust.DataSource = dt; } else { //Show all the Dealer or Customer DataTable dt = dcDal.Select(); dgvDeaCust.DataSource = dt; } } } }
dgvProducts.DataSource = pdt; } private void cmbCategories_SelectedIndexChanged(object sender, EventArgs e) { //Display all the Products Based on Selected CAtegory string category = cmbCategories.Text; DataTable dt = pdal.DisplayProductsByCategory(category); dgvProducts.DataSource = dt; } private void btnAll_Click(object sender, EventArgs e) { //Display all the productswhen this button is clicked DataTable dt = pdal.Select(); dgvProducts.DataSource = dt; } } }
using AnyStore.BLL; using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace AnyStore.DAL { class categoriesDAL {
//Static String Method for Database Connection String static string myconnstrng = ConfigurationManager.ConnectionStrings["connstrng"].ConnectionString; #region Select Method public DataTable Select() { //Creating Database Connection SqlConnection conn = new SqlConnection("Data Source=NAFI\ SQLEXPRESS01;Initial Catalog=AnyStore;Integrated Security=True"); DataTable dt = new DataTable(); try { //Wrting SQL Query to get all the data from DAtabase string sql = "SELECT * FROM tbl_categories"; SqlCommand cmd = new SqlCommand(sql, conn); SqlDataAdapter adapter = new SqlDataAdapter(cmd); //Open DAtabase Connection conn.Open(); //Adding the value from adapter to Data TAble dt adapter.Fill(dt); } catch(Exception ex) { MessageBox.Show(ex.Message); } finally { conn.Close(); } return dt; } #endregion #region Insert New CAtegory public bool Insert(categoriesBLL c) { //Creating A Boolean VAriable and set its default value to false bool isSucces = false; //Connecting to Database SqlConnection conn = new SqlConnection("Data Source=NAFI\ SQLEXPRESS01;Initial Catalog=AnyStore;Integrated Security=True"); try { //Writing Query to Add New Category string sql = "INSERT INTO tbl_categories (title, description, added_date, added_by) VALUES (@title, @description, @added_date, @added_by)"; //Creating SQL Command to pass values in our query SqlCommand cmd = new SqlCommand(sql, conn); //Passing Values through parameter cmd.Parameters.AddWithValue("@title", c.title); cmd.Parameters.AddWithValue("@description", c.description); cmd.Parameters.AddWithValue("@added_date", c.added_date); cmd.Parameters.AddWithValue("@added_by", c.added_by); //Open Database Connection conn.Open(); //Creating the int variable to execute query