本人根同学一起写的一段关于库存管理中出库单的代码,可是提交不了,希望大家能指正一下:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb;
namespace di1
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class 出库单 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label 名称;
private System.Windows.Forms.Label 编号;
private System.Windows.Forms.Label 类型;
private System.Windows.Forms.Label 颜色;
private System.Windows.Forms.Label outhouse;
private System.Windows.Forms.Label 日期;
private System.Windows.Forms.Label 送货单号;
private System.Windows.Forms.Label 领料人;
private System.Windows.Forms.Label 发生金额;
private System.Windows.Forms.Label 实际出库;
private System.Windows.Forms.Label 仓库名称;
private System.Windows.Forms.Label 单位;
private System.Windows.Forms.Label 单价;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox textBox14;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox textBox15;
private System.Windows.Forms.TextBox textBox16;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.TextBox textBox17;
private System.Windows.Forms.TextBox textBox18;
private System.Windows.Forms.TextBox textBox19;
private System.Windows.Forms.TextBox textBox21;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox textBox22;
private System.Windows.Forms.TextBox textBox23;
private System.Windows.Forms.TextBox textBox25;
private System.Windows.Forms.TextBox textBox26;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox8;
private System.Windows.Forms.TabControl tab成品物料出库;
private System.Windows.Forms.TabPage tab成品;
private System.Windows.Forms.TabPage tab物料;
private System.Windows.Forms.DataGrid dataGrid1;
private System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter1;
private System.Data.OleDb.OleDbCommand oleDbSelectCommand1;
private System.Data.OleDb.OleDbCommand oleDbInsertCommand1;
private System.Data.OleDb.OleDbCommand oleDbUpdateCommand1;
private System.Data.OleDb.OleDbCommand oleDbDeleteCommand1;
private System.Data.OleDb.OleDbConnection oleDbConnection1;
private System.Windows.Forms.Button 刷新1;
private System.Windows.Forms.Button fupdate;
private System.Windows.Forms.TextBox fdate;
private System.Windows.Forms.TextBox fperson;
private System.Windows.Forms.TextBox fname;
private System.Windows.Forms.TextBox fno;
private System.Windows.Forms.TextBox ftype;
private System.Windows.Forms.TextBox fcolor;
private System.Windows.Forms.TextBox fprice;
private System.Windows.Forms.TextBox funit;
private System.Windows.Forms.TextBox fcno;
private System.Windows.Forms.TextBox ftotal;
private System.Windows.Forms.TextBox fcost;
private System.Windows.Forms.TextBox fsno;
private System.Windows.Forms.Button 提交;
private System.Windows.Forms.Label 送货单号1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public 出库单()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.tab成品物料出库 = new System.Windows.Forms.TabControl();
this.tab成品 = new System.Windows.Forms.TabPage();
this.提交 = new System.Windows.Forms.Button();
this.fupdate = new System.Windows.Forms.Button();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.领料人 = new System.Windows.Forms.Label();
this.发生金额 = new System.Windows.Forms.Label();
this.实际出库 = new System.Windows.Forms.Label();
this.仓库名称 = new System.Windows.Forms.Label();
this.fdate = new System.Windows.Forms.TextBox();
this.单位 = new System.Windows.Forms.Label();
this.outhouse = new System.Windows.Forms.Label();
this.fsno = new System.Windows.Forms.TextBox();
this.fperson = new System.Windows.Forms.TextBox();
this.日期 = new System.Windows.Forms.Label();
this.名称 = new System.Windows.Forms.Label();
this.fname = new System.Windows.Forms.TextBox();
this.fno = new System.Windows.Forms.TextBox();
this.ftype = new System.Windows.Forms.TextBox();
this.fcolor = new System.Windows.Forms.TextBox();
this.fprice = new System.Windows.Forms.TextBox();
this.编号 = new System.Windows.Forms.Label();
this.类型 = new System.Windows.Forms.Label();
this.单价 = new System.Windows.Forms.Label();
this.颜色 = new System.Windows.Forms.Label();
this.funit = new System.Windows.Forms.TextBox();
this.fcno = new System.Windows.Forms.TextBox();
this.ftotal = new System.Windows.Forms.TextBox();
this.fcost = new System.Windows.Forms.TextBox();
this.tab物料 = new System.Windows.Forms.TabPage();
this.刷新1 = new System.Windows.Forms.Button();
this.textBox8 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.button2 = new System.Windows.Forms.Button();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.textBox14 = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.textBox15 = new System.Windows.Forms.TextBox();
this.textBox16 = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.textBox17 = new System.Windows.Forms.TextBox();
this.textBox18 = new System.Windows.Forms.TextBox();
this.textBox19 = new System.Windows.Forms.TextBox();
this.textBox21 = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label();
this.textBox22 = new System.Windows.Forms.TextBox();
this.textBox23 = new System.Windows.Forms.TextBox();
this.textBox25 = new System.Windows.Forms.TextBox();
this.textBox26 = new System.Windows.Forms.TextBox();
this.oleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter();
this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbConnection1 = new System.Data.OleDb.OleDbConnection();
this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand();
this.送货单号1 = new System.Windows.Forms.Label();
this.tab成品物料出库.SuspendLayout();
this.tab成品.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.tab物料.SuspendLayout();
this.SuspendLayout();
//
// tab成品物料出库
//
this.tab成品物料出库.Controls.Add(this.tab成品);
this.tab成品物料出库.Controls.Add(this.tab物料);
this.tab成品物料出库.Location = new System.Drawing.Point(0, 0);
this.tab成品物料出库.Name = "tab成品物料出库";
this.tab成品物料出库.SelectedIndex = 0;
this.tab成品物料出库.Size = new System.Drawing.Size(512, 464);
this.tab成品物料出库.TabIndex = 0;
//
// tab成品
//
this.tab成品.AutoScroll = true;
this.tab成品.Controls.Add(this.送货单号1);
this.tab成品.Controls.Add(this.提交);
this.tab成品.Controls.Add(this.fupdate);
this.tab成品.Controls.Add(this.dataGrid1);
this.tab成品.Controls.Add(this.领料人);
this.tab成品.Controls.Add(this.发生金额);
this.tab成品.Controls.Add(this.实际出库);
this.tab成品.Controls.Add(this.仓库名称);
this.tab成品.Controls.Add(this.fdate);
this.tab成品.Controls.Add(this.单位);
this.tab成品.Controls.Add(this.outhouse);
this.tab成品.Controls.Add(this.fsno);
this.tab成品.Controls.Add(this.fperson);
this.tab成品.Controls.Add(this.日期);
this.tab成品.Controls.Add(this.名称);
this.tab成品.Controls.Add(this.fname);
this.tab成品.Controls.Add(this.fno);
this.tab成品.Controls.Add(this.ftype);
this.tab成品.Controls.Add(this.fcolor);
this.tab成品.Controls.Add(this.fprice);
this.tab成品.Controls.Add(this.编号);
this.tab成品.Controls.Add(this.类型);
this.tab成品.Controls.Add(this.单价);
this.tab成品.Controls.Add(this.颜色);
this.tab成品.Controls.Add(this.funit);
this.tab成品.Controls.Add(this.fcno);
this.tab成品.Controls.Add(this.ftotal);
this.tab成品.Controls.Add(this.fcost);
this.tab成品.Location = new System.Drawing.Point(4, 21);
this.tab成品.Name = "tab成品";
this.tab成品.Size = new System.Drawing.Size(504, 439);
this.tab成品.TabIndex = 0;
this.tab成品.Text = "成品";
this.tab成品.Click += new System.EventHandler(this.tabPage1_Click);
//
// 提交
//
this.提交.Location = new System.Drawing.Point(360, 88);
this.提交.Name = "提交";
this.提交.Size = new System.Drawing.Size(88, 40);
this.提交.TabIndex = 59;
this.提交.Text = "提交";
this.提交.Click += new System.EventHandler(this.刷新_Click_1);
//
// fupdate
//
this.fupdate.Location = new System.Drawing.Point(360, 144);
this.fupdate.Name = "fupdate";
this.fupdate.Size = new System.Drawing.Size(88, 40);
this.fupdate.TabIndex = 57;
this.fupdate.Text = "刷新";
this.fupdate.Click += new System.EventHandler(this.刷新_Click);
//
// dataGrid1
//
this.dataGrid1.DataMember = "";
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(8, 240);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.Size = new System.Drawing.Size(488, 192);
this.dataGrid1.TabIndex = 56;
this.dataGrid1.Navigate += new System.Windows.Forms.NavigateEventHandler(this.dataGrid1_Navigate);
//
// 领料人
//
this.领料人.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.领料人.Location = new System.Drawing.Point(160, 192);
this.领料人.Name = "领料人";
this.领料人.Size = new System.Drawing.Size(64, 24);
this.领料人.TabIndex = 53;
this.领料人.Text = "领料人";
//
// 发生金额
//
this.发生金额.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.发生金额.Location = new System.Drawing.Point(160, 160);
this.发生金额.Name = "发生金额";
this.发生金额.Size = new System.Drawing.Size(64, 24);
this.发生金额.TabIndex = 52;
this.发生金额.Text = "发生金额";
//
// 实际出库
//
this.实际出库.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.实际出库.Location = new System.Drawing.Point(160, 128);
this.实际出库.Name = "实际出库";
this.实际出库.Size = new System.Drawing.Size(64, 24);
this.实际出库.TabIndex = 51;
this.实际出库.Text = "实际出库";
//
// 仓库名称
//
this.仓库名称.Font = new System.Drawing.Font("宋体", 10.5F,
未完待续