public void AddDepart(string name) { var db = new Employee_ManagementEntities(); DEPARTMENT dept = new DEPARTMENT(); dept.department_name = name; db.DEPARTMENTS.Add(dept); db.SaveChanges(); db.Dispose(); }
public void AddJob(string job_title, string min_salary, string max_salary) { var db = new Employee_ManagementEntities(); Tbl_Job job = new Tbl_Job(); job.job_title = job_title; job.min_salary = min_salary; job.max_salary = max_salary; db.Tbl_Job.Add(job); db.SaveChanges(); db.Dispose(); }
public void AddEmplyee(string first_name, string last_name, string email, string phone_number, int department_id, string salary, int Job_id) { var db = new Employee_ManagementEntities(); Tbl_Employee emp = new Tbl_Employee(); emp.first_name = first_name; emp.last_name = last_name; emp.email = email; emp.phone_number = phone_number; emp.department_id = department_id; emp.salary = salary; emp.Job_id = Job_id; db.Tbl_Employee.Add(emp); db.SaveChanges(); db.Dispose(); }