BookManager/frmBorrower/frmBorrowerAdd.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Model;
using BLL;
namespace BookManager.frmBorrower
{
public partial class frmBorrowerAdd : Form
{
public frmBorrowerAdd()
{
InitializeComponent();
}
private void btnAdd_Click(object sender, EventArgs e)
{
Borrower borrower = new Borrower();
borrower.BorrowerId = txtBorrNo.Text;
borrower.BorrowerName = txtBorrName.Text;
if (radBoy.Checked)
{
borrower.BorrSex = radBoy.Text;
}
else {
borrower.BorrSex = radGirl.Text;
}
borrower.BookAccount = txtBookAccount.Text;
borrower.BorrWork = txtWork.Text;
borrower.CheckDate = checkDate.Value.ToShortDateString();
borrower.BorrAddress = txtAddress.Text;
borrower.BorrTel = txtTel.Text;
borrower.BorrRemark = txtRemark.Text;
BorrowerBLL borrBLL = new BorrowerBLL();
try
{
if (borrBLL.AddBorrower(borrower))
{
MessageBox.Show("借书证办理成功!", "借书证办理");
this.Dispose();
}
else
{
MessageBox.Show("借书证办理失败,请确认!", "借书证办理");
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Dispose();
后面还有 3 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。