Example #1
0
 private void dataGridViewOutsourcing_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, 3, e.RowIndex, 0);
         vendorSearchForm.ShowDialog();
     }
     else if (e.ColumnIndex == 2 || e.ColumnIndex == 3 || e.ColumnIndex == 4)
     {
         ProcessCodeSearchForm processCodeSearchForm = new ProcessCodeSearchForm(this, 3, e.RowIndex, 2);
         processCodeSearchForm.ShowDialog();
     }
 }
        protected override void btnSearch_Click(object sender, EventArgs e)
        {
            ProcessCodeSearchForm searchform = new ProcessCodeSearchForm(this);

            searchform.ShowDialog();
        }