Esempio n. 1
0
        public int Add(UserDO model)
        {
            var data = dbContext.tblUsers.Add(new tblUser()
            {
                EmployeeId = model.EmployeeId,
                FirstName  = model.FirstName,
                LastName   = model.LastName
            });

            return(dbContext.SaveChanges());
        }
Esempio n. 2
0
        public int Add(TaskDO model)
        {
            var data = dbContext.tblTasks.Add(new tblTask()
            {
                EndDate      = model.EndDate,
                IsParentTask = model.IsParentTask,
                ParentTask   = model.ParentTask,
                Priority     = model.Priority,
                ProjectID    = model.ProjectID,
                StartDate    = model.StartDate,
                Status       = model.Status,
                Task         = model.Task,
                TaskId       = model.TaskId,
                TaskOwner    = model.TaskOwner
            });

            return(dbContext.SaveChanges());
        }
Esempio n. 3
0
 public int Add(ProjectDO model)
 {
     try
     {
         var data = dbContext.tblProjects.Add(new tblProject()
         {
             EndDate    = model.EndDate,
             ManagerId  = model.ManagerId,
             Priority   = model.Priority,
             Project    = model.Project,
             Project_Id = model.Project_Id,
             StartDate  = model.StartDate
         });
         return(dbContext.SaveChanges());
     }
     catch (Exception)
     {
         return(0);
     }
 }