Exemplo n.º 1
0
        private void EmployeeLogoutButton_Click(object sender, EventArgs e)
        {
            DateTime     time = DateTime.Now;
            FileStream   fs   = new FileStream("BankLogFile.txt", FileMode.Append);
            StreamWriter Sr   = new StreamWriter(fs);

            Sr.WriteLine(time + " Employee Of ID" + EmployeeLoginForm.ID + " has logged out");
            Sr.Close();
            fs.Close();

            // Return To (  StartForm) && Hide this Form (EmployeeOperation Form )
            StartForm returntoStartForm = new StartForm();

            this.Hide();
            returntoStartForm.ShowDialog();
        }
        private void ManagerLogoutButton_Click(object sender, EventArgs e)
        {
            StartForm returnForm = new StartForm();


            // Save Action At LogFile
            DateTime     time = DateTime.Now;
            FileStream   fs   = new FileStream("BankLogFile.txt", FileMode.Append);
            StreamWriter Sr   = new StreamWriter(fs);

            Sr.WriteLine(time + " Manager Of Bank has logged out");
            Sr.Close();
            fs.Close();

            //  Return to (Start Form ) &&  Hide this form (ManagerOperationsForm)
            this.Hide();
            returnForm.ShowDialog();
        }