Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Epi.Core.ServiceClient.ServiceClient.IsValidOrganizationKeyEnum IsValidOKey = Epi.Core.ServiceClient.ServiceClient.IsValidOrganizationKeyEnum.No;
            IsValidOKey = Epi.Core.ServiceClient.ServiceClient.IsValidOrgKey(tbOrgKey.Text.ToString(), this._SurveyId);

            //this.DialogResult = DialogResult.OK;
            switch (IsValidOKey)
            {
            case Epi.Core.ServiceClient.ServiceClient.IsValidOrganizationKeyEnum.No:
                pnlError.Visible      = true;
                pnlOrgKey.Visible     = true;
                pnlSuccess.Visible    = false;
                pnlSuccessMsg.Visible = false;
                break;

            case Epi.Core.ServiceClient.ServiceClient.IsValidOrganizationKeyEnum.EndPointNotFound:
                pnlError.Visible      = true;
                pnlOrgKey.Visible     = true;
                pnlSuccess.Visible    = false;
                pnlSuccessMsg.Visible = false;
                WebSurveyOptions wso = new WebSurveyOptions();
                wso.Show();
                break;

            case Epi.Core.ServiceClient.ServiceClient.IsValidOrganizationKeyEnum.GeneralException:
                pnlError.Visible      = true;
                pnlOrgKey.Visible     = true;
                pnlSuccess.Visible    = false;
                pnlSuccessMsg.Visible = false;
                break;

            case Epi.Core.ServiceClient.ServiceClient.IsValidOrganizationKeyEnum.Yes:
                this._OrgKey                = tbOrgKey.Text.ToString();
                pnlError.Visible            = false;
                pnlOrgKey.Visible           = false;
                pnlSuccess.Visible          = true;
                pnlSuccessMsg.Visible       = true;
                this.Text                   = "Success";
                this.DialogPromptLabel.Text = _Dialogprompt;
                // lblSuccess.Text = " Your survey has been published successfully!";
                lblSuccess.Text = this._SuccessMessage;
                if (!this._ShowSuccessMessage)
                {
                    this.DialogResult = DialogResult.OK;
                }
                break;
            }
        }
Exemplo n.º 2
0
 private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     WebSurveyOptions wso = new WebSurveyOptions();
     wso.Show();
 }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            //tbOrgKey
            Epi.Windows.MakeView.Utils.ServiceClient.IsValidOrganizationKeyEnum IsValidOKey = Epi.Windows.MakeView.Utils.ServiceClient.IsValidOrganizationKeyEnum.No;
            IsValidOKey = Epi.Windows.MakeView.Utils.ServiceClient.IsValidOrgKey(tbOrgKey.Text.ToString(), this._SurveyId);

            //this.DialogResult = DialogResult.OK;
            switch(IsValidOKey)
            {
                case Epi.Windows.MakeView.Utils.ServiceClient.IsValidOrganizationKeyEnum.No:
                    pnlError.Visible = true;
                    pnlOrgKey.Visible = true;
                    pnlSuccess.Visible = false;
                    pnlSuccessMsg.Visible = false;
                    break;
                case Epi.Windows.MakeView.Utils.ServiceClient.IsValidOrganizationKeyEnum.EndPointNotFound:
                    pnlError.Visible = true;
                    pnlOrgKey.Visible = true;
                    pnlSuccess.Visible = false;
                    pnlSuccessMsg.Visible = false;
                    WebSurveyOptions wso = new WebSurveyOptions();
                    wso.Show();
                    break;
                case Epi.Windows.MakeView.Utils.ServiceClient.IsValidOrganizationKeyEnum.GeneralException:
                    pnlError.Visible = true;
                    pnlOrgKey.Visible = true;
                    pnlSuccess.Visible = false;
                    pnlSuccessMsg.Visible = false;
                    break;
                case Epi.Windows.MakeView.Utils.ServiceClient.IsValidOrganizationKeyEnum.Yes:
                    this._OrgKey = tbOrgKey.Text.ToString();
                    pnlError.Visible = false;
                    pnlOrgKey.Visible = false;
                    pnlSuccess.Visible = true;
                    pnlSuccessMsg.Visible = true;
                    this.Text = "Success";
                    this.DialogPromptLabel.Text = _Dialogprompt;
                   // lblSuccess.Text = " Your survey has been published successfully!";
                    lblSuccess.Text = this._SuccessMessage;
                    if(!this._ShowSuccessMessage)
                    {
                        this.DialogResult = DialogResult.OK;
                    }
                break;
            }
        }