Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         txtDomain.Text     = WebConfig.DomainName();
         LabelAppName.Text  = WebConfig.AppName();
         HostName.InnerText = System.Net.Dns.GetHostName();
         if (User.Identity.Name == "")
         {
             txtUserName.Text = "mif";
         }
         else
         {
             txtUserName.Text = User.Identity.Name;
         }
         txtUserName.Focus();
         if (DBConnection.CurrentDB != "Live")
         {
             LabelTrain.Text    = DBConnection.CurrentDB;
             LabelTrain.Visible = true;
         }
         string authenticationMethod = WebConfig.getValuebyKey("AuthenticateMethod");
         if (authenticationMethod == "NameOnly")
         {
             rfPassword.Enabled = false;
         }
     }
 }
Beispiel #2
0
        public string AppNameTest()
        {
            string result = WebConfig.AppName();

            return(result);
            // TODO: add assertions to method WebConfigTest.AppNameTest()
        }