private void btnPrint_Click(object sender, EventArgs e) { this.dgQuestionnaireItems.Rows.Clear(); int rowindex = this.dgQuestionnaires.CurrentCell.RowIndex; new dbModule().printQuestionnaire(Convert.ToInt32(this.dgQuestionnaires.Rows[rowindex].Cells[0].Value)); using (frmPrint print = new frmPrint()) { print.printQuestionnaire(); print.ShowDialog(); } }
private void btnPrint_Click(object sender, EventArgs e) { this.dgQuestionnaireItems.Rows.Clear(); int rowindex = this.dgQuestionnaires.CurrentCell.RowIndex; new dbModule().printQuestionnaire(Convert.ToInt32(this.dgQuestionnaires.Rows[rowindex].Cells[0].Value)); using (frmPrint print = new frmPrint()) { print.printQuestionnaire(); print.ShowDialog(); } new dbModule().questionnaireItemDG(this.dgQuestionnaireItems, "SELECT ROW_NUMBER() OVER(ORDER BY QtnrID) as Number, Question FROM vwQuestionnaireItems WHERE QtnrID = '" + Convert.ToString(this.dgQuestionnaires.Rows[rowindex].Cells[0].Value) + "'"); }