Example #1
0
        protected override DataTable UpdateData()
        {
            var UpdatedData = new DataTable();

            var data = new QuestionDataModel();

            UpdatedData = QuestionDataManager.Search(data, SessionVariables.RequestProfile).Clone();
            for (var i = 0; i < SelectedData.Rows.Count; i++)
            {
                data.QuestionId =
                    Convert.ToInt32(SelectedData.Rows[i][QuestionDataModel.DataColumns.QuestionId].ToString());
                data.QuestionPhrase     = SelectedData.Rows[i][QuestionDataModel.DataColumns.QuestionPhrase].ToString();
                data.QuestionCategoryId = Convert.ToInt32(SelectedData.Rows[i][QuestionDataModel.DataColumns.QuestionCategoryId].ToString());
                data.SortOrder          =
                    !string.IsNullOrEmpty(CheckAndGetRepeaterTextBoxValue(QuestionDataModel.DataColumns.SortOrder))
                    ? int.Parse(CheckAndGetRepeaterTextBoxValue(QuestionDataModel.DataColumns.SortOrder).ToString())
                    : int.Parse(SelectedData.Rows[i][QuestionDataModel.DataColumns.SortOrder].ToString());

                QuestionDataManager.Update(data, SessionVariables.RequestProfile);
                data            = new QuestionDataModel();
                data.QuestionId = Convert.ToInt32(SelectedData.Rows[i][QuestionDataModel.DataColumns.QuestionId].ToString());
                var dt = QuestionDataManager.Search(data, SessionVariables.RequestProfile);

                if (dt.Rows.Count == 1)
                {
                    UpdatedData.ImportRow(dt.Rows[0]);
                }
            }
            return(UpdatedData);
        }
Example #2
0
        private System.Data.DataTable GetData()
        {
            var data = new QuestionDataModel();

            var dt = QuestionDataManager.Search(data, SessionVariables.RequestProfile);

            return(dt);
        }
Example #3
0
        protected override DataTable GetEntityData(int?entityKey)
        {
            var questiondata = new QuestionDataModel();

            questiondata.QuestionId = entityKey;
            var results = QuestionDataManager.Search(questiondata, SessionVariables.RequestProfile);

            return(results);
        }
Example #4
0
        private DataTable GetQuestionData(int questionCategoryId)
        {
            var data = new QuestionDataModel();

            data.QuestionCategoryId = questionCategoryId;
            var dt       = QuestionDataManager.Search(data, SessionVariables.RequestProfile);
            var fdt      = QuestionDataManager.GetList(SessionVariables.RequestProfile);
            var resultdt = fdt.Clone();

            foreach (DataRow row in dt.Rows)
            {
                var rows = fdt.Select(QuestionDataModel.DataColumns.QuestionId + " = " + row[QuestionDataModel.DataColumns.QuestionId]);
                resultdt.ImportRow(rows[0]);
            }
            return(resultdt);
        }
Example #5
0
 private void ReBindEditableGrid()
 {
     var data       = new QuestionDataModel();
     var dtQuestion = QuestionDataManager.Search(data, SessionVariables.RequestProfile);
 }
Example #6
0
        protected override DataTable GetData()
        {
            var dt = QuestionDataManager.Search(oSearchFilter.SearchParameters, SessionVariables.RequestProfile);

            return(dt);
        }