示例#1
0
 public List <tbl_parent_task> getAllParentTasks()
 {
     using (ProjectManagerConnection dbContext = new ProjectManagerConnection())
     {
         return(dbContext.tbl_parent_task.ToList());
     }
 }
示例#2
0
 public List <SP_GETALLTASKS1_Result> GetAllTasks()
 {
     using (dbContext = new ProjectManagerConnection())
     {
         return(dbContext.SP_GETALLTASKS1().ToList());
     }
 }
示例#3
0
 public tbl_task GetTask(int taskId)
 {
     using (dbContext = new ProjectManagerConnection())
     {
         return(dbContext.tbl_task.Find(taskId));
     }
 }
 public tbl_users GetUser(int UserId)
 {
     using (dbContext = new ProjectManagerConnection())
     {
         return(dbContext.tbl_users.Find(UserId));
     }
 }
 public List <tbl_users> GetUserList()
 {
     using (dbContext = new ProjectManagerConnection())
     {
         return(dbContext.tbl_users.ToList());
     }
 }
示例#6
0
 public void UpdateTask(tbl_task newTaskDetails)
 {
     using (dbContext = new ProjectManagerConnection())
     {
         dbContext.Entry(newTaskDetails).State = EntityState.Modified;
         dbContext.SaveChanges();
     }
 }
示例#7
0
 public void CreateTask(tbl_task newTaskDetails)
 {
     using (dbContext = new ProjectManagerConnection())
     {
         dbContext.tbl_task.Add(newTaskDetails);
         dbContext.SaveChanges();
     }
 }
 public void UpdateUser(tbl_users userDetail)
 {
     using (dbContext = new ProjectManagerConnection())
     {
         dbContext.Entry(userDetail).State = EntityState.Modified;
         dbContext.SaveChanges();
     }
 }
 public void AddUser(tbl_users userDetail)
 {
     using (dbContext = new ProjectManagerConnection())
     {
         dbContext.tbl_users.Add(userDetail);
         dbContext.SaveChanges();
     }
 }
示例#10
0
 public void UpdateProjectDetail(tbl_project projectDetails)
 {
     using (ProjectManagerConnection dbContext = new ProjectManagerConnection())
     {
         dbContext.Entry(projectDetails).State = EntityState.Modified;
         dbContext.SaveChanges();
     }
 }
示例#11
0
        public tbl_project GetProjectDetailsById(int projectId)
        {
            using (ProjectManagerConnection dbContext = new ProjectManagerConnection())

            {
                return(dbContext.tbl_project.Find(projectId));
            }
        }
 public void DeleteUser(int UserId)
 {
     using (dbContext = new ProjectManagerConnection())
     {
         var user = dbContext.tbl_users.Find(UserId);
         dbContext.tbl_users.Remove(user);
         dbContext.SaveChanges();
     }
 }
示例#13
0
 public void CreateNewProject(tbl_project projectDetails)
 {
     using (ProjectManagerConnection dbContext = new ProjectManagerConnection())
     {
         dbContext.tbl_project.Add(projectDetails);
         // dbContext.Entry(projectDetails).State = EntityState.Added;
         dbContext.SaveChanges();
     }
 }
示例#14
0
 public virtual List <SP_GETALLPROJECTSWITHTASK1_Result> GetProjectList()
 {
     using (ProjectManagerConnection dbContext = new ProjectManagerConnection())
     {
         //  var project = dbContext.GetProjects();
         //return dbContext.tbl_project
         //    .Include(x => x.tbl_task)
         //    .Include(y => y.tbl_users)
         //    .ToList();
         return(dbContext.SP_GETALLPROJECTSWITHTASK1().ToList());
     }
 }