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

📄 borrowbook.cs

📁 数据库文件先要导入
💻 CS
📖 第 1 页 / 共 2 页
字号:
			this.groupBox2.Controls.Add(this.label8);
			this.groupBox2.Controls.Add(this.label9);
			this.groupBox2.Controls.Add(this.label11);
			this.groupBox2.Controls.Add(this.label12);
			this.groupBox2.Controls.Add(this.label16);
			this.groupBox2.Controls.Add(this.label17);
			this.groupBox2.Controls.Add(this.label5);
			this.groupBox2.Controls.Add(this.label6);
			this.groupBox2.Controls.Add(this.texBD1);
			this.groupBox2.Controls.Add(this.texRD1);
			this.groupBox2.Location = new System.Drawing.Point(16, 168);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new System.Drawing.Size(456, 256);
			this.groupBox2.TabIndex = 18;
			this.groupBox2.TabStop = false;
			this.groupBox2.Text = "书籍信息";
			// 
			// texPr1
			// 
			this.texPr1.Location = new System.Drawing.Point(304, 56);
			this.texPr1.Name = "texPr1";
			this.texPr1.ReadOnly = true;
			this.texPr1.Size = new System.Drawing.Size(128, 21);
			this.texPr1.TabIndex = 16;
			this.texPr1.TabStop = false;
			this.texPr1.Text = "";
			// 
			// label21
			// 
			this.label21.AutoSize = true;
			this.label21.Location = new System.Drawing.Point(256, 56);
			this.label21.Name = "label21";
			this.label21.Size = new System.Drawing.Size(42, 17);
			this.label21.TabIndex = 15;
			this.label21.Text = "价格:";
			// 
			// texBZ2
			// 
			this.texBZ2.Location = new System.Drawing.Point(96, 152);
			this.texBZ2.Multiline = true;
			this.texBZ2.Name = "texBZ2";
			this.texBZ2.ReadOnly = true;
			this.texBZ2.Size = new System.Drawing.Size(336, 88);
			this.texBZ2.TabIndex = 14;
			this.texBZ2.TabStop = false;
			this.texBZ2.Text = "";
			// 
			// texP1
			// 
			this.texP1.Location = new System.Drawing.Point(304, 88);
			this.texP1.Name = "texP1";
			this.texP1.ReadOnly = true;
			this.texP1.Size = new System.Drawing.Size(128, 21);
			this.texP1.TabIndex = 12;
			this.texP1.TabStop = false;
			this.texP1.Text = "";
			// 
			// texA1
			// 
			this.texA1.Location = new System.Drawing.Point(96, 88);
			this.texA1.Name = "texA1";
			this.texA1.ReadOnly = true;
			this.texA1.Size = new System.Drawing.Size(128, 21);
			this.texA1.TabIndex = 11;
			this.texA1.TabStop = false;
			this.texA1.Text = "";
			// 
			// texT1
			// 
			this.texT1.Location = new System.Drawing.Point(96, 56);
			this.texT1.Name = "texT1";
			this.texT1.ReadOnly = true;
			this.texT1.Size = new System.Drawing.Size(128, 21);
			this.texT1.TabIndex = 10;
			this.texT1.TabStop = false;
			this.texT1.Text = "";
			// 
			// texBN1
			// 
			this.texBN1.Location = new System.Drawing.Point(304, 24);
			this.texBN1.Name = "texBN1";
			this.texBN1.ReadOnly = true;
			this.texBN1.Size = new System.Drawing.Size(128, 21);
			this.texBN1.TabIndex = 9;
			this.texBN1.TabStop = false;
			this.texBN1.Text = "";
			// 
			// texI1
			// 
			this.texI1.Location = new System.Drawing.Point(96, 24);
			this.texI1.Name = "texI1";
			this.texI1.Size = new System.Drawing.Size(128, 21);
			this.texI1.TabIndex = 8;
			this.texI1.Text = "";
			this.texI1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.texI1_KeyPress);
			// 
			// label8
			// 
			this.label8.AutoSize = true;
			this.label8.Location = new System.Drawing.Point(256, 24);
			this.label8.Name = "label8";
			this.label8.Size = new System.Drawing.Size(42, 17);
			this.label8.TabIndex = 1;
			this.label8.Text = "书名:";
			// 
			// label9
			// 
			this.label9.AutoSize = true;
			this.label9.Location = new System.Drawing.Point(240, 88);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(54, 17);
			this.label9.TabIndex = 4;
			this.label9.Text = "出版社:";
			// 
			// label11
			// 
			this.label11.AutoSize = true;
			this.label11.Location = new System.Drawing.Point(40, 24);
			this.label11.Name = "label11";
			this.label11.Size = new System.Drawing.Size(42, 17);
			this.label11.TabIndex = 7;
			this.label11.Text = "ISBN:";
			// 
			// label12
			// 
			this.label12.AutoSize = true;
			this.label12.Location = new System.Drawing.Point(40, 88);
			this.label12.Name = "label12";
			this.label12.Size = new System.Drawing.Size(42, 17);
			this.label12.TabIndex = 3;
			this.label12.Text = "作者:";
			// 
			// label16
			// 
			this.label16.AutoSize = true;
			this.label16.Location = new System.Drawing.Point(40, 56);
			this.label16.Name = "label16";
			this.label16.Size = new System.Drawing.Size(42, 17);
			this.label16.TabIndex = 2;
			this.label16.Text = "类别:";
			// 
			// label17
			// 
			this.label17.AutoSize = true;
			this.label17.Location = new System.Drawing.Point(40, 144);
			this.label17.Name = "label17";
			this.label17.Size = new System.Drawing.Size(42, 17);
			this.label17.TabIndex = 6;
			this.label17.Text = "备注:";
			// 
			// groupBox3
			// 
			this.groupBox3.Controls.Add(this.button3);
			this.groupBox3.Controls.Add(this.label7);
			this.groupBox3.Controls.Add(this.tex2);
			this.groupBox3.Controls.Add(this.label4);
			this.groupBox3.Controls.Add(this.label3);
			this.groupBox3.Controls.Add(this.tex1);
			this.groupBox3.Controls.Add(this.label2);
			this.groupBox3.Location = new System.Drawing.Point(480, 8);
			this.groupBox3.Name = "groupBox3";
			this.groupBox3.Size = new System.Drawing.Size(152, 160);
			this.groupBox3.TabIndex = 19;
			this.groupBox3.TabStop = false;
			// 
			// button3
			// 
			this.button3.Location = new System.Drawing.Point(40, 112);
			this.button3.Name = "button3";
			this.button3.Size = new System.Drawing.Size(72, 23);
			this.button3.TabIndex = 14;
			this.button3.Text = "确定";
			this.button3.Click += new System.EventHandler(this.button3_Click);
			// 
			// label7
			// 
			this.label7.AutoSize = true;
			this.label7.Location = new System.Drawing.Point(120, 72);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(17, 17);
			this.label7.TabIndex = 13;
			this.label7.Text = "本";
			// 
			// tex2
			// 
			this.tex2.Location = new System.Drawing.Point(72, 72);
			this.tex2.Name = "tex2";
			this.tex2.Size = new System.Drawing.Size(40, 21);
			this.tex2.TabIndex = 12;
			this.tex2.TabStop = false;
			this.tex2.Text = "10";
			// 
			// label4
			// 
			this.label4.AutoSize = true;
			this.label4.Location = new System.Drawing.Point(8, 72);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(66, 17);
			this.label4.TabIndex = 11;
			this.label4.Text = "每人可借:";
			// 
			// label3
			// 
			this.label3.AutoSize = true;
			this.label3.Location = new System.Drawing.Point(120, 32);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(17, 17);
			this.label3.TabIndex = 10;
			this.label3.Text = "天";
			// 
			// tex1
			// 
			this.tex1.Location = new System.Drawing.Point(72, 32);
			this.tex1.Name = "tex1";
			this.tex1.Size = new System.Drawing.Size(40, 21);
			this.tex1.TabIndex = 9;
			this.tex1.TabStop = false;
			this.tex1.Text = "30";
			// 
			// label2
			// 
			this.label2.AutoSize = true;
			this.label2.Location = new System.Drawing.Point(8, 32);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(66, 17);
			this.label2.TabIndex = 0;
			this.label2.Text = "借书期限:";
			// 
			// groupBox4
			// 
			this.groupBox4.Controls.Add(this.button1);
			this.groupBox4.Controls.Add(this.button2);
			this.groupBox4.Location = new System.Drawing.Point(480, 168);
			this.groupBox4.Name = "groupBox4";
			this.groupBox4.Size = new System.Drawing.Size(152, 256);
			this.groupBox4.TabIndex = 20;
			this.groupBox4.TabStop = false;
			// 
			// borrowbook
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(648, 438);
			this.Controls.Add(this.groupBox4);
			this.Controls.Add(this.groupBox3);
			this.Controls.Add(this.groupBox2);
			this.Controls.Add(this.groupBox1);
			this.Name = "borrowbook";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "借书";
			this.Load += new System.EventHandler(this.borrowbook_Load);
			this.groupBox1.ResumeLayout(false);
			this.groupBox2.ResumeLayout(false);
			this.groupBox3.ResumeLayout(false);
			this.groupBox4.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion

	
    	private void texID1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if(e.KeyChar==13)
			{
				string[] s=new string[5];
				s=lc.selectreader("RID",texID1.Text);
				texN1.Text=s[1];   
				texS1.Text=s[2];
				texE1.Text=s[3];
				texBZ1.Text=s[4];
			}
		}

		private void texI1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if(e.KeyChar==13)
			{
				string[] s=new string[8];
				s=lc.selectbook("ISBN",texI1.Text);
				texBN1.Text=s[1];   
				texT1.Text=s[2];
				texPr1.Text=s[4];
				texA1.Text=s[5];
				texP1.Text=s[6];
				texBZ2.Text=s[7];
				texBD1.Text=DateTime.Now.ToLongDateString();
				texRD1.Text=DateTime.Now.Date.AddDays(Convert.ToInt16(i)).ToLongDateString();
			}
		}

		private void button2_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}

		private void button1_Click(object sender, System.EventArgs e)
		{
			int a=0;
			a=Convert.ToInt16(lc.Rcount(texID1.Text));
			if(a<Convert.ToInt16(j))
			{
				lc.borrowbook(texI1.Text,texID1.Text,Convert.ToDateTime(texBD1.Text),Convert.ToDateTime(texRD1.Text),texBZ1.Text);
			}
			else
			{
				MessageBox.Show("该读者已经借满了规定可以借的数量!","信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
			}
		}

		private void button3_Click(object sender, System.EventArgs e)
		{
            i=tex1.Text;
			j=tex2.Text;
			MessageBox.Show("设置成功!","信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
		}

		private void borrowbook_Load(object sender, System.EventArgs e)
		{
			i=tex1.Text;
			j=tex2.Text;
		}

	}
}

⌨️ 快捷键说明

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