倉(cāng)庫(kù)管理系統(tǒng)代碼(DOC33頁(yè)).doc_第1頁(yè)
倉(cāng)庫(kù)管理系統(tǒng)代碼(DOC33頁(yè)).doc_第2頁(yè)
倉(cāng)庫(kù)管理系統(tǒng)代碼(DOC33頁(yè)).doc_第3頁(yè)
倉(cāng)庫(kù)管理系統(tǒng)代碼(DOC33頁(yè)).doc_第4頁(yè)
倉(cāng)庫(kù)管理系統(tǒng)代碼(DOC33頁(yè)).doc_第5頁(yè)
已閱讀5頁(yè),還剩24頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

frmMain.csusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Diagnostics;namespace warehousepublic partial class frmMain : Formpublic frmMain()InitializeComponent();private void frmMain_Load(object sender, EventArgs e)tsslUser.Text = + frmLogin.M_str_right.ToString().Trim();tsslDate.Text = DateTime.Today.ToLongDateString();tsslTime.Text = + DateTime.Now.ToShortTimeString();if (frmLogin.M_str_right.ToString().Trim() = )ToolStripMenuItem.Enabled = false;ToolStripMenuItem.Enabled = false;ToolStripMenuItem.Enabled = false;ToolStripMenuItem.Enabled = false;ToolStripMenuItem.Enabled = false;ToolStripMenuItem.Enabled = false;ToolStripMenuItem.Enabled = false;ToolStripMenuItem.Enabled = false;btnIS.Enabled = false;btnOS.Enabled = false;btnBR.Enabled = false;btnPI.Enabled = false;btnGI.Enabled = false;btnSI.Enabled = false;btnRI.Enabled = false;btnUM.Enabled = false;private void btnIS_Click(object sender, EventArgs e)/GoodsManage.frmISManage GMfism = new warehouse.GoodsManage.frmISManage();/GMfism.Show();GMfism.ShowDialog();/private void btnOS_Click(object sender, EventArgs e)/GoodsManage.frmOSManage GMfosm = new warehouse.GoodsManage.frmOSManage();GMfosm.ShowDialog();private void btnBR_Click(object sender, EventArgs e)/GoodsManage.frmBGManage GMfbgm = new warehouse.GoodsManage.frmBGManage();GMfbgm.ShowDialog();private void btnPI_Click(object sender, EventArgs e)/BasicInfo.frmPrInfo BIfpi = new warehouse.BasicInfo.frmPrInfo();BIfpi.ShowDialog();private void btnGI_Click(object sender, EventArgs e)/BasicInfo.frmGoodsInfo BIfgi = new warehouse.BasicInfo.frmGoodsInfo();BIfgi.ShowDialog();private void btnSI_Click(object sender, EventArgs e)/BasicInfo.frmStoreInfo BIfsi = new warehouse.BasicInfo.frmStoreInfo();BIfsi.ShowDialog();private void btnISL_Click(object sender, EventArgs e)/LookandSum.frmISLook LSfisl = new warehouse.LookandSum.frmISLook();LSfisl.ShowDialog();private void btnSL_Click(object sender, EventArgs e)/LookandSum.frmGILook LSfgil = new warehouse.LookandSum.frmGILook();LSfgil.ShowDialog();private void btnGOL_Click(object sender, EventArgs e)/LookandSum.frmBGLook LSfbgl = new warehouse.LookandSum.frmBGLook();LSfbgl.ShowDialog();private void btnGIL_Click(object sender, EventArgs e)/LookandSum.frmRGLook LSfrgl = new warehouse.LookandSum.frmRGLook();LSfrgl.ShowDialog();private void btnOSL_Click(object sender, EventArgs e)/LookandSum.frmOSLook LSfosl = new warehouse.LookandSum.frmOSLook();LSfosl.ShowDialog();private void btnEP_Click(object sender, EventArgs e)/SystemSet.frmEditPwd HPfep = new warehouse.SystemSet.frmEditPwd();HPfep.ShowDialog();private void btnRI_Click(object sender, EventArgs e)/SystemSet.frmRightManage HPfrm = new warehouse.SystemSet.frmRightManage();HPfrm.ShowDialog();private void btnUM_Click(object sender, EventArgs e)/SystemSet.frmUserManage HPfum = new warehouse.SystemSet.frmUserManage();HPfum.ShowDialog();private void btnAU_Click(object sender, EventArgs e)/SystemSet.frmAboutUs HPfau = new warehouse.SystemSet.frmAboutUs();HPfau.ShowDialog();private void btnCH_Click(object sender, EventArgs e)if (MessageBox.Show(, , MessageBoxButtons.OKCancel, MessageBoxIcon.Information) = DialogResult.OK)warehouse.frmLogin frmlogin = new frmLogin();this.Hide();frmlogin.Show();private void btnExit_Click(object sender, EventArgs e)/this.Close();/Application.Exit();private void frmMain_FormClosed(object sender, FormClosedEventArgs e)if (MessageBox.Show(, , MessageBoxButtons.OKCancel, MessageBoxIcon.Information) = DialogResult.OK)Application.Exit();elsefrmMain fmain = new frmMain();fmain.Show();private void ToolStripMenuItem_Click(object sender, EventArgs e)btnIS_Click(sender, e);private void ToolStripMenuItem_Click(object sender, EventArgs e)btnOS_Click(sender,e);private void ToolStripMenuItem_Click(object sender, EventArgs e)btnBR_Click(sender, e);private void ToolStripMenuItem_Click(object sender, EventArgs e)btnPI_Click(sender, e);private void ToolStripMenuItem_Click(object sender, EventArgs e)btnGI_Click(sender, e);private void ToolStripMenuItem_Click(object sender, EventArgs e)btnSI_Click(sender, e);private void ToolStripMenuItem_Click(object sender, EventArgs e)btnSL_Click(sender, e);private void ToolStripMenuItem_Click(object sender, EventArgs e)btnISL_Click(sender, e);private void ToolStripMenuItem_Click(object sender, EventArgs e)btnOSL_Click(sender, e);private void ToolStripMenuItem_Click(object sender, EventArgs e)btnGOL_Click(sender, e);private void ToolStripMenuItem_Click(object sender, EventArgs e)btnGIL_Click(sender, e);private void ToolStripMenuItem_Click(object sender, EventArgs e)btnEP_Click(sender, e);private void ToolStripMenuItem_Click(object sender, EventArgs e)btnRI_Click(sender, e);private void ToolStripMenuItem_Click(object sender, EventArgs e)btnUM_Click(sender, e);private void ToolStripMenuItem_Click(object sender, EventArgs e)btnAU_Click(sender, e);private void ToolStripMenuItem_Click(object sender, EventArgs e)tabControl1.SelectedIndex = 0;private void ToolStripMenuItem_Click(object sender, EventArgs e)tabControl1.SelectedIndex = 1;private void ToolStripMenuItem_Click(object sender, EventArgs e)tabControl1.SelectedIndex = 2;private void ToolStripMenuItem_Click(object sender, EventArgs e)tabControl1.SelectedIndex = 3;private void ToolStripMenuItem_Click(object sender, EventArgs e)btnCH_Click(sender, e);private void ToolStripMenuItem_Click(object sender, EventArgs e)btnExit_Click(sender, e);private void toolStripStatusLabel6_Click(object sender, EventArgs e)System.Diagnostics.Process.Start(); frmInManage.csusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace warehouse.GoodsManagepublic partial class frmISManage : Formwarehouse.BaseClass.DataCon datacon = new warehouse.BaseClass.DataCon();warehouse.BaseClass.DataOperate doperate = new warehouse.BaseClass.DataOperate();public frmISManage()InitializeComponent();private void frmISManage_Load(object sender, EventArgs e)dgvISManage.Controls.Add(hScrollBar1);/doperate.cboxBind(select StoreName from tb_Storage, tb_Storage, StoreName, cboxSName);/doperate.cboxBind(select PrName from tb_Provider, tb_Provider, PrName, cboxPName);/DataSet myds = datacon.getds(select ISID as ,GoodsID as ,GoodsName as ,PrName as ,+ StoreName as ,GoodsSpec as ,GoodsUnit as ,GoodsNum as ,+ GoodsPrice as ,GoodsAPrice as ,ISDate as ,HandlePeople as ,+ ISRemark as from tb_InStore, tb_InStore);dgvISManage.DataSource = myds.Tables0;/datasetdatatable 0tb_InStoreprivate void btnAdd_Click(object sender, EventArgs e)if (txtISGID.Text = )MessageBox.Show(, , MessageBoxButtons.OK, MessageBoxIcon.Information);if (txtISGName.Text = )MessageBox.Show(, , MessageBoxButtons.OK, MessageBoxIcon.Information);if (txtGIPrice.Text = )MessageBox.Show(, , MessageBoxButtons.OK, MessageBoxIcon.Information);if (txtISGNum.Text = )MessageBox.Show(, , MessageBoxButtons.OK, MessageBoxIcon.Information);if (txtGSpec.Text = )MessageBox.Show(, , MessageBoxButtons.OK, MessageBoxIcon.Information);if (txtHPeople.Text = )MessageBox.Show(, , MessageBoxButtons.OK, MessageBoxIcon.Information);elseint P_int_returnValue = doperate.InsertGoods(Convert.ToInt32(txtISGID.Text.Trim(), txtISGName.Text.Trim(),cboxPName.Text.Trim(), cboxSName.Text.Trim(), txtGSpec.Text.Trim(), cboxGUnit.Text.Trim(),Convert.ToInt32(txtISGNum.Text.Trim(), Convert.ToDecimal(txtGIPrice.Text.Trim(), txtHPeople.Text.Trim(), txtISRemark.Text.Trim();if (P_int_returnValue = 100)MessageBox.Show(, , MessageBoxButtons.OK, MessageBoxIcon.Information);else if (P_int_returnValue = 200)MessageBox.Show(, , MessageBoxButtons.OK, MessageBoxIcon.Information);elseMessageBox.Show(, , MessageBoxButtons.OK, MessageBoxIcon.Information);frmISManage_Load(sender, e);private void btnDel_Click(object sender, EventArgs e)/ try/ /datacon.getcom(delete from tb_InStore where ISID=+ Convert.ToString(dgvISManage0, dgvISManage.CurrentCell.RowIndex.Value).Trim() + );/Convert.ToString(dataGridView11,dataGridView1.CurrentCell.RowIndex.Value).Trim();/ .MessageBox.Show(, , MessageBoxButtons.OK, MessageBoxIcon.Information);frmISManage_Load(sender, e);/catch (Exception ex)/ MessageBox.Show(ex.Message, , MessageBoxButtons.OK, MessageBoxIcon.Warning);/private void btnExit_Click(object sender, EventArgs e)this.Close();private void dgvISManage_CellClick(object sender, DataGridViewCellEventArgs e)/*datagridviewCellClickdatagridview. Convert.ToString(dataGridView11,dataGridView1.CurrentCell.RowIndex.Value).Trim(); */txtISGID.Text = Convert.ToString(dgvISManage1,dgvISManage.CurrentCell.RowIndex.Value).Trim();txtISGName.Text = Convert.ToString(dgvISManage2, dgvISManage.CurrentCell.RowIndex.Value).Trim();cboxSName.Text = Convert.ToString(dgvISManage4, dgvISManage.CurrentCell.RowIndex.Value).Trim();cboxPName.Text = Convert.ToString(dgvISManage3, dgvISManage.CurrentCell.RowIndex.Value).Trim();txtGSpec.Text = Convert.ToString(dgvISManage5, dgvISManage.CurrentCell.RowIndex.Value).Trim();cboxGUnit.Text = Convert.ToString(dgvISManage6, dgvISManage.CurrentCell.RowIndex.Value).Trim();txtISGNum.Text = Convert.ToString(dgvISManage7, dgvISManage.CurrentCell.RowIndex.Value).Trim();txtGIPrice.Text = Convert.ToString(dgvISManage8, dgvISManage.CurrentCell.RowIndex.Value).Trim();txtGSPrice.Text = Convert.ToString(dgvISManage9, dgvISManage.CurrentCell.RowIndex.Value).Trim();txtHPeople.Text = Convert.ToString(dgvISManage11, dgvISManage.CurrentCell.RowIndex.Value).Trim();txtISRemark.Text = Convert.ToString(dgvISManage12, dgvISManage.CurrentCell.RowIndex.Value).Trim();private void txtGIPrice_TextChanged(object sender, EventArgs e)trytxtGSPrice.Text = Convert.ToString(Convert.ToDecimal(txtGIPrice.Text.Trim() * Convert.ToInt32(txtISGNum.Text.Trim().Trim();/Convert.ToDecimal(txtGIPrice.Text.Trim()Decimal/String Decimal catch (Exception ex)MessageBox.Show(ex.Message, , MessageBoxButtons.OK, MessageBoxIcon.Warning);private void frmISManage_FormClosed(object sender, FormClosedEventArgs e)this.Close();private void button1_Click(object sender, EventArgs e)this.txtGIPrice.Text = ;this.txtGSpec.Text = ;this.txtHPeople.Text = ;this.txtISGID.Text = ;this.txtISGName.Text = ;this.txtISGNum.Text = ;this.txtISRemark.Text = ;this.txtGIPrice.Text = ;this.txtGSPrice.Text = ;frmOsManage.csusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace warehouse.GoodsManagepublic partial class frmOSManage : Formwarehouse.BaseClass.DataCon datacon = new warehouse.BaseClass.DataCon();warehouse.BaseClass.DataOperate doperate = new warehouse.BaseClass.DataOperate();public frmOSManage()InitializeComponent();private void frmOSManage_Load(object sender, EventArgs e)dgvOSManage.Controls.Add(hScrollBar1);doperate.cboxBind(select distinct StoreName from tb_InStore, tb_InStore, StoreName, cboxSName);DataSet myds = datacon.getds(select OSID as ,StoreName as ,GoodsName as ,+ GoodsSpec as ,GoodsUnit as ,GoodsNum as ,GoodsPrice as ,GoodsAPrice as ,+ OSDate as ,PGProvider as ,PGPeople as ,+ HandlePeople as ,OSRemark as from tb_OutStore, tb_OutStore);dgvOSManage.DataSource = myds.Tablestb_OutStore;private void btnAdd_Click(object sender, EventArgs e)trySqlDataReader sqlread = datacon.getread(select GoodsNum from tb_GoodsInfo+ where StoreName= + cboxSName.Text.Trim() + and GoodsName=+ cboxGName.Text.Trim() + and GoodsSpec= + cboxGSpec.Text.Trim() + );if (sqlread.Read()if (Convert.ToInt32(txtOSGNum.Text.Trim() Convert.ToInt32(sqlreadGoodsNum.ToString().Trim()MessageBox.Show(, , MessageBoxButtons.OK, MessageBoxIcon.Information);elsedatacon.getcom(insert into tb_OutStore(StoreName,GoodsName,GoodsSpec,GoodsUnit, + GoodsNum,GoodsPrice,PGProvider,PGPeople,HandlePeople,OSRemark)+ values( + cboxSName.Text.Trim() + , + cboxGName.Text.Trim() + , + cboxGSpec.Text.Trim() + , + cboxGUnit.Text.Trim() + ,+ txtOSGNum.Text.Trim() + , + txtGOPrice.Text.Trim() + , + txtOSUnit.Text.Trim() + , +txtOSPeople.Text.Trim() + , + txtHPeople.Text.Trim() + , + txtOSRemark.Text.Trim() + ); MessageBox.Show(, , MessageBoxButtons.OK, MessageBoxIcon.Information);frmOSManage_Load(sender, e);sqlread.Close();catch (Exception ex)MessageBox.Show(ex.Message, , MessageBoxButtons.OK, MessageBoxIcon.Warning);private void btnDel_Click(object sender, EventArgs e)trydatacon.getcom(delete from tb_OutStore where OSID=+ Convert.ToString(dgvOSManage0, dgvOSManage.CurrentCell.RowIndex.Value).Trim() + );MessageBox.Show(, , MessageBoxButtons.OK, MessageBoxIcon.Information);frmOSManage_Load(sender, e);catch (Exception ex)MessageBox.Show(ex.Message, , MessageBoxButtons.OK, MessageBoxIcon.Warning);private void btnExit_Click(object sender, EventArgs e)this.Close();private void dgvOSManage_CellClick(object sender, DataGridViewCellEventArgs e)cboxSName.Text = Convert.ToString(dgvOSManage1, dgvOSManage.CurrentCell.RowIndex.Value).Trim();cboxGName.Text = Convert.ToString(dgvOSManage2, dgvOSManage.CurrentCell.RowIndex.Value).Trim();cboxGSpec.Text = Convert.ToString(dgvOSManage3, dgvOSManage.CurrentCell.RowIndex.Value).Trim();cboxGUnit.Text = Convert.ToString(dgvOSManage4, dgvOSManage.CurrentCell.RowIndex.Value).Trim();txtOSGNum.Text = Convert.ToString(dgvOSManage5, dgvOSManage.CurrentCell.RowIndex.Value).Trim();txtGOPrice.Text = Convert.ToString(dgvOSManage6, dgvOSManage.CurrentCell.RowIndex.Value).Trim();txtGSPrice.Text = Convert.ToString(dgvOSManage7, dgvOSManage.CurrentCell.RowIndex.Value).Trim();txtOSUnit.Text = Convert.ToString(dgvOSManage9, dgvOSManage.CurrentCell.RowIndex.Value).Trim();txtOSPeople.Text = Convert.ToString(dgvOSManage10, dgvOSManage.CurrentCell.RowIndex.Value).Trim();txtHPeople.Text = Convert.ToString(dgvOSManage11, dgvOSManage.CurrentCell.RowIndex.Value).Trim();txtOSRemark.Text = Convert.ToString(dgvOSManage12, dgvOSManage.CurrentCell.RowIndex.Value).Trim();private void cboxSName_SelectedIndexChanged(object sender, EventArgs e)doperate.cboxBind(select distinct GoodsName from tb_InStore where StoreName=+ cboxSName.Text.Trim() + , tb_InStore, GoodsName, cboxGName);private void cboxGName_SelectedIndexChanged(object sender, EventArgs e)doperate.cboxBind(select distinct GoodsSpec from tb_InStore where StoreName=+ cboxSName.Text.Trim() + and GoodsName= + cboxGName.Text.Trim()+ , tb_InStore, GoodsSpec, cboxGSpec);SqlDataReader sqlread = datacon.getread(select GoodsUnit,GoodsOutPrice,GoodsNum from tb_GoodsInfo+ where StoreName= + cboxSName.Text.Trim()+ and GoodsName= + cboxGName.Text.Trim() + );if (sqlread.Read()this.cboxGUnit.Text = sqlreadGoodsUnit.ToString().Trim();this.txtGOPrice.Text = qlreadGoodsOutPrice.ToString().Trim();this.tbxshenxia.Text = sqlreadGoodsNum.ToString().Trim();sqlread.Close();private void txtOSGNum_TextChanged(object sender, EventArgs e)trytxtGSPrice.Text = Convert.ToString(Convert.ToDecimal(txtGOPrice.Text.Trim()* Co

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論