private void menuProdInc_Click(object sender, EventArgs e) { List <CentralConnection> listSelectedConn = new List <CentralConnection>(); for (int i = 0; i < gridMain.SelectedIndices.Length; i++) { listSelectedConn.Add((CentralConnection)gridMain.Rows[gridMain.SelectedIndices[i]].Tag); //The tag of this grid is the CentralConnection object } if (listSelectedConn.Count == 0) { MsgBox.Show(this, "Please select at least one connection to run this report against."); return; } FormCentralProdInc FormCPI = new FormCentralProdInc(); FormCPI.ConnList = listSelectedConn; FormCPI.EncryptionKey = EncryptionKey; FormCPI.ShowDialog(); }
private void menuProdInc_Click(object sender,EventArgs e) { List<CentralConnection> listSelectedConn=new List<CentralConnection>(); for(int i=0;i<gridMain.SelectedIndices.Length;i++) { listSelectedConn.Add((CentralConnection)gridMain.Rows[gridMain.SelectedIndices[i]].Tag);//The tag of this grid is the CentralConnection object } if(listSelectedConn.Count==0) { MsgBox.Show(this,"Please select at least one connection to run this report against."); return; } FormCentralProdInc FormCPI=new FormCentralProdInc(); FormCPI.ConnList=listSelectedConn; FormCPI.EncryptionKey=EncryptionKey; FormCPI.ShowDialog(); GetConfigAndConnect();//Set the connection settings back to the central manager db. }