Exemplo n.º 1
0
 private void dataGridViewTool_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     //e.ColumnIndex 0: 廠商編號
     //e.ColumnIndex 1: 廠商名稱
     //e.ColumnIndex 2: 機具編號
     //e.ColumnIndex 3: 機具名稱
     if (e.ColumnIndex == 0 || e.ColumnIndex == 1)
     {
         VendorSearchForm vendorSearchForm = new VendorSearchForm(this, 2, e.RowIndex, 0);
         vendorSearchForm.ShowDialog();
     }
     else if (e.ColumnIndex == 2 || e.ColumnIndex == 3)
     {
         ToolSearchForm toolSearchForm = new ToolSearchForm(this, 2, e.RowIndex, 2);
         toolSearchForm.ShowDialog();
     }
 }
        protected override void btnSearch_Click(object sender, EventArgs e)
        {
            ToolSearchForm searchform = new ToolSearchForm(this);

            searchform.ShowDialog();
        }