public static void CreateManagerComments(ManagerComent employee) { MainDBC db = new MainDBC(); db.managerComents.Add(employee); db.SaveChanges(); }
public static void CreateEmployees(Employee employee) { MainDBC db = new MainDBC(); db.Employees.Add(employee); db.SaveChanges(); }
public static ManagerComent Operation_search_id(ManagerComent id_search) { MainDBC db = new MainDBC(); ManagerComent x = (db.managerComents.Where(e => e.mgrid == e.mgrid)).First(); return(x); }
public static ProjectTask Task_search_id(ProjectTask id_search) { MainDBC db = new MainDBC(); ProjectTask x = (db.ProjectTasko.Where(e => e.protaskid == e.protaskid)).First(); return(x); }
public static void Createuserstories(UserStory user) { MainDBC db = new MainDBC(); db.userStories.Add(user); db.SaveChanges(); }
public static void CreateProj(Project project) { MainDBC db = new MainDBC(); db.Projects.Add(project); db.SaveChanges(); }
public static Employee Operation_search_id(Employee id_search) { MainDBC db = new MainDBC(); Employee x = (db.Employees.Where(e => e.eid == e.eid)).First(); return(x); }
public static void CreateTask(ProjectTask task) { MainDBC db = new MainDBC(); db.ProjectTasko.Add(task); db.SaveChanges(); }
public static Project Pro_search_id(Project id_search) { MainDBC db = new MainDBC(); Project x = (db.Projects.Where(e => e.proid == e.proid)).First(); return(x); }
public static UserStory User_search_id(UserStory id_search) { MainDBC db = new MainDBC(); UserStory x = (db.userStories.Where(e => e.userstoryid == e.userstoryid)).First(); return(x); }
// POST: api/Project public void Post(Project value) { MainDBC db = new MainDBC(); db.Projects.Add(value); db.SaveChanges(); // ProRepos.CreateProj(value); }
public static void EditManagerComments(ManagerComent Emp) { MainDBC db = new MainDBC(); ManagerComent em = Operation_search_id(Emp); em.mgrid = Emp.mgrid; em.comments = Emp.comments; em.taskid = Emp.taskid; db.SaveChanges(); }
public static void EditUser(UserStory Emp) { MainDBC db = new MainDBC(); UserStory em = User_search_id(Emp); em.userstoryid = Emp.userstoryid; em.story = Emp.story; em.proid = Emp.proid; db.SaveChanges(); }
public static void Operation_delete_id(int id_delete) { MainDBC db = new MainDBC(); var qwer = db.ProjectTasko.FirstOrDefault(ep => ep.protaskid == id_delete); if (qwer != null) { db.ProjectTasko.Remove(qwer); db.SaveChanges(); } }
public static void Operation_delete_id(int id_delete) { MainDBC db = new MainDBC(); var qwer = db.Employees.FirstOrDefault(ep => ep.eid == id_delete); if (qwer != null) { db.Employees.Remove(qwer); db.SaveChanges(); } }
public static void EditProj(Project Emp) { MainDBC db = new MainDBC(); Project em = Pro_search_id(Emp); em.proid = Emp.proid; em.proname = Emp.proname; em.clientname = Emp.clientname; em.startdate = Emp.startdate; em.enddate = Emp.enddate; db.SaveChanges(); }
public static void EditTask(ProjectTask Emp) { MainDBC db = new MainDBC(); ProjectTask em = Task_search_id(Emp); em.protaskid = Emp.protaskid; em.assignedto = Emp.assignedto; em.userstoryid = Emp.userstoryid; em.tstartdate = Emp.tstartdate; em.tenddate = Emp.tenddate; em.tcompletion = Emp.tcompletion; db.SaveChanges(); }
// PUT: api/User/5 public void Put(int id, UserStory Emp) { MainDBC db = new MainDBC(); UserStory em = db.userStories.Where(emp => emp.userstoryid == id).FirstOrDefault(); if (em != null) { em.story = Emp.story; em.proid = Emp.proid; db.SaveChanges(); } // value.userstoryid = id; // UserRepos.EditUser(value); }
// PUT: api/Manager/5 public void Put(int id, ManagerComent Emp) { MainDBC db = new MainDBC(); ManagerComent em = db.managerComents.Where(emp => emp.mgrid == id).FirstOrDefault(); if (em != null) { em.comments = Emp.comments; em.taskid = Emp.taskid; db.SaveChanges(); } //value.mgrid = id; //ManagerRepos.EditManagerComments(value); }
public static void EditEmployee(Employee Emp) { MainDBC db = new MainDBC(); Employee em = Operation_search_id(Emp); em.eid = Emp.eid; em.name = Emp.name; em.mgrid = Emp.mgrid; em.designation = Emp.designation; //em.contactno = Emp.contactno; em.emailid = Emp.emailid; em.skillsets = Emp.skillsets; db.SaveChanges(); }
// PUT: api/Project/5 public void Put(int id, Project Emp) { MainDBC db = new MainDBC(); Project em = db.Projects.Where(emp => emp.proid == id).FirstOrDefault(); if (em != null) { em.proname = Emp.proname; em.clientname = Emp.clientname; em.startdate = Emp.startdate; em.enddate = Emp.enddate; db.SaveChanges(); } // value.proid = id; // ProRepos.EditProj(value); }
// PUT: api/Emp/5 public void Put(int id, Employee e) { MainDBC db = new MainDBC(); Employee e1 = db.Employees.Where(emp => emp.eid == id).FirstOrDefault(); if (e1 != null) { e1.name = e.name; e1.designation = e.designation; e1.mgrid = e.mgrid; e1.emailid = e.emailid; e1.skillsets = e.skillsets; db.SaveChanges(); } //value.eid = id; //EmRepos.EditEmployee(value); }
// PUT: api/ProjectTask/5 public void Put(int id, ProjectTask Emp) { MainDBC db = new MainDBC(); ProjectTask em = db.ProjectTasko.Where(emp => emp.protaskid == id).FirstOrDefault(); if (em != null) { em.assignedto = Emp.assignedto; em.userstoryid = Emp.userstoryid; em.tstartdate = Emp.tstartdate; em.tenddate = Emp.tenddate; em.tcompletion = Emp.tcompletion; db.SaveChanges(); } //value.protaskid = id; // TaskRepos.EditTask(value); }
// POST: api/ProjectTask public void Post(ProjectTask value) { MainDBC db = new MainDBC(); TaskRepos.CreateTask(value); }
// POST: api/Manager public void Post(ManagerComent value) { MainDBC db = new MainDBC(); ManagerRepos.CreateManagerComments(value); }
// GET: api/ProjectTask/5 public ProjectTask Get(int id) { MainDBC db = new MainDBC(); return(db.ProjectTasko.Where(emp => emp.protaskid == id).FirstOrDefault()); }
// GET: api/ProjectTask public IEnumerable <ProjectTask> Get() { MainDBC db = new MainDBC(); return(db.ProjectTasko.Select(emp => emp).ToList()); }
// GET: api/Manager/5 public ManagerComent Get(int id) { MainDBC db = new MainDBC(); return(db.managerComents.Where(emp => emp.mgrid == id).FirstOrDefault()); }
public List <Employee> Operation_show_all() { MainDBC db = new MainDBC(); return(db.Employees.Select(emp => emp).ToList()); }
public List <Project> GetAllProjects() { MainDBC db = new MainDBC(); return(db.Projects.Select(pro => pro).ToList()); }