Example #1
0
        public Form1()
        {
            InitializeComponent();
            myDatabase = new CustomerDatabase();

            if (!Directory.Exists(initdir))
            {
                Directory.CreateDirectory(initdir);
            }

            if (File.Exists(selLangPath))
            {
                StreamReader sr = new StreamReader(selLangPath);
                selLang = sr.ReadLine();
                sr.Close();
            }


            myDatabase.ReadPassword(passwordPath);
            myDatabase.readStoredData(path);



            comboBox1.Items.Add("English");
            comboBox1.Items.Add("Deutsch");
            comboBox1.SelectedItem = selLang;
            this.Text = "Start";
        }
        //private string path = @"CustomerData.crypt";
        //private string passwordPath = @"init\passwordFile.crypt";
        //private string selLangPath = @"init\languageFile.lng";
        //private string initdir = @"init";

        public FormChangeAttr()
        {
            InitializeComponent();
            myDatabase1 = new CustomerDatabase();
            myDatabase1.ReadPassword(passwordPath);
            myDatabase1.readStoredData(path);
        }
Example #3
0
 public Form1()
 {
     InitializeComponent();
     myDatabase = new CustomerDatabase();
     myDatabase.readStoredData();
     comboBox1.Items.Add("English");
     comboBox1.Items.Add("German");
 }
Example #4
0
        public FormMenu()
        {
            InitializeComponent();
            myDatabase = new CustomerDatabase();
            myDatabase.readStoredData();

            dataGridView2.Columns.Add("1", "Customer ID");
            dataGridView2.Columns.Add("2", "First Name");
            dataGridView2.Columns.Add("3", "Last Name");
            dataGridView2.Columns.Add("4", "E-Mail");
            dataGridView2.Columns.Add("5", "Account balance");
            dataGridView2.Columns.Add("6", "Last change");
        }
Example #5
0
        //private string path = @"CustomerData.crypt";
        //public string passwordPath = @"init\passwordFile.crypt";
        //private string selLangPath = @"init\languageFile.lng";
        //private string initdir = @"init";


        public FormMenu()
        {
            InitializeComponent();
            myDatabase = new CustomerDatabase();
            myDatabase.ReadPassword(passwordPath);
            myDatabase.readStoredData(path);

            dataGridView2.Columns.Add("1", "Customer ID");
            dataGridView2.Columns.Add("2", "First Name");
            dataGridView2.Columns.Add("3", "Last Name");
            dataGridView2.Columns.Add("4", "E-Mail");
            dataGridView2.Columns.Add("5", "Account balance");
            dataGridView2.Columns.Add("6", "Last change");
            // btnFindPers.Enabled = false;
        }
Example #6
0
        private void btnshowall_Click(object sender, EventArgs e)
        {
            //string colname = "1";
            //string header = "Header";

            dataGridView2.Rows.Clear();
            myDatabase = new CustomerDatabase();
            myDatabase.readStoredData();
            foreach (Customer customer in myDatabase.Customers)
            {
                this.dataGridView2.Rows.Add(

                    customer.CustomerID, customer.FirstName, customer.LastName, customer.Email, customer.AccountBalance, customer.LastChange

                    );
            }
        }
Example #7
0
        private void btnshowall_Click(object sender, EventArgs e)
        {
            dataGridView2.Rows.Clear();
            myDatabase = new CustomerDatabase();
            myDatabase.ReadPassword(passwordPath);
            myDatabase.readStoredData(path);

            foreach (Customer customer in myDatabase.Customers)
            {
                dataGridView2.Rows.Add(
                    customer.CustomerID,
                    customer.FirstName,
                    customer.LastName,
                    customer.Email,
                    customer.AccountBalance,
                    customer.LastChange);
            }
        }
Example #8
0
 public FormAddPerson()
 {
     InitializeComponent();
     myDatabase1 = new CustomerDatabase();
     myDatabase1.readStoredData();
 }
Example #9
0
 //private string path = @"CustomerData.crypt";
 //private string passwordPath = @"init\passwordFile.crypt";
 //private string selLangPath = @"init\languageFile.lng";
 //private string initdir = @"init";
 public FormOptions()
 {
     InitializeComponent();
     myDatabase = new CustomerDatabase();
     myDatabase.ReadPassword(passwordPath);
 }
Example #10
0
 public FormChangeAttr()
 {
     InitializeComponent();
     myDatabase1 = new CustomerDatabase();
     myDatabase1.readStoredData();
 }
 public FormMoneyInOut()
 {
     InitializeComponent();
     myDatabase1 = new CustomerDatabase();
     myDatabase1.readStoredData();
 }