⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 供应商信息.cs

📁 进存销系统..适合书店的进销存..功能可以满足一般的需求.很简单
💻 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 + -