コード例 #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();
     }
 }
コード例 #2
0
 private void dataGridViewManPower_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, 1, e.RowIndex, 0);
         vendorSearchForm.ShowDialog();
     }
     else if (e.ColumnIndex == 2 || e.ColumnIndex == 3)
     {
         LaborSearchForm laborSearchForm = new LaborSearchForm(this, 1, e.RowIndex, 2);
         laborSearchForm.ShowDialog();
     }
 }
コード例 #3
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();
     }
 }
コード例 #4
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();
     }
 }
コード例 #5
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            VendorSearchForm searchform = new VendorSearchForm(this);

            searchform.Show();
        }