Exemple #1
0
        public static void CreateManagerComments(ManagerComent employee)
        {
            MainDBC db = new MainDBC();

            db.managerComents.Add(employee);
            db.SaveChanges();
        }
Exemple #2
0
        public static void CreateEmployees(Employee employee)
        {
            MainDBC db = new MainDBC();

            db.Employees.Add(employee);
            db.SaveChanges();
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }
Exemple #5
0
        public static void Createuserstories(UserStory user)
        {
            MainDBC db = new MainDBC();

            db.userStories.Add(user);
            db.SaveChanges();
        }
Exemple #6
0
        public static void CreateProj(Project project)
        {
            MainDBC db = new MainDBC();

            db.Projects.Add(project);
            db.SaveChanges();
        }
Exemple #7
0
        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);
        }
Exemple #8
0
        public static void CreateTask(ProjectTask task)
        {
            MainDBC db = new MainDBC();

            db.ProjectTasko.Add(task);
            db.SaveChanges();
        }
Exemple #9
0
        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);
        }
Exemple #10
0
        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);
        }
Exemple #11
0
        // POST: api/Project
        public void Post(Project value)
        {
            MainDBC db = new MainDBC();

            db.Projects.Add(value);
            db.SaveChanges();
            //           ProRepos.CreateProj(value);
        }
Exemple #12
0
        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();
        }
Exemple #13
0
        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();
        }
Exemple #14
0
        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();
            }
        }
Exemple #15
0
        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();
            }
        }
Exemple #16
0
        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();
        }
Exemple #17
0
        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();
        }
Exemple #18
0
        // 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);
        }
Exemple #19
0
        // 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);
        }
Exemple #20
0
        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();
        }
Exemple #21
0
        // 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);
        }
Exemple #22
0
        // 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);
        }
Exemple #25
0
        // 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());
        }
Exemple #28
0
        // GET: api/Manager/5
        public ManagerComent Get(int id)
        {
            MainDBC db = new MainDBC();

            return(db.managerComents.Where(emp => emp.mgrid == id).FirstOrDefault());
        }
Exemple #29
0
        public List <Employee> Operation_show_all()
        {
            MainDBC db = new MainDBC();

            return(db.Employees.Select(emp => emp).ToList());
        }
Exemple #30
0
        public List <Project> GetAllProjects()
        {
            MainDBC db = new MainDBC();

            return(db.Projects.Select(pro => pro).ToList());
        }