private void officer_back_btn_Click(object sender, EventArgs e)
        {
            _8_Officer_Functions f = new _8_Officer_Functions(label6.Text);

            this.Hide();
            f.Show();
        }
Пример #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            _8_Officer_Functions f = new _8_Officer_Functions(label4.Text);

            this.Hide();
            f.Show();
        }
Пример #3
0
        private void officer_login_btn_Click(object sender, EventArgs e)
        {
            XmlDocument doc = new XmlDocument();

            try
            {
                doc.Load("Officers.xml");
                XmlNodeList list = doc.GetElementsByTagName("Officer");
                for (int i = 0; i < list.Count; i++)
                {
                    XmlNodeList children = list[i].ChildNodes;

                    string id      = children[0].Name;
                    string idvalue = children[0].InnerText;

                    string username  = children[3].Name;
                    string uservalue = children[3].InnerText;

                    string password  = children[4].Name;
                    string passvalue = children[4].InnerText;
                    if (uservalue == officer_username_textBox.Text && passvalue == officer_password_textBox.Text)
                    {
                        _8_Officer_Functions f = new _8_Officer_Functions(officer_username_textBox.Text);
                        this.Hide();
                        f.Show();
                        break;
                    }
                }
            }
            catch (Exception)
            {
            }
        }