⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mrphistory.cs

📁 生产管理信息系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
			// 
			this.txt6.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataView1, "毛需求"));
			this.txt6.Enabled = false;
			this.txt6.Location = new System.Drawing.Point(256, 88);
			this.txt6.Name = "txt6";
			this.txt6.ReadOnly = true;
			this.txt6.TabIndex = 73;
			this.txt6.Text = "";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(33, 61);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(32, 16);
			this.label2.TabIndex = 66;
			this.label2.Text = "年份";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(18, 31);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(56, 16);
			this.label3.TabIndex = 63;
			this.label3.Text = "物料编号";
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(216, 62);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(48, 16);
			this.label4.TabIndex = 67;
			this.label4.Text = "计划期";
			// 
			// label5
			// 
			this.label5.Location = new System.Drawing.Point(203, 30);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(56, 16);
			this.label5.TabIndex = 65;
			this.label5.Text = "物料名称";
			// 
			// label8
			// 
			this.label8.Location = new System.Drawing.Point(16, 92);
			this.label8.Name = "label8";
			this.label8.Size = new System.Drawing.Size(56, 16);
			this.label8.TabIndex = 64;
			this.label8.Text = "期初库存";
			// 
			// label9
			// 
			this.label9.Location = new System.Drawing.Point(216, 93);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(48, 16);
			this.label9.TabIndex = 68;
			this.label9.Text = "毛需求";
			// 
			// textBox4
			// 
			this.textBox4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataView1, "预计库存"));
			this.textBox4.Enabled = false;
			this.textBox4.Location = new System.Drawing.Point(424, 56);
			this.textBox4.Name = "textBox4";
			this.textBox4.ReadOnly = true;
			this.textBox4.TabIndex = 74;
			this.textBox4.Text = "";
			// 
			// textBox5
			// 
			this.textBox5.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataView1, "预计出库"));
			this.textBox5.Enabled = false;
			this.textBox5.Location = new System.Drawing.Point(424, 26);
			this.textBox5.Name = "textBox5";
			this.textBox5.ReadOnly = true;
			this.textBox5.TabIndex = 70;
			this.textBox5.Text = "";
			// 
			// textBox6
			// 
			this.textBox6.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataView1, "净需求"));
			this.textBox6.Enabled = false;
			this.textBox6.Location = new System.Drawing.Point(424, 88);
			this.textBox6.Name = "textBox6";
			this.textBox6.ReadOnly = true;
			this.textBox6.TabIndex = 73;
			this.textBox6.Text = "";
			// 
			// label10
			// 
			this.label10.Location = new System.Drawing.Point(371, 62);
			this.label10.Name = "label10";
			this.label10.Size = new System.Drawing.Size(56, 16);
			this.label10.TabIndex = 67;
			this.label10.Text = "预计库存";
			// 
			// label11
			// 
			this.label11.Location = new System.Drawing.Point(373, 32);
			this.label11.Name = "label11";
			this.label11.Size = new System.Drawing.Size(56, 16);
			this.label11.TabIndex = 65;
			this.label11.Text = "预计出库";
			// 
			// label12
			// 
			this.label12.Location = new System.Drawing.Point(384, 96);
			this.label12.Name = "label12";
			this.label12.Size = new System.Drawing.Size(56, 16);
			this.label12.TabIndex = 68;
			this.label12.Text = "净需求";
			// 
			// dataGrid1
			// 
			this.dataGrid1.CaptionVisible = false;
			this.dataGrid1.DataMember = "";
			this.dataGrid1.DataSource = this.dataView1;
			this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid1.Location = new System.Drawing.Point(0, 192);
			this.dataGrid1.Name = "dataGrid1";
			this.dataGrid1.ReadOnly = true;
			this.dataGrid1.Size = new System.Drawing.Size(544, 224);
			this.dataGrid1.TabIndex = 2;
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.txt3);
			this.groupBox1.Controls.Add(this.label6);
			this.groupBox1.Controls.Add(this.btnSearch);
			this.groupBox1.Controls.Add(this.txt2);
			this.groupBox1.Controls.Add(this.label7);
			this.groupBox1.Controls.Add(this.txt1);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Location = new System.Drawing.Point(0, 8);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(544, 56);
			this.groupBox1.TabIndex = 31;
			this.groupBox1.TabStop = false;
			// 
			// txt3
			// 
			this.txt3.Location = new System.Drawing.Point(440, 24);
			this.txt3.Name = "txt3";
			this.txt3.TabIndex = 7;
			this.txt3.Text = "";
			// 
			// label6
			// 
			this.label6.Location = new System.Drawing.Point(392, 27);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(48, 16);
			this.label6.TabIndex = 5;
			this.label6.Text = "计划期";
			// 
			// btnSearch
			// 
			this.btnSearch.Image = ((System.Drawing.Image)(resources.GetObject("btnSearch.Image")));
			this.btnSearch.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnSearch.Location = new System.Drawing.Point(16, 20);
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Size = new System.Drawing.Size(72, 24);
			this.btnSearch.TabIndex = 3;
			this.btnSearch.Text = " 搜索";
			this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
			// 
			// txt2
			// 
			this.txt2.Location = new System.Drawing.Point(280, 24);
			this.txt2.Name = "txt2";
			this.txt2.TabIndex = 6;
			this.txt2.Text = "";
			// 
			// label7
			// 
			this.label7.Location = new System.Drawing.Point(248, 28);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(32, 16);
			this.label7.TabIndex = 4;
			this.label7.Text = "年份";
			// 
			// txt1
			// 
			this.txt1.Location = new System.Drawing.Point(160, 24);
			this.txt1.Name = "txt1";
			this.txt1.Size = new System.Drawing.Size(80, 21);
			this.txt1.TabIndex = 6;
			this.txt1.Text = "";
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(109, 27);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(56, 16);
			this.label1.TabIndex = 4;
			this.label1.Text = "物料编号";
			// 
			// MRPHistory
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(552, 421);
			this.Controls.Add(this.dataGrid1);
			this.Controls.Add(this.groupBox2);
			this.Controls.Add(this.groupBox1);
			this.Name = "MRPHistory";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "【MRP历史查询】";
			this.Load += new System.EventHandler(this.MRPHistory_Load);
			this.groupBox2.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.dataView1)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.dataSet31)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
			this.groupBox1.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion

		//-------------根据输入数据查询MRP计算记录-------------
		private void btnSearch_Click(object sender, System.EventArgs e)
		{
			string strFilter="";

			if(txt1.Text.Trim() != "")//设置表的过滤条件
				strFilter += "物料编号 like '%" + txt1.Text.Trim() + "%' and ";
			if(txt2.Text.Trim() != "")
				strFilter += "年份= '" + txt2.Text.Trim() + "' and ";
			if(txt3.Text.Trim() != "")
				strFilter += "计划期='" + txt3.Text.Trim() + "' and ";

			if(strFilter != "")    // 存在查询条件
				strFilter = strFilter.Substring(0,strFilter.Length-5);

			dataView1.RowFilter=strFilter;
		}

		//--------------窗体创建时,读入全部数据---------------
		private void MRPHistory_Load(object sender, System.EventArgs e)
		{
			da1.Fill(dataSet31);
		}		
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -