📄 供应商信息.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace BookStore.Forms
{
public partial class SuppliersInfo : Form
{
DataSet ds = new DataSet();
string select = "select * from Suppliers";
public SuppliersInfo()
{
InitializeComponent();
ds = DataAccess.Narnu.GetDataSetBySqlString(select);
this.dg_SuppliersInfo.DataSource = ds.Tables[0];
}
//----------其他窗体调用,双击选择供应商信息并回送到调用的窗体-------------
private void dg_SuppliersInfo_MouseDoubleClick(object sender, MouseEventArgs e)
{
if (this.dg_SuppliersInfo.ReadOnly == true)
{
int intCurrentRowNumber = this.dg_SuppliersInfo.CurrentCell.RowNumber;//当前单元格的行数
string SendStockID, SendStockName;
SendStockID = this.dg_SuppliersInfo[intCurrentRowNumber, 0].ToString().Trim();
SendStockName = this.dg_SuppliersInfo[intCurrentRowNumber, 1].ToString().Trim();
string[] sendArry = new string[] { SendStockID, SendStockName };
StockTable.supplierArray[0] = sendArry[0];
StockTable.supplierArray[1] = sendArry[1];
this.Close();
}
}
public void DataGridReadOnly()
{
this.dg_SuppliersInfo.ReadOnly = true;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -