/*This is for frmlog * private void btlogin_Click(object sender, EventArgs e) * { * bool login = false; * * //try your login here * //and then when it success update login variable as true * * if(login == true){ * * this.Close(); //close the frmlog * frmPOS.ActiveForm.Opacity = 100; // show the form * * }else{ * //inform user about failed login * } * } */ private void btnNewEmployee_Click(object sender, EventArgs e) { frmNewEmployee newEmp = new frmNewEmployee(); newEmp.Show(); /* * try * { * FileStream inFile = new FileStream("Employees.txt", FileMode.Open); * * StreamReader sReader = new StreamReader(inFile); * * Employee tempEmp = new Employee(); * * string line; * //priming read * line = sReader.ReadLine(); * * string[] fields = new string[7]; * char[] sep = new char[1]; * sep[0] = ','; * * while (line != null) * { * tempEmp = new Employee(); * * fields = line.Split(sep); * tempEmp.FirstName = fields[0]; * tempEmp.LastName = fields[1]; * tempEmp.EmpManager = Convert.ToBoolean(fields[2]); * tempEmp.EmpFullTime = Convert.ToBoolean(fields[3]); * tempEmp.EmpSales = Convert.ToBoolean(fields[4]); * tempEmp.EmpSales = Convert.ToBoolean(fields[5]); * tempEmp.Wages = Convert.ToDouble(fields[6]); * * myEmpList.Add(tempEmp); * * line = sReader.ReadLine(); * } * sReader.Close(); * inFile.Close(); * * } * catch (FileNotFoundException) { } *///this was experimenting to see if reading would work }
private void btnNewEmployee_Click(object sender, EventArgs e) { frmNewEmployee newEmp = new frmNewEmployee(); newEmp.Show(); }