Exemplo n.º 1
0
 private void dataGridViewMaterial_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     //e.ColumnIndex 0: 廠商編號
     //e.ColumnIndex 1: 廠商名稱
     //e.ColumnIndex 2: 材料編號
     //e.ColumnIndex 3: 材料名稱
     //e.ColumnIndex 4: 單位
     if (e.ColumnIndex == 0 || e.ColumnIndex == 1)
     {
         VendorSearchForm vendorSearchForm = new VendorSearchForm(this, 0, e.RowIndex, 0);
         vendorSearchForm.ShowDialog();
     }
     else if (e.ColumnIndex == 2 || e.ColumnIndex == 3 || e.ColumnIndex == 4)
     {
         MaterialSearchForm materialSearchForm = new MaterialSearchForm(this, e.RowIndex, 2);
         materialSearchForm.ShowDialog();
     }
 }
Exemplo n.º 2
0
        protected override void btnSearch_Click(object sender, EventArgs e)
        {
            MaterialSearchForm searchform = new MaterialSearchForm(this);

            searchform.ShowDialog();
        }