日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

超市进销存系统设计

發布時間:2025/3/15 windows 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 超市进销存系统设计 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

歡迎添加微信互相交流學習哦!

項目源碼:https://gitee.com/oklongmm/biye

超市進銷存系統

?

    • 設計目的

根據所學的數據庫原理與程序設計的知識,能夠針對一個小型的數據庫管理信息系統,進行系統的需求分析,系統設計,數據庫設計,編碼,測試等,完成題目要求的功能,從而達到掌握開發一個小型數據庫管理信息系統的目的。

?

    • 設計內容

題目可根據自己熟悉的物品填充,例如圖書進銷存系統、電腦設備進銷存系統、藥品進銷存系統等等,下面以超市進銷存系統為例完成功能:

  • 商品信息、供應商信息
  • 商品進貨、商品查詢
  • ??? 以上功能可根據自己對不同物品主要的管理需求進行調整,可以增加或減少相應功能。

    ?

    【需求分析】

    對普通超市來講,涉及原材料的進貨渠道、銷售情況及庫存等方面的管理,管理的好與壞對超市的持久性至關重要。概括地說,用戶對進銷存系統的需求具有普遍性。超市進銷存銷售管理系統適用于超市采購、銷售和倉庫部門,對超市采購、銷售及倉庫的業務全過程進行有效控制和跟蹤。使用超市進銷存銷售管理系統可有效減少盲目采購、降低采購成本、合理控制庫存、減少資金占用并提高市場靈敏度,提升超市的市場競爭力。

    【系統運行環境】

  • 系統開發平臺:Microsoft Visual Studio 2005
  • 系統開發語言:C#
  • 數據庫管理軟件:SQL Server 2005
  • 運行平臺:Win7
  • 運行環境:Microsoft.NET Framework SDK v2.0
  • 【系統設計】

    超市進銷存銷售管理系統功能結構圖:

    ?

    超市進銷存管理系統

    銷售管理

    進貨管理

    庫存管理

    系統維護

    基本檔案

    員工信息

    供應商信息

    商品進貨

    商品查詢

    商品銷售

    商品退貨

    庫存警報

    庫存查詢

    數據備份

    數據還原

    ?

    ?

    系統業務流程圖:

    ?

    系統登 錄

    是否登錄

    系統主窗體

    銷售管理

    進貨管理

    庫存管理

    系統維護

    基本檔案

    ?

    ?

    【概念結構設計】

    供應商信息實體E-R圖:

    ?

    供應商信息表

    備注

    地址

    加入時間

    傳真

    是否發布

    供應商編號

    供應商姓名

    聯系人姓名

    聯系電話

    ?

    ?

    員工信息實體E-R圖:

    ?

    員工信息表

    家庭電話

    員工職位

    手機號碼

    員工生日

    是否發布

    員工編號

    員工姓名

    登錄密碼

    員工性別

    所屬部門

    家庭住址

    登錄ID

    ?

    ?

    進貨信息實體E-R圖:

    ?

    進貨信息表

    應付金額

    銷售單價

    實付金額

    商品數量

    刪除標記

    操作員編號

    員工姓名

    庫存名稱

    貨物名稱

    進貨單價

    備注

    進貨公司名稱

    商品計量單位

    進貨時間

    ?

    ?

    【邏輯結構設計】

    根據設計好的E-R圖在數據庫中建立各表,系統數據庫中各表的邏輯結構如下:

    供應商信息表:

    ?

    字段名

    數據類型

    長度

    主鍵

    描述

    CompanyID

    varchar

    50

    供應商編號

    CompanyName

    nvarchar

    100

    供應商姓名

    CompanyDirector

    nvarchar

    50

    聯系人姓名

    CompanyPhone

    nvarchar

    20

    聯系電話

    CompanyFax

    nvarchar

    20

    傳真

    CompanyAddress

    nvarchar

    200

    地址

    CompanyRemark

    nvarchar

    400

    備注

    ReDateTime

    datetime

    8

    加入日期

    Falg

    int

    4

    是否發布

    員工信息表:

    字段名

    數據類型

    長度

    主鍵

    描述

    EmpID

    nvarchar

    20

    員工編號

    EmpName

    nvarchar

    20

    員工姓名

    EmpLoginName

    nvarchar

    20

    登錄ID

    EmpLoginPwd

    nvarchar

    20

    登錄密碼

    EmpSex

    nvarchar

    4

    員工性別

    EmpBirthday

    datetime

    8

    員工生日

    EmpDept

    nvarchar

    20

    所屬部門

    EmpPost

    nvarchar

    20

    員工職位

    EmpPhone

    nvarchar

    20

    家庭電話

    EmpPhoneM

    nvarchar

    20

    手機號碼

    EmpAddress

    nvarchar

    200

    家庭住址

    EmpFalg

    int

    1

    是否發布

    進貨信息表:

    字段名

    數據類型

    長度

    主鍵

    描述

    GoodsID

    nvarchar

    20

    商品編號

    EmpId

    nvarchar

    20

    操作員編號

    JhCompName

    nvarchar

    100

    進貨公司名稱

    DepotName

    nvarchar

    20

    倉庫名稱

    GoodsName

    nvarchar

    50

    貨物名稱

    GoodsNum

    int

    4

    商品數量

    GoodsUnit

    nvarchar

    20

    商品計量單位

    GoodsJhPrice

    nvarchar

    8

    進貨單價

    GoodsSellPrice

    nvarchar

    8

    銷售單價

    GoodsNeedPrice

    nvarchar

    8

    應付金額

    GoodsNoPrice

    nvarchar

    8

    實付金額

    GoodsRemark

    nvarchar

    200

    備注

    GoodTime

    datetime

    8

    進貨時間

    Falg

    int

    4

    刪除標記

    ?

    【窗體設計】

    登錄窗口:

    ?

    主窗口:

    ?

    員工基本信息窗體:

    ?

    供應商信息窗體:

    ?

    商品進貨窗體:

    ?

    商品查詢窗體:

    窗體頂端

    【總結】

    ??? 該系統是用C#完成的,實現的功能比較全面,界面美觀。但是需要寫太多代碼,會遇到許多細節方面的問題(如:數據庫的連接、類的使用、函數的使用等等)。還有很多地方有待完善。通過這次的學習設計,對數據庫更加了解,還有很多不足的地方。對C#學的還不深,還要多學習,提高自己。

    【主要代碼設計】

    【員工基本信息窗體】

    1.通過對員工信息的錄入,修改,刪除,保存進行操作,在對員工的信息錄入時候,員工姓名,登錄名稱和登錄密碼的相關操作是必須的 ,因為涉及到了下次登錄時候身份的鑒定,相關代碼如下:

    ??????? public int getPan()

    ??????? {

    ??????????? int intFalg1 = 0;

    ??????????? if (intFalg != 3)

    ??????????? {

    ??????????????? if (txtEmpName.Text == "")

    ??????????????? {

    ??????????????????? MessageBox.Show("員工姓名不能為空!", "提示");

    ??????????????????? txtEmpName.Focus();

    ??????????????????? return intFalg1;

    ??????????????? }

    ??????????????? if (txtEmpLoginName.Text == "")

    ??????????????? {

    ??????????????????? MessageBox.Show("登錄名稱不能為空!", "提示");

    ??????????????????? return intFalg1;

    ??????????????? }

    ??????????????? if (intFalg != 2)

    ??????????????? {

    ??????????????????? if (txtEmpLoginPwd.Text == "")

    ??????????????????? {

    ??????????????????????? MessageBox.Show("登錄密碼不能為空!", "提示");

    ??????????????????????? return intFalg1;

    ??????????????????? }

    ??????????????? }

    ???? 2.通過對員工的查詢,可以知道員工的信息,查詢可根據很多方面的信息而查到所向知道的員工的信息,所一就需要輸入查詢條件,根據查詢條件而知道所向知道的信息,比如員工姓名,性別,所屬部門,員工職位,姓名查詢是最準確并且速度的方法,性別,所屬部門,職位這些查詢條件是比較含糊的查詢,客戶通過自己想要的方式查到員工的信息,相關的代碼如下:

    ??????? private void txtOK_Click(object sender, EventArgs e)

    ??????? {

    ??????????? string P_Str_selectcondition = this.cbxCondition.Text;

    ??????????????? //Items[this.cbxCondition.SelectedIndex].ToString();

    ??????????? if (P_Str_selectcondition == null)

    ??????????? {

    ??????????????? MessageBox.Show("請選擇查詢條件!");

    ??????????????? return;

    ??????????? }

    ??????????? if (this.txtKeyWord.Text == "")

    ??????????? {

    ??????????????? MessageBox.Show("輸入查詢條件!");

    ??????????????? return;

    ??????????? }

    ??????????? switch (P_Str_selectcondition)

    ??????????? {

    ??????????????? case "員工姓名":

    ??????????????????? tbMenthod.tb_EmpInfoFind(txtKeyWord.Text,1,dataGridView1);

    ??????????????????? break;

    ?????? ?????????case "員工性別":

    ??????????????????? tbMenthod.tb_EmpInfoFind(txtKeyWord.Text, 2, dataGridView1);

    ??????????????????? break;

    ??????????????? case "所屬部門":

    ??????????????????? tbMenthod.tb_EmpInfoFind(txtKeyWord.Text, 3, dataGridView1);

    ??????????????? ????break;

    ??????????????? case "員工職位":

    ??????????????????? tbMenthod.tb_EmpInfoFind(txtKeyWord.Text, 4, dataGridView1);

    ??????????????????? break;

    ??????????????? default:

    ??????????????????? break;

    ??????????? }

    ??????? }

    ????? ?如果客戶 查詢到員工的信息之后,想做一些的修改 刪除,添加之類的修改,如果添加員工信息的話,則要錄入新員工的詳細信息,如修改的員工信息的話可根據某方面的信息進行相關的修該,如刪除員工信息的話,則要對員工的信息進行全部的刪除,并相應的保存到數據庫里面,方便下次客戶對員工的信息進行相關的操作,具體修改 ,刪除,添加的操作代碼如下:

    ??????? private void toolSave_Click(object sender, EventArgs e)

    ??????? {

    ??????????? if (getPan() == 1)

    ?????????? ?{

    ??????????????? if (intFalg == 1)

    ??????????????? {

    ??????????????????? if (tbMenthod.tb_EmpInfoFind(txtEmpLoginName.Text,"",1) == 1)

    ??????????????????? {

    ??????????????????????? MessageBox.Show("登錄名稱已被占用!!");

    ??????????????????????? txtEmpLoginName.Text = "";

    ??????????????????????? txtEmpLoginName.Focus();

    ??????????????????????? return;

    ??????????????????? }

    ???????????????????

    ??????????????????? if (tbMenthod.tb_EmpInfoAdd(EmpClass) == 1)

    ??????????????????? {

    ??????????????????????? MessageBox.Show("添加成功");

    ??????????????????????? intFalg = 0;

    ??????????????????????? tbMenthod.tb_EmpInfoFind("", 5, dataGridView1);

    ??????????????????????? ClearControls();

    ??????????????????????? ControlStatus();

    ??????????????????? }

    ??????????????????? else

    ????????? ??????????{

    ??????????????????????? MessageBox.Show("添加成失敗");

    ??????????????????????? intFalg = 0;

    ??????????????????????? //tbMenthod.tb_EmpInfoFind("2",dataGridView1);

    ??????????????????????? ClearControls();

    ??????????????????????? ControlStatus();

    ??? ????????????????}

    ??????????????? }

    ??????????????? if (intFalg == 2)

    ??????????????? {

    ??????????????????? if (tbMenthod.tb_EmpInfoUpdate(EmpClass)==1)

    ??????????????????? {

    ??????????????????????? MessageBox.Show("修改成功");

    ??????????????????????? intFalg = 0;

    ??????????????????????? tbMenthod.tb_EmpInfoFind("", 5, dataGridView1);

    ??????????????????????? ClearControls();

    ??????????????????????? ControlStatus();

    ??????????????????? }

    ??????????????????? else

    ??????????????????? {

    ??????????????????????? MessageBox.Show("修改成失敗");

    ??????????????????????? intFalg = 0;

    ??????????????????????? //tbMenthod.tb_EmpInfoFind("2",dataGridView1);

    ??????????????????????? ClearControls();

    ??????????????????????? ControlStatus();

    ??????????????????? }

    ??????????????? }

    ??????????????? if (intFalg == 3)

    ??????????????? {

    ??????????????????? if (tbMenthod.tb_EmpInfoDelete(EmpClass) == 1)

    ??????????????????? {

    ??????????????????????? MessageBox.Show("刪除成功");

    ??????????????????????? intFalg = 0;

    ??????????????????????? tbMenthod.tb_EmpInfoFind("", 5, dataGridView1);

    ??????????????????????? ClearControls();

    ??????????????????????? ControlStatus();

    ??????????????????? }

    ??????????????????? else

    ??????????????????? {

    ??????????????????????? MessageBox.Show("刪除失敗");

    ??????????????????????? intFalg = 0;

    ??????????????????????? ClearControls();

    ??????????????????????? ControlStatus();

    ??????????????????? }

    ??????????????? }

    ??????????? }

    ??????? }

    【供應商信息窗體】

    2對控件的清零狀態,方便進行相關的操作,即信息初始化,代碼如下:

    ??????? private void ClearControls()

    ??????? {

    ??????????? txtCompanyDirector.Text = "";

    ??????????? txtCompanyAddress.Text = "";

    ??????????? txtCompanyFax.Text = "";

    ??????????? txtCompanyName.Text = "";

    ??????????? txtCompanyPhone.Text = "";

    ??????????? txtCompanyRemark.Text = "";

    ??????????

    ??????? }

    ????? 2.1 通過對供應商的信息錄入,并保存到數據庫里面,此外應注意的是供應商的名稱,聯系電話,地址是必須的填寫的,否則不不可以錄入并進行相關操作的,如少填寫一項,會彈出相應的對話框,代碼如下:

    ??????? public int GetCount()

    ??????? {

    ??????????? int intReslult = 0;

    ??????????? if (intFalg == 1 || intFalg == 2)

    ??????????? {

    ??????????????? if (txtCompanyName.Text == "")

    ??????????????? {

    ??????????????????? MessageBox.Show("供應商名稱不能為空!", "提示");

    ??????????????????? return intReslult;

    ??????????????? }

    ??????????????? if (txtCompanyPhone.Text == "")

    ??????????????? {

    ??????????????????? MessageBox.Show("聯系電話不能為空!", "提示");

    ??????????????????? return intReslult;

    ??????????????? }

    ??????????????? if (txtCompanyDirector.Text == "")

    ??????????????? {

    ??????????????????? MessageBox.Show("地址不能為空!", "提示");

    ??????????????????? return intReslult;

    ??????????????? }

    ?????? ???2.2客戶對相關的信息進行操作之后,需要保存到數據庫,但是應注意的是相關的信息必須是準確的,避免下次信息調出的時候出現差錯,因為數據庫是共同享有的,所以必須保證供應商資料的準確性,通過保存之前的添加,修改,刪除操作并保存到數據庫的代碼如下:

    ??????? private void toolSave_Click(object sender, EventArgs e)

    ??????? {

    ??????????? if (GetCount() == 1)

    ??????????? {

    ?????????? ?????if (intFalg == 1)

    ??????????????? {

    ??????????????????? if (CompanyMenthod.tb_CompanyMenthodAdd(Company) == 1)

    ??????????????????? {

    ??????????????????????? if (intReturn == 1)

    ??????????????????????? {

    ??????????????????????????? frmGonYingShang frmCop= (frmGonYingShang)this.Owner;

    ??????????????????????????? jhgood.filltProd(frmCop.treeView1,frmCop.imageList1);

    ??????????????????????????? ClearControls();

    ??????????????????????????? ControlStatus();

    ??????????????????????????? intFalg = 0;

    ????????? ??????????????????this.Close();

    ???????????????????????????

    ???????????????????????

    ??????????????????????? }

    ??????????????????????? MessageBox.Show("添加成功");

    ??????????????????????? intFalg = 0;

    ??????????????????????? CompanyMenthod.tb_CompanyFind("", 3, dataGridView1);

    ??????????????????????? ClearControls();

    ??????????????????????? ControlStatus();

    ???????????????????????

    ??????????????????? }

    ??????????????????? else

    ??????????????????? {

    ??????????????????????? MessageBox.Show("添加失敗");

    ??????????? ????????????intFalg = 0;

    ??????????????????????? CompanyMenthod.tb_CompanyFind("", 3, dataGridView1);

    ??????????????????????? ClearControls();

    ??????????????????????? ControlStatus();

    ??????????????????? }

    ??????????????? }

    ??????????????? if (intFalg == 2)

    ??????????????? {

    ??????????????????? if (CompanyMenthod.tb_CompanyMenthodUpDate(Company) == 1)

    ??????????????????? {

    ??????????????????????? MessageBox.Show("修改成功");

    ??????????????????????? intFalg = 0;

    ??????????????????????? CompanyMenthod.tb_CompanyFind("", 3, dataGridView1);

    ??????????????????????? ClearControls();

    ??????????????????????? ControlStatus();

    ??????????????????? }

    ??????????????????? else

    ???? ???????????????{

    ??????????????????????? MessageBox.Show("修改失敗");

    ??????????????????????? intFalg = 0;

    ??????????????????????? CompanyMenthod.tb_CompanyFind("", 3, dataGridView1);

    ??????????????????????? ClearControls();

    ??????????????????????? ControlStatus();

    ??????????????????? }

    ??????????????? }

    ??????????????? if (intFalg ==3)

    ??????????????? {

    ??????????????????? if (CompanyMenthod.tb_CompanyMenthodDelete(Company) == 1)

    ??????????????????? {

    ??????????????????????? MessageBox.Show("刪除成功");

    ????????? ??????????????intFalg = 0;

    ??????????????????????? CompanyMenthod.tb_CompanyFind("", 3, dataGridView1);

    ??????????????????????? ClearControls();

    ??????????????????????? ControlStatus();

    ??????????????????? }

    ??????????????????? else

    ??????????????????? {

    ??????????????????????? MessageBox.Show("刪除失敗");

    ??????????????????????? intFalg = 0;

    ??????????????????????? CompanyMenthod.tb_CompanyFind("", 3, dataGridView1);

    ??????????????????????? ClearControls();

    ??????????????????????? ControlStatus();

    ??????????????????? }

    ??????????????? }

    ??????????? }

    ??????? }

    ?????? 2.3客戶對供應商的信息做好相關的操作之后,則方便其他客戶對供應商的資料查詢,可根據的供應商的名稱,負責人姓名而知道所想知道的相關信息,相關的代碼如下:

    ??????? private void txtOK_Click(object sender, EventArgs e)

    ??????? {

    ??????????? string P_Str_cmdtxt = String.Empty;

    ??????????? string P_Str_selectcondition = this.cbxCondition.Text;

    ??????????? if (P_Str_selectcondition == null)

    ??????????? {

    ??????????????? MessageBox.Show("請選擇查詢條件!");

    ??????????????? return;

    ??????????? }

    ??????????? if (this.txtKeyWord.Text == "")

    ??????????? {

    ??????????????? MessageBox.Show("輸入查詢條件!");

    ??????????????? return;

    ??????????? }

    ??????????? switch (P_Str_selectcondition)

    ??????????? {

    ??????????????? case "供應商名稱":

    ??????????????????? CompanyMenthod.tb_CompanyFind(txtKeyWord.Text,1,dataGridView1);

    ??????????????????? break;

    ??? ????????????case "負責人姓名":

    ??????????????????? CompanyMenthod.tb_CompanyFind(txtKeyWord.Text, 2, dataGridView1);

    ??????????????????? break;

    ??????????????? default:

    ??????????????????? break;

    ??????????? }

    ??????? }

    【商品進貨窗體】

    3定義方法getIntCount(),用于獲取表單的信息,在具體的實現上,將通過if語句驗證各字段的輸入的數據不為空,對應放入實現代碼如下:

    ??????? public int getIntCount()

    ??????? {

    ??????????? int intReslut = 0;

    ??????????? if (intFalg == 1)

    ??????????? {

    ??????????????? if (txtGoodsID.Text == "")

    ??????????????? {

    ??????????????????? MessageBox.Show("商品編號不能為空!");

    ??????????????????? return intReslut;

    ??????????????? }

    ??????????????? if (txtGoodsName.Text == "")

    ??????????????? {

    ??????????????????? MessageBox.Show("商品名稱不能為空!");

    ??????????????????? return intReslut;

    ??????????????? }

    ??????????????? if (txtJhCompName.Text == "")

    ??????????????? {

    ??????????????????? MessageBox.Show("供應商名稱不能為空!");

    ??????????????????? return intReslut;

    ??????????????? }

    ??????????????? if (txtEmpId.Text == "")

    ??????????????? {

    ??????????????????? MessageBox.Show("進貨人姓名不能為空!");

    ??????????????????? return intReslut;

    ??????????????? }

    ??????????????? if (txtGoodsNum.Text == "")

    ??????????????? {

    ??????????????????? MessageBox.Show("數量不能為空!");

    ??????????????????? return intReslut;

    ??????????????? }

    ??????????????? if (txtGoodsName.Text == "")

    ??????????????? {

    ??????????????????? MessageBox.Show("進貨單價不能為空!");

    ??????????????????? return intReslut;

    ??????????????? }

    ??????????? }

    ??????????? if (intFalg == 2)

    ??????????? {

    ??????????????? if (txtGoodsID.Text == "")

    ????????????? ??{

    ??????????????????? MessageBox.Show("商品編號不能為空!,選擇要修改記錄","提示");

    ??????????????????? return intReslut;

    ??????????????? }

    ??????????? }

    ??????????? if (intFalg == 3)

    ??????????? {

    ??????????????? if (txtGoodsID.Text == "")

    ??????????????? {

    ????????????? ??????MessageBox.Show("商品編號不能為空!,選擇要刪除記錄", "提示");

    ??????????????????? return intReslut;

    ??????????????? }

    ??????????? }

    ??????????? jhGood.strGoodsID = txtGoodsID.Text;

    ??????????? jhGood.strEmpId = txtEmpId.Text;

    ??????????? jhGood.strJhCompName = txtGoodsName.Text;

    ??????????? jhGood.strDepotName = cmbDepotName.Text;

    ??????????? jhGood.strGoodsNum = Convert.ToInt32(txtGoodsNum.Text);

    ??????????? jhGood.strGoodsName = txtGoodsName.Text;

    ??????????? jhGood.strGoodsUnit = cmbGoodsUnit.Text;

    ??????????? jhGood.deGoodsJhPrice = txtGoodsJhPrice.Text;

    ??????????? jhGood.deGoodsNeedPrice = txtGoodsNeedPrice.Text;

    ??????????? jhGood.deGoodsNoPrice = txtGoodsNoPrice.Text;

    ??????????? jhGood.deGoodsSellPrice = txtGoodsSellPrice.Text;

    ??????????? jhGood.strGoodsRemark = txtGoodsRemark.Text;

    ??????????? jhGood.DaGoodTime = dateTimePicker1.Value;

    ??????????? if (intFalg != 3)

    ??????????? {

    ??????????????? jhGood.Falg = 0;

    ??????????? }

    ??????????? else

    ??????????? {

    ??????????????? jhGood.Falg = 1;

    ??????????? }

    ??????? ????intReslut = 1;

    ??????????? return intReslut;

    ??????? }

    3.1加載時顯示所有的商品信息,將結果綁定到DataGirdView控件上,對應的實現代碼如下:

    ??????? private void frmJhGoodsInfo_Load(object sender, EventArgs e)

    ??????? {

    ??????????? jhMenthod.tb_JhGoodsInfoFind("", 5, dataGridView1);

    ???? ???}

    3.2在上述代碼中,通過調用方法FillControls()顯示了單擊新機的詳細內容,方法FillControls()的具體實現代碼如下:

    ??????? private void FillControls()

    ??????? {

    ??????????? try

    ??????????? {

    ???????????????

    ??????????????? SqlDataReader sqldr = jhMenthod.tb_JhGoodsInfoFind(this.dataGridView1[0, this.dataGridView1.CurrentCell.RowIndex].Value.ToString(),1);

    ??????????????? sqldr.Read();

    ??????????????? if (sqldr.HasRows)

    ??????????????? {

    ???????????????????? txtEmpId.Text=sqldr[1].ToString();

    ????????????????????? txtGoodsName.Text=sqldr[4].ToString();

    ????????????????????? cmbDepotName.Text = sqldr[3].ToString();

    ???????????????????

    ?????????????????? txtGoodsNum.Text=sqldr[5].ToString();

    ??????????????????? cmbGoodsUnit.Text=sqldr[6].ToString();

    ??????????????????? txtGoodsJhPrice.Text=sqldr[7].ToString();

    ??????????????????? txtGoodsNeedPrice.Text=sqldr[9].ToString();

    ?????????????????  txtGoodsNoPrice.Text=sqldr[10].ToString();

    ??????????????????? txtGoodsSellPrice.Text=sqldr[8].ToString();

    ??????????????????? txtGoodsRemark.Text=sqldr[11].ToString();

    ??????????????????? txtJhCompName.Text = sqldr[2].ToString();

    ????????????????

    ??????????????????? txtGoodsID.Text = sqldr[0].ToString();

    ??????????????????  txtGoodsID.Enabled = false;

    ??????????????? }

    ??????????? }

    ??????????? catch (Exception ee)

    ??????????? {

    ??????????????? MessageBox.Show(ee.ToString());

    ??????????? }

    ??????? }

    ??????? 3.3單擊【添加】按鈕可以添加新的進貨信息,單擊【修改】按鈕可以對進貨信息進行修改,單擊【保存】按鈕后可以將修改后的內容進行保存,單擊【刪除】按鈕,可以刪除選擇的進貨信息,對應的實現代碼如下:

    ??????? private void toolSave_Click(object sender, EventArgs e)

    ??????? {

    ??????????? if (getIntCount() == 1)

    ??????????? {

    ??????????????? if (intFalg == 1)

    ??????????????? {

    ??????????????????? if (jhMenthod.tb_JhGoodsInfoMenthodAdd(jhGood)==2)

    ??????????????????? {

    ??????????????????????? MessageBox.Show("添加成功","提示");

    ??????????????????????? intFalg = 0;

    ??????????????????????? jhMenthod.tb_JhGoodsInfoFind("",5,dataGridView1);

    ??????????????????????? ControlStatus();

    ??????????????????????? ClearContorl();

    ??????????????????? }

    ??????????????????? else

    ????????? ??????????{

    ??????????????????????? MessageBox.Show("添加失敗", "提示");

    ??????????????????????? intFalg = 0;

    ??????????????????????? jhMenthod.tb_JhGoodsInfoFind("", 5, dataGridView1);

    ??????????????????????? ControlStatus();

    ??????????????????????? ClearContorl();

    ??????????????????? }

    ??????????????? }

    ??????????????? if (intFalg == 2)

    ??????????????? {

    ??????????????????? if (jhMenthod.tb_JhGoodsInfoMenthodUpdate(jhGood)==1)

    ??????????????????? {

    ??????????????????????? MessageBox.Show("修改成功", "提示");

    ??????? ????????????????intFalg = 0;

    ??????????????????????? jhMenthod.tb_JhGoodsInfoFind("", 5, dataGridView1);

    ??????????????????????? ControlStatus();

    ??????????????????????? ClearContorl();

    ??????????????????? }

    ??????????????????? else

    ??????????????????? {

    ??????????????????????? MessageBox.Show("修改失敗", "提示");

    ??????????????????????? intFalg = 0;

    ??????????????????????? jhMenthod.tb_JhGoodsInfoFind("", 5, dataGridView1);

    ??????????????????????? ControlStatus();

    ??????????????????????? ClearContorl();

    ??????? ????????????}

    ??????????????? }

    ??????????????? if (intFalg == 3)

    ??????????????? {

    ??????????????????? if (jhMenthod.tb_JhGoodsInfoMenthodDelete(jhGood)==1)

    ??????????????????? {

    ??????????????????????? MessageBox.Show("刪除成功", "提示");

    ???????????????????? ???intFalg = 0;

    ??????????????????????? jhMenthod.tb_JhGoodsInfoFind("", 5, dataGridView1);

    ??????????????????????? ControlStatus();

    ??????????????????????? ClearContorl();

    ??????????????????? }

    ??????????????????? else

    ??????????????????? {

    ????????????? ??????????MessageBox.Show("刪除失敗", "提示");

    ??????????????????????? intFalg = 0;

    ??????????????????????? jhMenthod.tb_JhGoodsInfoFind("", 5, dataGridView1);

    ??????????????????????? ControlStatus();

    ??????????????????????? ClearContorl();

    ??????????????????? }

    ??????????????? }

    ??????????? }

    ??????? }

    3.4DataGirdView控件中的某些信息后,對應的各項信息會在對應的文本框中顯示,對應的實現代碼如下:

    ??????? private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)

    ??????? {

    ??????????? if (intFalg == 2 || intFalg == 3)

    ??????????? {

    ??????????????? FillControls();

    ??????????? }

    ??????? }

    ??????? private void txtGoodsJhPrice_TextChanged(object sender, EventArgs e)

    ??????? {

    ?????????? if (txtGoodsNum.Text != "")

    ??????????? {

    ??????????????? txtGoodsNeedPrice.Text = Convert.ToString(Convert.ToInt32(txtGoodsJhPrice.Text)*Convert.ToInt32(txtGoodsNum.Text));

    ??????????? }

    ??????? }

    ??????? private void txtGoodsSellPrice_KeyPress(object sender, KeyPressEventArgs e)

    ??????? {

    ??????????? if (e.KeyChar != 8 && !char.IsDigit(e.KeyChar)&&e.KeyChar!='.')

    ??????????? {

    ??????????????? MessageBox.Show("請輸入數字");

    ??????????????? e.Handled = true;

    ??????????? }

    ??????? }

    ??????? private void txtGoodsNum_KeyPress(object sender, KeyPressEventArgs e)

    ??????? {

    ??????????? if (e.KeyChar != 8 && !char.IsDigit(e.KeyChar))

    ??????????? {

    ??????????????? MessageBox.Show("請輸入數字");

    ??????????????? e.Handled = true;

    ??????????? }

    ??????? }

    ??????? private void txtGoodsJhPrice_KeyPress(object sender, KeyPressEventArgs e)

    ??????? {

    ??????????? if (e.KeyChar != 8 && !char.IsDigit(e.KeyChar) && e.KeyChar != '.')

    ??????????? {

    ??????????????? MessageBox.Show("請輸入數字");

    ??????????????? e.Handled = true;

    ??????????? }

    ??????? }

    ?

    ??????? private void txtGoodsNoPrice_KeyPress(object sender, KeyPressEventArgs e)

    ??????? {

    ??????????? if (e.KeyChar != 8 && !char.IsDigit(e.KeyChar) && e.KeyChar != '.')

    ??????????? {

    ??????????????? MessageBox.Show("請輸入數字");

    ??????????????? e.Handled = true;

    ??????????? }

    ??????? }

    ??????? private void button1_Click(object sender, EventArgs e)

    ??????? {

    ??????????? frmGonYingShang frmgong = new frmGonYingShang();

    ??????????? frmgong.Owner = this;

    ??????????? frmgong.ShowDialog();

    ??????? }

    ??????? private void tollDelete_Click(object sender, EventArgs e)

    ??????? {

    ??????????? ControlStatus();

    ??????????? ClearContorl();

    ??????????? intFalg = 3;

    ??????? }

    }

    }

    【商品查詢窗體】

    private void button1_Click(object sender, EventArgs e)

    ??????? {

    ??????????????????? if(comboBox1.Text=="")

    ??????????????????? {

    ??????????????????????? MessageBox.Show("請選擇查詢條件!");

    ??????????????????????? return;

    ??????????????????? }

    ??????????????????? if(comboBox1.Text!=""&&comboBox1.Text!="查詢所有信息"&& textBox1.Text=="")

    ??????????????????? {

    ??????????????????????? MessageBox.Show("請輸入查查信息");

    ??????????????????????? return;

    ? ??????????????????}

    ??????????????????? switch (comboBox1.Text)

    ??????????????????? {

    ??????????????????????? case "商品編號"://"商品編號":

    ??????????????????????????? jhMenthod.tb_JhGoodsInfoFind(textBox1.Text,1,dataGridView1);

    ??????????????????????????? comboBox1.SelectedIndex = 0;

    ??????????????????????????? break;

    ??????????????????????? case "商品名稱"://商品名稱"

    ??????????????????????????? jhMenthod.tb_JhGoodsInfoFind(textBox1.Text, 2, dataGridView1);

    ??????????????????????????? comboBox1.SelectedIndex = 0;

    ?????? ?????????????????????break;

    ??????????????????????? case "查詢所有信息"://"所有信息":

    ??????????????????????????? jhMenthod.tb_JhGoodsInfoFind(textBox1.Text, 5, dataGridView1);

    ??????????????????????????? comboBox1.SelectedIndex = 0;

    ??????????????????????????? break;

    ??????????????????? }

    }

    總結

    以上是生活随笔為你收集整理的超市进销存系统设计的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

    主站蜘蛛池模板: 宿舍女女闺蜜调教羞辱 | 无套暴操| 中文字幕日韩一区二区三区 | 国产精品人人妻人人爽人人牛 | 人妻互换一区二区三区四区五区 | 国产大学生av | 中文字幕一区二区三区在线不卡 | 国产99免费 | 精品国产伦一区二区三 | 欧美成人免费 | 久久久亚洲成人 | 妖精视频一区二区 | 日本黄视频网站 | 99re8在线精品视频免费播放 | 视频一区二区三区在线观看 | 亚洲首页 | 欧美资源网 | 色偷偷免费视频 | av男人天堂网| 在线观看成人动漫 | 在线免费 | 亚洲精品一区二 | 日人视频 | 操亚洲| 成人性生交生交视频 | 三级电影在线看 | 精品亚洲永久免费 | 少妇人妻偷人精品无码视频新浪 | 男女羞羞无遮挡 | 丁香花电影在线观看免费高清 | 久久亚洲av永久无码精品 | 熟妇人妻无码xxx视频 | www.我爱av| 亚洲自拍第三页 | a级片日本| bt天堂新版中文在线地址 | 啪啪激情网 | 久草最新视频 | 天堂av一区 | 18p在线观看 | 在线观看一二区 | 30一40一50老女人毛片 | 美女网站一区 | 中文字幕乱码中文乱码b站 国产一区二区三区在线观看视频 | 羞羞答答一区 | jizz韩国 | 日韩一级黄色录像 | 奇米影视网 | 成年人黄色在线观看 | 少妇第一次交换又紧又爽 | 啪啪天堂 | 日韩一区视频在线 | 又黄又爽视频 | 精品三级电影 | 91久久久久国产一区二区 | 久草www| 国产精品xxx在线观看 | 色偷偷免费费视频在线 | 欧美三级视频在线观看 | 丁香六月欧美 | 中字幕一区二区三区乱码 | 俄罗斯美女av | av在线播放一区二区三区 | 亚洲国产精品自拍视频 | 免费成人深夜在线观看 | 黄色片在线免费观看 | 久久久国 | 快色视频 | 五月六月丁香 | 奇米中文字幕 | 性史性dvd影片农村毛片 | 乱淫67194 | 国产精品久久久精品 | 嫩模啪啪 | 国产无限制自拍 | 日本高清不卡一区 | 在线看片你懂 | 91亚洲国产成人精品一区 | a级片在线播放 | 亚洲av无码一区二区三区人妖 | 亚洲色图 校园春色 | 尤物在线 | 日本中文字幕二区 | 95看片淫黄大片一级 | 草草影院一区二区三区 | 美国成人免费视频 | 日韩欧美久久 | 欧美不卡在线视频 | 国产乱码在线 | 男生捅女生肌肌 | 性欧美欧美巨大69 | 国产伦精品一区二区三区妓女下载 | 风韵少妇性饥渴推油按摩视频 | 国产在视频线精品视频 | 日韩女优一区二区 | 91丝袜一区在线观看 | 欧美精品乱码99久久蜜桃 | 老司机激情影院 | 日日麻批|