📄 frmlistfind.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using HotelManageDBL;
using HotelManageMDL;
namespace HotelManager
{
public partial class frmListFind : Form
{
public frmListFind()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
RoomDestine rd = new RoomDestine();
RoomDestineDB rdDB = new RoomDestineDB();
DataSet ds = new DataSet();
int id= int.Parse(txtListNum.Text);
if (id ==-1)
{
MessageBox.Show("订单号不能为空,请重新输入!", "友情提醒", MessageBoxButtons.OK, MessageBoxIcon.None);
return;
}
else
{
try
{
ds = rdDB.SelectByListID(id);
if (ds != null)
{
dataGridView1.DataSource = ds.Tables[0];
this.pictureBox1.Visible = false;
}
else
{
MessageBox.Show("你输入订单好不存在,请确认!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
catch (Exception ex)
{ MessageBox.Show(ex.Message); }
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -