frmbuyerinfo.cs
来自「酒店管理系统,您酒店物业管理的好帮手」· CS 代码 · 共 77 行
CS
77 行
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 + =
减小字号Ctrl + -
显示快捷键?