示例#1
0
        private void SelectServerButton_Click(object sender, EventArgs e)
        {
            try
            {
                var endpoint = new SelectServerDialog().ShowDialog(this, m_endpoints, m_lds, m_gds, m_filters);

                if (endpoint != null)
                {
                    SetServer(endpoint);
                    RegistrationPanel.Initialize(m_gds, m_server, endpoint, m_configuration);
                    SelectGdsButton.Visible = true;
                    return;
                }
            }
            catch (Exception ex)
            {
                Opc.Ua.Client.Controls.ExceptionDlg.Show(Text, ex);
            }
        }
示例#2
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            sql = "select * from Accounts where username=@un and Password=@up";
            cmd = new SqlCommand(sql, con);
            cmd.Parameters.AddWithValue("@un", textBox5.Text);
            cmd.Parameters.AddWithValue("@up", textBox6.Text);
            con.Open();
            SqlDataReader sqlread = cmd.ExecuteReader();

            while (sqlread.Read())
            {
                if (textBox5.Text == sqlread.GetValue(1).ToString() && textBox6.Text == sqlread.GetValue(2).ToString())
                {
                    name = sqlread.GetValue(3).ToString();
                    tabControl1.Show();
                    loginPanel.Hide();
                    RegistrationPanel.Hide();
                }
            }
            con.Close();
        }
示例#3
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            if (!Page.IsValid)
            {
                return;
            }

            if (!Request.IsAuthenticated)
            {
                return;
            }

            if (AccountInformation.Visible)
            {
                var contactAccount = Contact.contact_customer_accounts;

                SaveAccountDetails(XrmContext.AccountSet.FirstOrDefault(a => a.AccountId == contactAccount.AccountId));
            }

            if (SelfInformation.Visible)
            {
                var contact = XrmContext.MergeClone(Contact);

                SetContactDetails(contact);

                XrmContext.UpdateObject(contact);

                ManageLists(XrmContext, contact);

                XrmContext.SaveChanges();
            }

            var snippet = RegistrationPanel.FindControl("ProfileUpdatedMsg");

            if (snippet != null)
            {
                snippet.Visible = true;
            }
        }
示例#4
0
 private void button3_Click_1(object sender, EventArgs e)
 {
     loginPanel.Hide();
     RegistrationPanel.Show();
 }
示例#5
0
        public void checkHouseNumberIsDigit()
        {
            var registration = new RegistrationPanel();

            Assert.IsFalse(registration.checkCorrectness("Jadwiga", "Hymel", "Lipinki Lozyckie", "Laczna", "aaa", "1", "*****@*****.**", "123456", "123456"));
        }
示例#6
0
        public void checkAddressExisting()
        {
            var registration = new RegistrationPanel();

            Assert.IsFalse(registration.checkCorrectness("Jadwiga", "Hymel", "Lipinki Lozyckie", "", "43", "1", "*****@*****.**", "123456", "123456"));
        }
示例#7
0
        public void checkCityExisting()
        {
            var registration = new RegistrationPanel();

            Assert.IsFalse(registration.checkCorrectness("Jadwiga", "Hymel", "", "Laczna", "43", "1", "*****@*****.**", "123456", "123456"));
        }
示例#8
0
        public void checkLastNameIsNotDigit()
        {
            var registration = new RegistrationPanel();

            Assert.IsFalse(registration.checkCorrectness("Jadwiga", "Hymel2", "Lipinki Lozyckie", "Laczna", "43", "1", "*****@*****.**", "123456", "123456"));
        }
示例#9
0
        public void checkDataValidation_IncorrectEmail2()
        {
            var registration = new RegistrationPanel();

            Assert.IsFalse(registration.checkCorrectness("Jadwiga", "Hymel", "Lipinki Lozyckie", "Laczna", "43", "1", "aaa@bbbcom", "12345678", "12345678"));
        }
示例#10
0
        public void checkDataValidation_TooShortPassword()
        {
            var registration = new RegistrationPanel();

            Assert.IsFalse(registration.checkCorrectness("Jadwiga", "Hymel", "Lipinki Lozyckie", "Laczna", "43", "1", "*****@*****.**", "12345", "12345"));
        }
示例#11
0
        public void checkDataValidation()
        {
            var registration = new RegistrationPanel();

            Assert.IsTrue(registration.checkCorrectness("Jadwiga", "Hymel", "Lipinki Lozyckie", "Laczna", "43", "1", "*****@*****.**", "1234567", "1234567"));
        }
示例#12
0
        public void checkApartnumberExisting()
        {
            var registration = new RegistrationPanel();

            Assert.IsTrue(registration.checkCorrectness("Jadwiga", "Hymel", "Lipinki Lozyckie", "Laczna", "43", "", "*****@*****.**", "123456", "123456"));
        }
 public PopUpFrame()
 {
     InitializeComponent();
     SwitchGrid.Children.Add(registrationPanel = new RegistrationPanel(SwitchGrid));
 }