public void AddTitle(int employee_no, string employee_title) { title t = new title(); t.emp_no = employee_no; t.title1 = employee_title; var db = new newdataEntities(); db.titles.Add(t); db.SaveChanges(); db.Dispose(); }
public void AddDepartment(string department_name, int employee_no, int employe_experience) { department dep = new department(); dep.department_name = department_name; dep.emp_no = employee_no; dep.employe_experience = employe_experience; var db = new newdataEntities(); db.departments.Add(dep); db.SaveChanges(); db.Dispose(); }
public void AddExperience(int employe_experience, string employe_level) { experience exp = new experience(); exp.employe_experience = employe_experience; exp.employe_level = employe_level; var db = new newdataEntities(); db.experiences.Add(exp); db.SaveChanges(); db.Dispose(); }
public void AddSalary(int employee_no, int employee_salary, string from_date, string to_date) { salary sal = new salary(); sal.emp_no = employee_no; sal.salary1 = employee_salary; sal.from_date = from_date; sal.to_date = to_date; var db = new newdataEntities(); db.salaries.Add(sal); db.SaveChanges(); db.Dispose(); }
public void AddEmployee(int emp_no, string birth, string name, string last_name, int gender, string hire_date, string contact) { employee emp = new employee(); emp.emp_no = emp_no; emp.birth_date = birth; emp.first_name = name; emp.last_name = last_name; emp.gender = gender; emp.hire_date = hire_date; emp.contact = contact; var db = new newdataEntities(); db.employees.Add(emp); db.SaveChanges(); db.Dispose(); }