Exemplo n.º 1
0
 public void InitPresenter(bool isPostBack)
 {
     AttachViewEvent();
     _View.ResultMessage   = string.Empty;
     _View.OperationType   = TrainFBQuesAndItemUtility._AddOperationTitle;
     _View.SetFormReadOnly = false;
     if (!isPostBack)
     {
         _View.FBQuestionMessage     = string.Empty;
         _View.FBQuesTypeMessage     = string.Empty;
         _View.FBQuestion            = string.Empty;
         _View.FBQuestionID          = string.Empty;
         _View.TrainFBQuesTypeSource = _ITrainFacade.GetTrainFBQuesTypeByCondition(-1, string.Empty);
         _View.FBItemList            = TrainFBQuesAndItemUtility.AddNullItem(new List <TrainFBItem>());
     }
 }
 public void InitPresenter(bool isPostBack)
 {
     AttachViewEvent();
     _View.ResultMessage   = string.Empty;
     _View.OperationType   = TrainFBQuesAndItemUtility._UpdateOperationTitle;
     _View.SetFormReadOnly = false;
     if (!isPostBack)
     {
         _View.FBQuestionMessage     = string.Empty;
         _View.FBQuesTypeMessage     = string.Empty;
         _View.TrainFBQuesTypeSource = _ITrainFacade.GetTrainFBQuesTypeByCondition(-1, string.Empty);
         TrainFBQuestion trainFBQuestion = _ITrainFacade.GetFBQuestionByID(_FBQuestionID);
         _View.FBQuestion      = trainFBQuestion.Description;
         _View.TrainFBQuesType = Convert.ToString(trainFBQuestion.TrainFBQuesType.ParameterID);
         if (trainFBQuestion.FBItems.Count != 0)
         {
             _View.FBItemList = trainFBQuestion.FBItems;
         }
         else
         {
             _View.FBItemList = TrainFBQuesAndItemUtility.AddNullItem(new List <TrainFBItem>());
         }
     }
 }