当前路径:InventoryInfoForm.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.SqlClient; using System.Drawing; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; namespace CamtasiaStudio { public partial class InventoryInfoForm : Form { public InventoryInfoForm() { InitializeComponent(); } [DllImportAttribute("user32.dll")] private static extern bool AnimateWindow(IntPtr hwnd, int dwTime, int dwFlags); public const Int32 AW_CENTER = 0x00000010;//从中间向四周出现 //定义获取当前登录的用户的姓名 public static string UserName; //定义获取当前登录的用户的所属权限 public static string UserPower; private void pictureBox1_Click(object sender, EventArgs e) { this.Close(); } private void InventoryInfoForm_Load(object sender, EventArgs e) { AnimateWindow(this.Handle, 300, AW_CENTER);//开始动画 目标窗口、持续时间、动画类型 //显示当前登录的用户名、权限 this.lblUser.Text = UserName + "[" + UserPower + "]"; //显示当前的系统时间 this.timer1.Start(); //cbType下拉框默认为“--请选择--” this.cbType.SelectedIndex = 0; //加载所有数据 LoadData(); } private void LoadData() { try { SqlConnection conn = new SqlConnection(DBHelper.ConnString); conn.Open(); //已入库 马上变为待出库 string sqlStr = "select g.GoodsID,g.ProducesM,g.GoodsName,g.GoodsPrice,g.GoodsNum 入库数量,(g.GoodsNum-ig.GoodsNum) 待入库,(g.GoodsNum-og.GoodsNum) 出库数量,og.GoodsNum 待出库,g.GoodsNum 总数量,g.PnoName from Goods g,InGoodsInfo ig,InNumber i,OutGoodsInfo og,OutNumber o where ig.InNum=i.InNum and ig.GoodsID=g.GoodsID and og.OutNum=o.OutNum and og.GoodsID=g.GoodsID and i.State='已入库'"; SqlCommand cmd = new SqlCommand(sqlStr, conn); SqlDataReader rd = cmd.ExecuteReader(); while (rd.Read()) { ListViewItem item = new ListViewItem(rd[0].ToString()); item.SubItems.Add(rd[1].ToString()); item.SubItems.Add(rd[2].ToString()); item.SubItems.Add(rd[3].ToString()); item.SubItems.Add(rd[4].ToString()); item.SubItems.Add(rd[5].ToString()); item.SubItems.Add(rd[6].ToString()); item.SubItems.Add(rd[7].ToString()); item.SubItems.Add(rd[8].ToString()); item.SubItems.Add(rd[9].ToString()); this.lvCamtasiaInfo.Items.Add(item); } rd.Close(); //待出库操作后变为 待入库数据 string sqlStr2 = "select g.GoodsID,g.ProducesM,g.GoodsName,g.GoodsPrice,g.GoodsNum 入库数量,ig.GoodsNum 待入库,g.GoodsNum-ig.GoodsNum 出库数量,g.GoodsNum-ig.GoodsNum 待出库,g.GoodsNum 总数量,g.PnoName from Goods g,InGoodsInfo ig,InNumber i where g.GoodsID=ig.GoodsID and ig.InNum=i.InNum and i.State='待入库'"; SqlCommand cmd2 = new SqlCommand(sqlStr2, conn); SqlDataReader rd2 = cmd2.ExecuteReader(); ...
完整源码文件,请先购买后再查看
相关源码
- 密码管理器(1PASSWORD)2022-05-06
- 飞行棋小游戏2022-05-06
- 超市积分管理系统2022-04-28
- C#国际象棋源码2022-04-25
- 3D走势图WINFORM2022-04-20
- 更新ORACLE数据库中所有表的某个字段的值2022-04-13
关于我们 | 顾问团队 | 发展历程 | 联系我们 | 源码上传
联系电话(Tel):4008-010-151(免长途)
地址:北京市海淀区大恒科技大厦五层 邮编:100080
Floor 5th,Daheng Building,Zhongguancun,Beijing,China,100080
51Aspx.com 版权所有 CopyRight © 2006-2022. 京ICP备09089570号 | 京公网安备11010702000869号
联系电话(Tel):4008-010-151(免长途)
地址:北京市海淀区大恒科技大厦五层 邮编:100080
Floor 5th,Daheng Building,Zhongguancun,Beijing,China,100080
51Aspx.com 版权所有 CopyRight © 2006-2022. 京ICP备09089570号 | 京公网安备11010702000869号