private DataTable GetAssociatedQuestionCategorys(int questionId) { QuestionDataModel data = new QuestionDataModel(); data.QuestionId = questionId; var dt = QuestionDataManager.GetDetails(data, SessionVariables.RequestProfile); return(dt); }
private DataTable GetQuestionCategoryData(int questionId) { //var dt = QuestionCategoryDataManager.GetByQuestion(QuestionId, SessionVariables.RequestProfile); QuestionDataModel data = new QuestionDataModel(); data.QuestionId = questionId; var dt = QuestionDataManager.GetDetails(data, SessionVariables.RequestProfile); var fdt = QuestionCategoryDataManager.GetList(SessionVariables.RequestProfile); var resultdt = fdt.Clone(); foreach (DataRow row in dt.Rows) { var rows = fdt.Select("QuestionCategoryId = " + row[QuestionCategoryDataModel.DataColumns.QuestionCategoryId]); resultdt.ImportRow(rows[0]); } return(resultdt); }
protected override DataTable GetData() { try { SuperKey = ApplicationCommon.GetSuperKey(); SetId = ApplicationCommon.GetSetId(); var selectedrows = new DataTable(); var questiondata = new QuestionDataModel(); selectedrows = QuestionDataManager.GetDetails(questiondata, SessionVariables.RequestProfile).Clone(); if (!string.IsNullOrEmpty(SuperKey)) { var systemEntityTypeId = (int)PrimaryEntity; var lstEntityKeys = ApplicationCommon.GetSuperKeyDetails(systemEntityTypeId, SuperKey); foreach (var entityKey in lstEntityKeys) { questiondata.QuestionId = entityKey; var result = QuestionDataManager.GetDetails(questiondata, SessionVariables.RequestProfile); selectedrows.ImportRow(result.Rows[0]); } } else { questiondata.QuestionId = SetId; var result = QuestionDataManager.GetDetails(questiondata, SessionVariables.RequestProfile); selectedrows.ImportRow(result.Rows[0]); } return(selectedrows); } catch (Exception ex) { Response.Write(ex.Message); } return(null); }