Exemplo n.º 1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            this.Authenticated = true;
            if (radDev.Checked)
            {
                MetriconCommon.Environment = "DEV";
                SQSAdmin_WpfCustomControlLibrary.CommonVariables.Environment = "DEV";
            }
            else if (radTest.Checked)
            {
                MetriconCommon.Environment = "STG";
                SQSAdmin_WpfCustomControlLibrary.CommonVariables.Environment = "STG";
            }
            else
            {
                MetriconCommon.Environment = "LIVE";
                SQSAdmin_WpfCustomControlLibrary.CommonVariables.Environment = "LIVE";
            }

            MetriconCommon.State         = cmbState.SelectedValue.ToString();
            MetriconCommon.UserState     = cmbState.SelectedValue.ToString();
            MetriconCommon.UserStateName = cmbState.Text;

            MetriconCommon.WindowTitleInfo = "Logged in as " + MetriconCommon.UserName + " Using " + cmbState.Text + " " + MetriconCommon.Environment + " environment";


            SQSAdmin_WpfCustomControlLibrary.CommonVariables.UserCode        = ((DataRowView)comboBox1.SelectedItem)["AdministratorID"].ToString();
            SQSAdmin_WpfCustomControlLibrary.CommonVariables.WcfEndpoint     = MetriconCommon.getWcfEndpoint();
            SQSAdmin_WpfCustomControlLibrary.CommonVariables.WindowTitleInfo = MetriconCommon.WindowTitleInfo;
            this.Close();
        }