public QuestionnaireDetails(ClientCredentials clientCredentials, Questionnaire questionnaire)
        {
            InitializeComponent();
            questionnaireSecureService = new QuestionnaireSecureServiceClient();
            questionnaireSecureService.ClientCredentials.UserName.UserName = clientCredentials.UserName.UserName;
            questionnaireSecureService.ClientCredentials.UserName.Password = clientCredentials.UserName.Password;

            this.SelectedQuestionnaire = questionnaire;
            FillData(SelectedQuestionnaire);
            BlockAllDataValues();

            EditButton.IsEnabled = true;
            DeleteButton.IsEnabled = true;

            IsNewObject = false;
        }
        public QuestionnaireDetails(ClientCredentials clientCredentials)
        {
            InitializeComponent();
            questionnaireSecureService = new QuestionnaireSecureServiceClient();
            questionnaireSecureService.ClientCredentials.UserName.UserName = clientCredentials.UserName.UserName;
            questionnaireSecureService.ClientCredentials.UserName.Password = clientCredentials.UserName.Password;

            SelectedQuestionnaire = new Questionnaire();
            StartCalendar.SelectedDate = DateTime.Now;
            EndCalendar.SelectedDate = DateTime.Now.AddDays(7);
            UnlockAllDataValues();

            SaveButton.IsEnabled = true;

            IsNewObject = true;
        }