Example #1
0
        private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            User_Screen us = new User_Screen();

            string x = listBox1.SelectedItem.ToString();

            string[] selectedID = x.Split(' ');

            search_ID = selectedID[0];

            if (File.Exists(@"C:\Users\user\source\repos\hebBank\Customers\" + search_ID + ".txt"))
            {
                us.Show();
            }
            else if (!File.Exists(@"C:\Users\user\source\repos\hebBank\Customers\" + search_ID + ".txt"))
            {
                MessageBox.Show("File Not Found", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            User_Screen us = new User_Screen();
            Customers   cs = new Customers();

            search_ID = textBox1.Text;



            if (File.Exists(@"C:\Users\user\source\repos\hebBank\Customers\" + search_ID + ".txt"))
            {
                us.Show();
                textBox1.Text = "";
            }
            else if (!File.Exists(@"C:\Users\user\source\repos\hebBank\Customers\" + search_ID + ".txt"))
            {
                MessageBox.Show("File Not Found", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                textBox1.Text = "";
            }
        }