Esempio n. 1
0
        public Administrator(FrontPage frontPage)
        {
            InitializeComponent();

            this.frontPage = frontPage;

            sqlConnection = new SqlConnection();
            sqlConnection.ConnectionString = "Data Source=.; Initial Catalog=TelecommunicationManagementSystem; Integrated Security=true;";
            sqlConnection.Open();
        }
        private void buttonBackClient_Click(object sender, EventArgs e)
        {
            DialogResult result;

            result = MessageBox.Show("Unsaved changes will be lost. Do you want to continue?", "Confirmation Message.", MessageBoxButtons.YesNo);

            if (result == System.Windows.Forms.DialogResult.Yes)
            {
                if (frontPage != null)
                {
                    /*foreach (string s in frontPage.loginDetails)
                     * {
                     *  frontPage.loginDetails.Remove(s);
                     * }*/
                    FrontPage frontPage2 = new FrontPage();
                    frontPage2.Show();
                }
                this.Close();
            }
        }
        public Client(FrontPage frontPage)
        {
            InitializeComponent();

            this.frontPage = frontPage;
        }