// 事件:“选择入库单按钮”点击事件,记录入库单信息,并关闭窗体
        private void btnSelectInStock_Click(object sender, EventArgs e)
        {
            FrmSparePartInStock frm = new FrmSparePartInStock();

            frm.HideButtons();


            if (frm.ShowDialog() == DialogResult.OK)
            {
                tbInStockId.Text         = frm.sparePartInStock.Id.ToString();
                dtpInStockDate.Value     = frm.sparePartInStock.StockDate;
                tbStockMan.Text          = frm.sparePartInStock.StockMan;
                cbProvider.SelectedValue = frm.sparePartInStock.PiId;
                tbInvoiceNo.Text         = frm.sparePartInStock.InvoiceNo;
                tbInStockRemark.Text     = frm.sparePartInStock.Remark;

                //“设备信息明细”DataGridView数据源绑定
                dgvDetail.DataSource                   = sparePartInStockDB.GetSparePartInStockDetail(frm.sparePartInStock.Id);
                dgvDetail.Columns["id"].Visible        = false;
                dgvDetail.Columns["spaId"].Visible     = false;
                dgvDetail.Columns["spbiId"].Visible    = false;
                dgvDetail.Columns["inputDate"].Visible = false;
                dgvDetail.Columns["inputMan"].Visible  = false;
            }
        }
Exemple #2
0
        private void MISparePartAdd_Click(object sender, EventArgs e)
        {
            equipment.FrmSparePartInStock frm = new equipment.FrmSparePartInStock();

            FormTools formTools = new FormTools();

            formTools.showFrom(this, frm);
        }