public static void CreateNewEmployee(Employee Emp) { EmpDBContext db = new EmpDBContext(); db.Employees.Add(Emp); db.SaveChanges(); }
public static Userstories SearchUserById(Userstories p, EmpDBContext db) { Userstories z = (db.userstories.Where(e => e.userstoryid == p.userstoryid)).First(); return(z); }
public static void CreateNewUserstories(Userstories userstory) { EmpDBContext db = new EmpDBContext(); db.userstories.Add(userstory); db.SaveChanges(); }
public static Project SearchProjectsById(Project p, EmpDBContext db) { Project z = (db.Project.Where(e => e.proid == p.proid)).First(); return(z); }
public static void Delete(ManagerComment comment) { EmpDBContext db = new EmpDBContext(); db.ManagerComments.Remove(comment); db.SaveChanges(); }
public static Employee SearchEmployeesById(Employee em, EmpDBContext db) { Employee x = (db.Employees.Where(e => e.eid == em.eid)).First(); return(x); }
public static void Create(ManagerComment comment) { EmpDBContext db = new EmpDBContext(); db.ManagerComments.Add(comment); db.SaveChanges(); }
public static void CreateTask(ProjectTask task) { EmpDBContext db = new EmpDBContext(); db.ProjectTasks.Add(task); db.SaveChanges(); }
public static void CreateNewProject(Project prjct) { EmpDBContext db = new EmpDBContext(); db.Project.Add(prjct); db.SaveChanges(); }
// GET: api/Userstories/5 public Userstories Get(int id) { EmpDBContext db = new EmpDBContext(); Userstories pr = new Userstories(); pr.userstoryid = id; return(UserstoryRepo.SearchUserById(pr, db)); }
// GET: api/ProjectController/5 public Project Get(int id) { EmpDBContext db = new EmpDBContext(); Project pr = new Project(); pr.proid = id; return(ProjectRepo.SearchProjectsById(pr, db)); }
// GET: api/ManagerComments/5 public ManagerComment Get(int id) { EmpDBContext db = new EmpDBContext(); ManagerComment comment = new ManagerComment(); comment.managerid = id; return(ManagerCommentRepo.Search(comment, db)); }
// GET: api/ProjectTask/5 public ProjectTask Get(int id) { EmpDBContext db = new EmpDBContext(); ProjectTask obj = new ProjectTask(); obj.task_id = id; return(ProTaskRepo.SearchById(obj, db)); }
public static void Delete(ProjectTask ts) { EmpDBContext db = new EmpDBContext(); ProjectTask tk = SearchById(ts, db); db.ProjectTasks.Remove(tk); db.SaveChanges(); }
// GET: api/Employee/5 public Employee Get(int id) { EmpDBContext db = new EmpDBContext(); Employee obj = new Employee(); obj.eid = id; return(EmployeeRepo.SearchEmployeesById(obj, db)); }
public static void Edit(ManagerComment comment) { EmpDBContext db = new EmpDBContext(); ManagerComment c = Search(comment, db); c.comments = comment.comments; c.taskid = comment.taskid; db.SaveChanges(); }
public EmployeeRepository() { _db = new EmpDBContext(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <Employee, EmployeeDTO>(); }); }
public static void EditUserstories(Userstories e) { EmpDBContext db = new EmpDBContext(); Userstories usr = SearchUserById(e, db); usr.story = e.story; usr.proid = e.proid; db.SaveChanges(); }
public static void DeleteAllProject(int proid) { EmpDBContext db = new EmpDBContext(); var delete = db.Project.FirstOrDefault(s => s.proid == proid); if (delete != null) { db.Project.Remove(delete); db.SaveChanges(); } }
public static void DeleteAllEmployee(int eid) { EmpDBContext db = new EmpDBContext(); var delete = db.Employees.FirstOrDefault(s => s.eid == eid); if (delete != null) { db.Employees.Remove(delete); db.SaveChanges(); } }
public static void DeleteallUserstories(int userstoryid) { EmpDBContext db = new EmpDBContext(); var delete = db.userstories.FirstOrDefault(s => s.userstoryid == userstoryid); if (delete != null) { db.userstories.Remove(delete); db.SaveChanges(); } }
public static void Edit(ProjectTask t) { EmpDBContext db = new EmpDBContext(); ProjectTask ta = SearchById(t, db); ta.assigned_to = t.assigned_to; ta.end_date = t.end_date; ta.start_date = t.start_date; ta.completion_date = t.completion_date; ta.userstoryid = t.userstoryid; db.SaveChanges(); }
public static void EditProject(Project e) { EmpDBContext db = new EmpDBContext(); Project pro = SearchProjectsById(e, db); pro.proid = e.proid; pro.proname = e.proname; pro.startdate = e.startdate; pro.enddate = e.enddate; pro.clientname = e.clientname; // p.skillsets = e.skillsets; db.SaveChanges(); }
public static void EditEmployee(Employee Emp) { EmpDBContext db = new EmpDBContext(); Employee em = SearchEmployeesById(Emp, db); em.eid = Emp.eid; em.name = Emp.name; em.designation = Emp.designation; em.contactno = Emp.contactno; em.emailid = Emp.emailid; em.skillsets = Emp.skillsets; db.SaveChanges(); }
public static ProjectTask SearchById(ProjectTask ta, EmpDBContext db) { return((db.ProjectTasks.Select(t => t).Where(t => t.task_id == ta.task_id)).First()); }
public OrdersController(EmpDBContext context) { _context = context; }
public LineItemsController(EmpDBContext context) { _context = context; }
public CartItemsController(EmpDBContext context) { _context = context; }
public InventoriesController(EmpDBContext context) { _context = context; }
public List <ProjectTask> ShowAllTasks() { EmpDBContext db = new EmpDBContext(); return(db.ProjectTasks.Select(task => task).ToList()); }