private void butReport_Click(object sender, System.EventArgs e) { if (gridMain.Rows.Count < 1) { MessageBox.Show(Lan.g(this, "There are no Patients in the Recall table. Must have at least one to run report.")); return; } int[] PatNums; if (gridMain.SelectedIndices.Length < 1) { PatNums = new int[gridMain.Rows.Count]; for (int i = 0; i < PatNums.Length; i++) { PatNums[i] = PIn.PInt(table.Rows[i]["PatNum"].ToString()); //((RecallItem)gridMain.Rows[i].Tag).PatNum; } } else { PatNums = new int[gridMain.SelectedIndices.Length]; for (int i = 0; i < PatNums.Length; i++) { PatNums[i] = PIn.PInt(table.Rows[gridMain.SelectedIndices[i]]["PatNum"].ToString()); //((RecallItem)gridMain.Rows[gridMain.SelectedIndices[i]].Tag).PatNum; } } FormRpRecall FormRPR = new FormRpRecall(PatNums); FormRPR.ShowDialog(); }
private void butReport_Click(object sender, System.EventArgs e) { if(!Security.IsAuthorized(Permissions.UserQuery)) { return; } if(gridMain.Rows.Count < 1){ MessageBox.Show(Lan.g(this,"There are no Patients in the Recall table. Must have at least one to run report.")); return; } List<long> recallNums=new List<long>(); if(gridMain.SelectedIndices.Length < 1){ for(int i=0;i<gridMain.Rows.Count;i++){ recallNums.Add(PIn.Long(table.Rows[i]["RecallNum"].ToString())); } } else{ for(int i=0;i<gridMain.SelectedIndices.Length;i++){ recallNums.Add(PIn.Long(table.Rows[gridMain.SelectedIndices[i]]["RecallNum"].ToString())); } } FormRpRecall FormRPR=new FormRpRecall(recallNums); FormRPR.ShowDialog(); }