private void butReport_Click(object sender, System.EventArgs e) { if (table.Rows.Count == 0) { MessageBox.Show(Lan.g(this, "There are no appointments in the list. Must have at least one to run report.")); return; } int[] aptNums; if (grid.SelectedIndices.Length == 0) { aptNums = new int[table.Rows.Count]; for (int i = 0; i < aptNums.Length; i++) { aptNums[i] = PIn.PInt(table.Rows[i]["AptNum"].ToString()); } } else { aptNums = new int[grid.SelectedIndices.Length]; for (int i = 0; i < aptNums.Length; i++) { aptNums[i] = PIn.PInt(table.Rows[grid.SelectedIndices[i]]["AptNum"].ToString()); } } FormRpConfirm FormC = new FormRpConfirm(aptNums); FormC.ShowDialog(); }
private void butReport_Click(object sender, System.EventArgs e) { if(!Security.IsAuthorized(Permissions.UserQuery)) { return; } if(Table.Rows.Count==0){ MessageBox.Show(Lan.g(this,"There are no appointments in the list. Must have at least one to run report.")); return; } long[] aptNums; if(grid.SelectedIndices.Length==0){ aptNums=new long[Table.Rows.Count]; for(int i=0;i<aptNums.Length;i++){ aptNums[i]=PIn.Long(Table.Rows[i]["AptNum"].ToString()); } } else{ aptNums=new long[grid.SelectedIndices.Length]; for(int i=0;i<aptNums.Length;i++){ aptNums[i]=PIn.Long(Table.Rows[grid.SelectedIndices[i]]["AptNum"].ToString()); } } FormRpConfirm FormC=new FormRpConfirm(aptNums); FormC.ShowDialog(); }