📄 frmbuyerinfo.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Hotel.Operation;
namespace Hotel.UI
{
public partial class frmBuyerInfo : Form
{
BuyerInfoAccess obj = new BuyerInfoAccess();
public frmBuyerInfo()
{
InitializeComponent();
}
private void frmBuyerInfo_Load(object sender, EventArgs e)
{
obj.GetBuyerInfo(lstShow);
}
private void btnSelect_Click(object sender, EventArgs e)
{
if (this.txtContent.Text == "")
{
MessageBox.Show("请输入您所要查询的信息!", "提示");
return;
}
try
{
if (this.cboSelect.SelectedItem.ToString() == "客户编号")
{
obj.GetBuyerInfo(lstShow, Convert.ToInt32(this.txtContent.Text));
if (this.lstShow.Items.Count == 0)
{
MessageBox.Show("没有您查找的信息,请重新输入!", "提示");
}
}
}
catch
{
MessageBox.Show("查询失败,请重新输入!", "提示");
this.txtContent.Clear();
this.txtContent.Focus();
}
if (this.cboSelect.SelectedItem.ToString() == "客户姓名")
{
obj.GetBuyerInfo(lstShow, this.txtContent.Text);
if (this.lstShow.Items.Count == 0)
{
MessageBox.Show("没有您查找的信息,请重新输入!", "提示");
}
}
}
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}
private void txtContent_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)13)
{
btnSelect_Click(sender, e);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -