DOTNET : Stock Management System Project with Source Code

Download Previous Project with Source Code :

  1. Book Inventory Project With Source Code
  2. Library Management System Project With Source Code
  3. School Management System Project With Source Code
Inventory management system project with source code

Stock Management System (SMS)

Description : SMS Project mostly deals with Material(product) management, it includes entire procurement cycle. For their need to maintain inventory for maintenances of all products, they are unable to track the inventory and how much material expenses done for each transaction, To overcome this problem client want to have an ERP system through which he can maintain his inventory, inventory system deals with entire procurement cycle i.e., Purchase Requisitions, purchase order, goods receipt and goods issue. To run this cycle their need to update like material, vendor(Dealer's), Customer details. To map this we created a data base for Product Master, Dealers Master and Customer master.

Moduels

  1. Vender | Dealer (Ready)
  2. Product (Ready)
  3. Category (Ready)
  4. Customer (Pending)
  5. Order (Not Started)
  6. Reports (Not Started)
To get more Info about Stock Management System Project :
Business Object Database Query
Business Logic Database Logic
Download Project

Business Object

Business Logic

Database Logic :

Query Builder Class :

Download Project with Source Code and Database



using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Entities
{
    public class Common_Functions
    {
        public string did { set; get; }
        public string dname { set; get; }
        public string dhouseno { set; get; }
        public string dstreetname { set; get; }
        public string darea { set; get; }
        public string dlandmark { set; get; }
        public string dcity { set; get; }
        public string dstate { set; get; }
        public string dpincode { set; get; }
        public string dcontactno { set; get; }
        public string dlandlineno { set; get; }
        public string dship_since { set; get; }

        // Category Properties       
        public string catid { set; get; }
        public string catname { set; get; }
        public string cat_did { set; get; }

        // Product Properties
        public string prodid { set; get; }
        public string prodname { set; get; }
        public string prod_company_name { set; get; }
        public string prod_manu_date { set; get; }
        public string prod_manu_exp_date { set; get; }
        public string prod_serial_no { set; get; }
        public string prod_batch_no { set; get; }
        public string prod_price { set; get; }
        public string prod_qty { set; get; }
        public string prod_catid { set; get; }
        public string prod_did { set; get; }

        //Customer
        public string custid { set; get; }
        public string custname { set; get; }
        public string cust_acc_create_date { set; get; }
        public string custphone { set; get; }
        public string custaddress { set; get; }
        public string cust_prod_cost { set; get; }
        public string cust_prod_quality { set; get; }
        public string cust_mode_of_payment { set; get; }
        
        public string cust_amt_pay { set; get; }
        public string cust_bankname_creditcardno { set; get; }
        public string cust_checkddno_trnx_no { set; get; }

        public string cust_payment_id { set; get; }

    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using SMS_DAL;
using Entities;


namespace SMS_BAL
{
    public class BAL
    {
        DAL dblogic = new DAL();

        /// 
        /// Get ALL Records
        /// 
        /// <param name="_com_fun_prop"></param>
        /// 
        public DataSet Get_Dealers()
        {
            return dblogic.Get_All_Dealer();
        }
        public DataSet Get_Did_Dname()
        {
            return dblogic.Get_DID_DName();
        }
        public DataSet Get_Category()
        {
            return dblogic.Get_All_Category();
        }
        //  Get Category ID and Name
        public DataSet Get_CID_CNAME()
        {
            return dblogic.Get_CID_CName();
        }
        public DataSet Get_ALLProduct()
        {
            return dblogic.Get_Product_ALL();
        }
        public DataSet Get_Mode_Of_Payment()
        {
            return dblogic.Get_Payment_Mode();
        }
        /// 
        /// Get Particular Records with passing Parameter
        /// 
        /// 
        /// 
        public DataSet Get_Dealer_with_ID(Common_Functions _com_fun_dealer_id)
        {
            return dblogic.Get_Dealer_ID(_com_fun_dealer_id);
        }
        public DataSet Get_Product_Dealer(Common_Functions _com_fun_prod_dealer)
        {
            return dblogic.Get_Product_Dealer(_com_fun_prod_dealer);
        }
        public DataSet Get_Product_ID(Common_Functions _com_fun_prod_ID)
        {
            return dblogic.Get_Product_ID(_com_fun_prod_ID);
        }
        public DataSet Get_Cat_ID(Common_Functions _com_fun_c_ID)
        {
            return dblogic.Get_Category_ID(_com_fun_c_ID);
        }
        public DataSet Get_Product_Category(Common_Functions _com_fun_cat_prod)
        {
            return dblogic.Get_Category_Product(_com_fun_cat_prod);
        }
        public DataSet Get_CName_DName_Prod_Edit(Common_Functions _com_fun_cn_dn_prod_edit)
        {
            return dblogic.Get_CName_DName_Product_Edit(_com_fun_cn_dn_prod_edit);
        }
        public DataSet Get_CID_CName_Through_ProdID(Common_Functions _com_fun_cid_cnam_pID)
        {
            return dblogic.Get_CID_CName_Through_ProdID(_com_fun_cid_cnam_pID);
        }
        public DataSet Get_Pay_Details(Common_Functions _com_fun_cust_pay_id)
        {
            return dblogic.Get_Payment_Details(_com_fun_cust_pay_id);
        }
        public DataSet Get_ModeOfPay(Common_Functions _com_fun_cust_payment_mode)
        {
            return dblogic.Get_PaymentMode_ID(_com_fun_cust_payment_mode);
        }
        public bool Get_Cust_ID(Common_Functions _com_fun_cust_ID)
        {
            DataSet dscustid = new DataSet();
            dscustid = dblogic.Get_Customer_ID(_com_fun_cust_ID);
            if (dscustid.Tables[0].Rows.Count > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        public DataSet Get_Cust_Details_ID(Common_Functions _com_fun_cust_Details_ID)
        {
            return dblogic.Get_Customer_ID(_com_fun_cust_Details_ID);
        }


        /// 
        /// Insert Data
        /// 
        /// 
        
        //Insert Dealer
        public void Insert_Dealer(Common_Functions _com_fun_insert_dealer)
        {
            try
            {
                dblogic.Insert_Dealer(_com_fun_insert_dealer);
            }
            catch
            {
                throw;
            }
        }
        // Insert Category
        public void Insert_Category(Common_Functions _con_fun_insert_cat)
        {
            try
            {
                dblogic.Insert_Category(_con_fun_insert_cat);
            }
            catch
            {
                throw;
            }
        }
        public void Insert_Product(Common_Functions _com_fun_insert_prod)
        {
            try
            {
                dblogic.Insert_Product(_com_fun_insert_prod);
            }
            catch
            {
                throw;
            }
        }
        public void Insert_Cust(Common_Functions _com_fun_insert_customer)
        {
            try
            {
                dblogic.Insert_Customer(_com_fun_insert_customer);
            }
            catch
            {
                throw;
            }
        }

        ///
        /// Update Date
        /// 
        public void update_prod_ID(Common_Functions _com_fun_update)
        {
            try
            {
                dblogic.Update_Product_ID(_com_fun_update);
            }
            catch
            {
                throw;
            }
        }

        ///
        /// Delete Data
        /// 
        public void delete_prod_ID(Common_Functions _com_fun_del_prod)
        {
            try
            {
                dblogic.Delete_Product_ID(_com_fun_del_prod);
            }
            catch
            {
                throw;
            }
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using Query_Builder;
using Entities;


namespace SMS_DAL
{    
    public class DAL
    {
        SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["sms_db"].ConnectionString);
        SqlDataAdapter da;
        string sql_query;
        string case_name;
        

        /// 
        /// Get All Delears Records from SQL
        /// 
        /// 
        /// 
        public DataSet Get_All_Dealer()
        {
            try
            {
                DataSet ds_get_dealer = new DataSet();
                case_name = "Get_All_Dealer";
                sql_query = Query_Builder.Query_Builder._GetAll(case_name);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_get_dealer);
                con.Close();
                return ds_get_dealer;
            }
            catch
            {
                throw;
            }
        }
        public DataSet Get_DID_DName()
        {
            try
            {
                DataSet ds_get_dealer = new DataSet();
                case_name = "Get_DID_DName";
                sql_query = Query_Builder.Query_Builder._GetAll(case_name);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_get_dealer);
                con.Close();
                return ds_get_dealer;
            }
            catch
            {
                throw;
            }
        }
        public DataSet Get_All_Category()
        {
            try
            {
                DataSet ds_get_cat = new DataSet();
                case_name = "Get_All_Category";
                sql_query = Query_Builder.Query_Builder._GetAll(case_name);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_get_cat);
                con.Close();
                return ds_get_cat;
            }
            catch
            {
                throw;
            }
        }

        public DataSet Get_CID_CName()
        {
            try
            {
                DataSet ds_cat_did = new DataSet();
                case_name = "Get_CatID_CatName";
                sql_query = Query_Builder.Query_Builder._GetAll(case_name);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_cat_did);
                con.Close();
                return ds_cat_did;
            }
            catch
            {
                throw;
            }
        }
        public DataSet Get_Product_ALL()
        {
            try
            {
                DataSet ds_cat_did = new DataSet();
                case_name = "Get_ALL_Product";
                sql_query = Query_Builder.Query_Builder._GetAll(case_name);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_cat_did);
                con.Close();
                return ds_cat_did;
            }
            catch
            {
                throw;
            }
        }
        public DataSet Get_Payment_Mode()
        {
            try
            {
                DataSet ds_cat_did = new DataSet();
                case_name = "Get_Payment_Mode";
                sql_query = Query_Builder.Query_Builder._GetAll(case_name);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_cat_did);
                con.Close();
                return ds_cat_did;
            }
            catch
            {
                throw;
            } 
        }        



        /// 
        /// Get Single Dealer Records with DealerID
        /// 
        /// 
        /// 
        public DataSet Get_Dealer_ID(Common_Functions _com_fun_get_dealer_with_ID)
        {
            try
            {
                DataSet ds_get_dealer_ID = new DataSet();
                case_name = "Get_one_Dealer";
                sql_query = Query_Builder.Query_Builder._Get_Method(case_name, _com_fun_get_dealer_with_ID);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_get_dealer_ID);
                con.Close();
                return ds_get_dealer_ID;
            }
            catch
            {
                throw;
            }
        }

        public DataSet Get_Product_Dealer(Common_Functions _com_fun_prod_dealer)
        {
            try
            {
                DataSet ds_prod_dealer = new DataSet();
                case_name = "Get_Product_Dealer";
                sql_query = Query_Builder.Query_Builder._Get_Method(case_name, _com_fun_prod_dealer);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_prod_dealer);
                con.Close();
                return ds_prod_dealer;
            }
            catch
            {
                throw;
            }
        }

        public DataSet Get_Product_ID(Common_Functions _com_fun_prodID)
        {
            try
            {
                DataSet ds_prod_dealer = new DataSet();
                case_name = "Get_one_Product";
                sql_query = Query_Builder.Query_Builder._Get_Method(case_name, _com_fun_prodID);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_prod_dealer);
                con.Close();
                return ds_prod_dealer;
            }
            catch
            {
                throw;
            }
        }
        public DataSet Get_Category_ID(Common_Functions _com_fun_CatID)
        {
            try
            {
                DataSet ds_prod_dealer = new DataSet();
                case_name = "Get_one_Category";
                sql_query = Query_Builder.Query_Builder._Get_Method(case_name, _com_fun_CatID);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_prod_dealer);
                con.Close();
                return ds_prod_dealer;
            }
            catch
            {
                throw;
            }
        }
        public DataSet Get_Category_Product(Common_Functions _com_fun_Cat_prod)
        {
            try
            {
                DataSet ds_prod_dealer = new DataSet();
                case_name = "Get_Category_Product";
                sql_query = Query_Builder.Query_Builder._Get_Method(case_name, _com_fun_Cat_prod);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_prod_dealer);
                con.Close();
                return ds_prod_dealer;
            }
            catch
            {
                throw;
            }
        }

        public DataSet Get_CName_DName_Product_Edit(Common_Functions _com_fun_cn_dn_prod_edit)
        {
            try
            {
                DataSet ds_prod_dealer = new DataSet();
                case_name = "Get_CName_DName_Product_Edit";
                sql_query = Query_Builder.Query_Builder._Get_Method(case_name, _com_fun_cn_dn_prod_edit);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_prod_dealer);
                con.Close();
                return ds_prod_dealer;
            }
            catch
            {
                throw;
            }
        }
        public DataSet Get_CID_CName_Through_ProdID(Common_Functions _com_fun_cid_cname_prodID)
        {
            try
            {
                DataSet ds_prod_dealer = new DataSet();
                case_name = "Get_Category_through_ProductID_Cust";
                sql_query = Query_Builder.Query_Builder._Get_Method(case_name, _com_fun_cid_cname_prodID);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_prod_dealer);
                con.Close();
                return ds_prod_dealer;
            }
            catch
            {
                throw;
            }
        }
        public DataSet Get_PaymentMode_ID(Common_Functions _com_fun_cid_cname_prodID)
        {
            try
            {
                DataSet ds_prod_dealer = new DataSet();
                case_name = "Get_Pay_Mode";
                sql_query = Query_Builder.Query_Builder._Get_Method(case_name, _com_fun_cid_cname_prodID);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_prod_dealer);
                con.Close();
                return ds_prod_dealer;
            }
            catch
            {
                throw;
            }
        }
        public DataSet Get_Payment_Details(Common_Functions _com_fun_payment)
        {
            try
            {
                DataSet ds_prod_dealer = new DataSet();
                case_name = "Get_Payment_Details";
                sql_query = Query_Builder.Query_Builder._Get_Method(case_name, _com_fun_payment);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_prod_dealer);
                con.Close();
                return ds_prod_dealer;
            }
            catch
            {
                throw;
            }
        }
        public DataSet Get_Customer_ID(Common_Functions _com_fun_payment)
        {
            try
            {
                DataSet ds_prod_dealer = new DataSet();
                case_name = "Get_Customer_ID";
                sql_query = Query_Builder.Query_Builder._Get_Method(case_name, _com_fun_payment);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_prod_dealer);
                con.Close();
                return ds_prod_dealer;
            }
            catch
            {
                throw;
            }
        }


        /// 
        /// Insert New Data into SQL
        /// 
        /// 
        public void Insert_Dealer(Entities.Common_Functions _com_fun_insert_dealer)
        {
            try
            {
                DataSet ds_insert_dealer = new DataSet();
                case_name = "Insert_Dealer";
                sql_query = Query_Builder.Query_Builder._Insert_Method(case_name, _com_fun_insert_dealer);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_insert_dealer);
                con.Close();
            }
            catch
            {
                throw;
            }
        }
        public void Insert_Category(Common_Functions _com_fun_insert_cat)
        {
            try
            {
                DataSet ds_insert_cat = new DataSet();
                case_name = "Insert_Category";
                sql_query = Query_Builder.Query_Builder._Insert_Method(case_name, _com_fun_insert_cat);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_insert_cat);
                con.Close();
            }
            catch
            {
                throw;
            }
        }
        public void Insert_Product(Common_Functions _com_fun_insert_prod)
        {
            try
            {
                DataSet ds_insert_cat = new DataSet();
                case_name = "Insert_Product";
                sql_query = Query_Builder.Query_Builder._Insert_Method(case_name, _com_fun_insert_prod);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_insert_cat);
                con.Close();
            }
            catch
            {
                throw;
            }
        }
        public void Insert_Customer(Common_Functions _com_fun_insert_cust)
        {
            try
            {
                DataSet ds_insert_cat = new DataSet();
                case_name = "Insert_Customer";
                sql_query = Query_Builder.Query_Builder._Insert_Method(case_name, _com_fun_insert_cust);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_insert_cat);
                con.Close();
            }
            catch
            {
                throw;
            }
        }

    ///
    /// Update Old Data 
    /// 
        public DataSet Update_Product_ID(Common_Functions _com_fun_Update_prod)
        {
            try
            {
                DataSet ds_update_prod_ID = new DataSet();
                case_name = "Update_Product";
                sql_query = Query_Builder.Query_Builder._Update_Method(case_name, _com_fun_Update_prod);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_update_prod_ID);
                con.Close();
                return ds_update_prod_ID;
            }
            catch
            {
                throw;
            }
        }

        ///
        /// Delete Data
        /// 
        public DataSet Delete_Product_ID(Common_Functions _com_fun_del_prod)
        {
            try
            {
                DataSet ds_del = new DataSet();
                case_name = "Delete_Product_ID";
                sql_query = Query_Builder.Query_Builder._Delete_Method(case_name, _com_fun_del_prod);
                con.Open();
                da = new SqlDataAdapter(sql_query, con);
                da.Fill(ds_del);
                con.Close();
                return ds_del;
            }
            catch
            {
                throw;
            }
        }
    }   
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Entities;

namespace Query_Builder
{
    public class Query_Builder
    {
        /// 
        /// Get ALL Records
        /// 
        /// 
        /// 
        public static string _GetAll(string case_value)
        {
            string sql_query = string.Empty;
            switch (case_value)
            {
                    // Dealer

                case "Get_All_Dealer":
                    sql_query = "Select * from Dealers";
                    break;

                case "Get_DID_DName":
                    sql_query = "select dealerid, dealername from Dealers";
                    break;

                    // Category

                case "Get_All_Category":
                    sql_query = "select c.categoryid, c.categoryname, d.dealername  from Category c inner join Dealers d on c.category_did = d.dealerid";
                    break;

                case "Get_CatID_CatName":
                    sql_query = "Select * from Category";
                    break;
                case "Get_ALL_Product":
                    sql_query = "Select * from Product";
                    break;

                case "Get_Payment_Mode":
                    sql_query = "Select * from PaymentMode";
                    break;

                case "Get_Payment":
                    sql_query = "Select * from Payment";
                    break;
            }
                return sql_query;
        }

        /// 
        /// Get Single Record
        /// 
        /// 
        /// 
        /// 

        public static string _Get_Method(string case_value, Common_Functions _get_com_fun)
        {
            string sql_query = string.Empty;
            switch (case_value)
            {
                case "Get_one_Dealer":
                    sql_query = "Select * from Dealers where dealerid='" + _get_com_fun.did + "'";
                    break;

                case "Get_Product_Dealer":
                    sql_query = "select d.dealerid, d.dealername from Category c inner join Dealers d on c.category_did=d.dealerid where c.categoryid ='" + _get_com_fun.catid + "'";
                    break;

                case "Get_CName_DName_Product_Edit":
                    sql_query = "select c.categoryid, c.categoryname, d.dealerid, d.dealername from Category c inner join Dealers d on c.category_did=d.dealerid where c.categoryid ='" + _get_com_fun.catid + "'";
                    break;

                case "Get_one_Category":
                    sql_query = "Select * from Category where prod_id='" + _get_com_fun.catid + "'";
                    break;

                case "Get_one_Product":
                    sql_query = "Select * from Product where prod_id='" + _get_com_fun.prodid + "'";
                    break;

                case "Get_Dealer_CatID":
                    sql_query = "select dealername from Dealers where dealerid='" + _get_com_fun.cat_did + "'";
                    break;

                case "Get_Category_through_ProductID_Cust":
                    sql_query = "select p.prod_item_cost, c.categoryid, c.categoryname from Product p inner join Category c on c.categoryid=p.prod_item_categoryid where p.prod_id='" + _get_com_fun.prodid + "'";
                    break;

                case "Get_Payment_Details":
                    sql_query = "Select p.id, p.cust_payID, p.custID, p.cust_pay_mode, p.date, p.cust_bankname_creditcardno, p.cust_checkno_trnxno, p.cust_amount, c.cust_prod_cat_id, c.cust_prod_id, c.cust_prod_cost, c.custphone, c.custname, c.cust_prod_quantity from Payment p inner join Customer c on c.custID=p.custID where p.custID='" + _get_com_fun.custid + "'";
                    break;

                case "Get_Category_Product":
                    sql_query = "select * from Category, Product where categoryid='" + _get_com_fun.catid + "' and prod_id='" + _get_com_fun.prodid + "'";
                    break;

                case "Get_Pay_Mode":
                    sql_query = "Select * from PaymentMode where paymentID='" + _get_com_fun.cust_mode_of_payment + "'";
                    break;

                case "Get_Customer_ID":
                    sql_query = "Select * from Customer where custID='" + _get_com_fun.custid + "'";
                    break;
            }
            return sql_query;
        }

        /// 
        /// Insert Query
        /// 
        /// 
        /// 
        /// 
        public static string _Insert_Method(string case_value, Common_Functions _com_function)
        {
            string sql_query = string.Empty;
            switch (case_value)
            {
                case "Insert_Dealer":
                    sql_query = "Insert into Dealers(dealerid, dealername, dealerhouseno, dealerstreetname, dealerarea, dealerlandmark, dealercity, dealerstate, dealerpincode, dealercontactno, dealerlandlineno, dealership_since) values('" + _com_function.did + "','" + _com_function.dname + "','" + _com_function.dhouseno + "','" + _com_function.dstreetname + "','" + _com_function.darea + "','" + _com_function.dlandmark + "','" + _com_function.dcity + "','" + _com_function.dstate + "','" + _com_function.dpincode + "','" + _com_function.dcontactno + "','" + _com_function.dlandlineno + "','" + _com_function.dship_since + "')";
                    break;
                case "Insert_Category":
                    sql_query = "Insert into Category(categoryid, categoryname, category_did) values('" + _com_function.catid + "','" + _com_function.catname + "','" + _com_function.cat_did + "')";
                    break;
                case "Insert_Product":
                    sql_query = "Insert into Product(prod_id, prod_name, prod_comp_name, prod_manu_date, prod_manu_exp_date, prod_item_serial_no, prod_item_batch_no, prod_item_cost, prod_item_quantity, prod_item_categoryid, prod_item_dealerid) values('" + _com_function.prodid + "','" + _com_function.prodname + "','" + _com_function.prod_company_name + "','" + _com_function.prod_manu_date + "','" + _com_function.prod_manu_exp_date + "','" + _com_function.prod_serial_no + "','" + _com_function.prod_batch_no + "','" + _com_function.prod_price + "','" + _com_function.prod_qty + "','" + _com_function.prod_catid + "','" + _com_function.prod_did + "')";
                    break;    
                case "Insert_Customer":
                    sql_query = "Insert into Customer(custID, cust_create_date, custname, custphone, custaddress, cust_prod_id, cust_prod_cat_id, cust_prod_cost, cust_prod_quantity, cust_pay_mode) values('" + _com_function.custid + "', '" + _com_function.cust_acc_create_date + "','" + _com_function.custname + "','" + _com_function.custphone + "','" + _com_function.custaddress + "','" + _com_function.prodid + "','" + _com_function.catid + "','" + _com_function.cust_prod_cost + "','" + _com_function.cust_prod_quality + "','" + _com_function.cust_mode_of_payment + "'); Insert into Payment(cust_PayID, custID, date, cust_pay_mode, cust_bankname_creditcardno, cust_checkno_trnxno, cust_amount) values('" + _com_function.cust_payment_id + "','" + _com_function.custid + "','" + _com_function.cust_acc_create_date + "','" + _com_function.cust_mode_of_payment + "','" + _com_function.cust_bankname_creditcardno + "','" + _com_function.cust_checkddno_trnx_no + "','" + _com_function.cust_amt_pay + "')";
                    break;
            }
            return sql_query;
        }

        /// 
        /// Update Query
        ///  
        ///  
        public static string _Update_Method(string case_value, Common_Functions _com_function_update)
        {
            string sql_query = string.Empty;
            switch (case_value)
            {
                case "Update_Product":
                    sql_query = "Update Product set prod_name='" + _com_function_update.prodname + "', prod_comp_name='" + _com_function_update.prod_company_name + "',prod_manu_date='" + _com_function_update.prod_manu_date + "',prod_manu_exp_date='" + _com_function_update.prod_manu_exp_date + "',prod_item_serial_no='" + _com_function_update.prod_serial_no + "',prod_item_batch_no='" + _com_function_update.prod_batch_no + "',prod_item_cost='" + _com_function_update.prod_price + "',prod_item_quantity='" + _com_function_update.prod_qty + "',prod_item_categoryid='" + _com_function_update.prod_catid + "',prod_item_dealerid='" + _com_function_update.prod_did + "' where prod_id='" + _com_function_update.prodid + "'";
                    break;
            }
            return sql_query;
        }


        /// 
        ///  Delete Query
        /// 
        /// 
        /// 
        /// 
        
        public static string _Delete_Method(string case_value, Common_Functions _com_function_del)
        {
            string sql_query = string.Empty;
            switch (case_value)
            {
                case "Delete_Product_ID":
                    sql_query = "Delete Product where prod_id='" + _com_function_del.prodid + "'";
                    break;
            } 
            return sql_query;
        }
        
    }
}

Post a Comment

16 Comments

  1. we are working on customer module presently and then after Order & Reports Modules its take some more time to post....
    Other Projects :
    Book Inventory Project :

    http://allittechnologies.blogspot.com/2015/03/create-book-inventory-project-for.html

    Create Forum Project :

    http://allittechnologies.blogspot.com/2015/03/How-to-create-forum-project-for-beginners-in-aspnet-using-csharp-and-how-to-create-blogger-in-asp.net-using-csharp.html

    Create Blogger Website :

    http://allittechnologies.blogspot.com/2015/05/asp.net-project-for-beginners-to-Create-blogger-website-by-using-csharp.html

    ReplyDelete
  2. thanks alot
    plz complete modules
    we need it

    ReplyDelete
    Replies
    1. we try to post all modules as soon as Hussein, but its take some time

      Delete
  3. thanks a lot friend....!!!!it is very useful for me!! kapil

    ReplyDelete
  4. we were unable to view the code ...please help me

    ReplyDelete
    Replies
    1. you have to download file from above links and also download Database Script file and run in SQL Server

      Delete
  5. Good day pals. Please can anyone help on programming the HUNGARIAN ALGORITHM used to solve ASSIGNMENT PROBLEMS?
    Thanks.

    ReplyDelete
  6. Does anybody tell me ,how to use such project files in Visual Studio 2013 and how to import SQL file to SQL Server Management Studio 2014. Thanks

    ReplyDelete
    Replies
    1. This will help's you brother check it http://stackoverflow.com/questions/22488972/import-database-sql-file-in-sql-server-management-studio

      Delete
  7. its showing sms.master not found

    ReplyDelete
  8. Hi,

    Links to download project is not working. Please help.

    Best regards,

    Ravi

    ReplyDelete