Difference between revisions of "VN3056REP - Same business logic as View Report for View Cross function from Questionnaire list"

From Catglobe Wiki
Jump to: navigation, search
(Design detail)
(Design detail)
Line 26: Line 26:
 
:* The Page_Load event:
 
:* The Page_Load event:
  
[[Image:FLPageLoadMethod.PNG]]
+
[[Image:3056_FLPageLoadMethod.PNG]]
  
 
: Create default data cache
 
: Create default data cache
Line 36: Line 36:
 
:* The Button Ok clicked event:
 
:* The Button Ok clicked event:
  
[[Image:FLButtonOkClicked.PNG]]
+
[[Image:3056_FLButtonOkClicked.png]]
  
 
: Re-setup data cache:
 
: Re-setup data cache:

Revision as of 09:34, 1 April 2010

Introduction

ViewCrossFunction.PNG

The current process of "View cross" function in Questionnaire list:

  • Create / Rebuild the default data cache of selected questionnaire.
  • Check if the data cache has any axises, if yes redirect to a "nearly" cross viewer page, if no, just render an error message.

Disadvantage:

  • The data cache is always rebuilt if there is a change in data of questionnaire.
  • If the questionnaire template of questionnaire is changed, it is too difficult to re-setup the data cache.

Design decisions

When "View Cross" function of Questionnaire list is clicked:

  • If this is the first time that this function is used for selected questionnaire, create a data cache and redirect to cross viewer page.
  • If not, use the same business logic as "View Report" function, show the below dialog

ViewCrossDialog.PNG

  • If option 1 is selected, data cache will be re-setup, rebuild, and then show the cross viewer page.
  • If option 2 is selected, just show the cross viewer page with the old data cache.

Design detail

  • Re-make a new "Regenerate instant cross" dialog as above.
  • There are two main processes for this dialog:
  • The Page_Load event:

3056 FLPageLoadMethod.PNG

Create default data cache
// QuestionnaireObject is a selected Questionnaire
QuestionnaireCacheSpecification qcsObject = DiagramUtilities.CreateNewDCSByQuestionnaire(QuestionnaireObject);
  • The Button Ok clicked event:

3056 FLButtonOkClicked.png

Re-setup data cache:
// qcs is a questionnaire cache specification object
var generator = new GenerateInstantReport();
List<DataColumn> datacolumns = qcs.QuestionnaireSelection.GetDataColumns();
generator.RemoveBrTagFromQuestionAndSubQuestion(datacolumns);
qcs.AxisSet = qcs.CreateDefaultAxisSet();
qcs.Save();
Rebuild data cache:
// qcsObject is a questionnaire cache specification object
DataCacheManager.Instance.BuildDCSIfNeeded(qcsObject, true, false);

Document revisions

Version No. Date Changed By Description Svn revision
0.1 23.03.2010 Trần Nguyễn Thanh Tùng Technical design NA