Example #1
0
        private void label7_Click(object sender, EventArgs e)
        {
            Employee_List E = new Employee_List(ps);

            E.FuncProfession("Manager");
            E.Show();
            this.Dispose();
        }
        private void label3_Click(object sender, EventArgs e)
        {
            Employee_List E2 = new Employee_List(ps);

            E2.FuncProfession("Admin");
            E2.Show();
            this.Hide();
        }
Example #3
0
        public void AddEmployee(string ename, string contact, string email, string role, int esalary, int workingHour, string offday, Employee_List E)
        {
            if (ename.Equals("") || role.Equals("") || esalary.Equals("") || workingHour.Equals(""))
            {
                E.ErrorMassage("Fill all the entries correctly");
            }

            else
            {
                NAME = ename; EMAIL = email; CONTACT = contact; SALARY = esalary; ROLE = role; HOUR = workingHour; OFF = offday;
                new DataAccess().NewEmployee(ename, contact, email, role, esalary, workingHour, offday, E);
            }
        }
Example #4
0
        public void NewEmployee(string ename, string contact, string email, string role, float esalary, int workingHour, string offday, Employee_List E)
        {
            MydbDataContext cntx = new MydbDataContext(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\Oyan Computer\Desktop\Project\Project\Forms\Mydb.mdf;Integrated Security=True");
            Employee        em   = new Employee();


            cntx.Employees.InsertOnSubmit(em);

            em.Name = ename; em.Email = email; em.Role = role; em.Salary = esalary; em.WorkingHour = workingHour; em.OffDay = offday;
        }