Exemple #1
0
 public void CreateTask(tbl_task newTaskDetails)
 {
     using (dbContext = new ProjectManagerConnection())
     {
         dbContext.tbl_task.Add(newTaskDetails);
         dbContext.SaveChanges();
     }
 }
Exemple #2
0
 public void UpdateTask(tbl_task newTaskDetails)
 {
     using (dbContext = new ProjectManagerConnection())
     {
         dbContext.Entry(newTaskDetails).State = EntityState.Modified;
         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();
     }
 }
Exemple #5
0
 public void UpdateProjectDetail(tbl_project projectDetails)
 {
     using (ProjectManagerConnection dbContext = new ProjectManagerConnection())
     {
         dbContext.Entry(projectDetails).State = EntityState.Modified;
         dbContext.SaveChanges();
     }
 }
 public void DeleteUser(int UserId)
 {
     using (dbContext = new ProjectManagerConnection())
     {
         var user = dbContext.tbl_users.Find(UserId);
         dbContext.tbl_users.Remove(user);
         dbContext.SaveChanges();
     }
 }
Exemple #7
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();
     }
 }