Exemplo n.º 1
0
        private string IsTaskCompleted(int ProjectId)
        {
            var         taskContext = entity.Set <Task>();
            List <Task> task        = taskContext.Where(p => p.Parent_ID == ProjectId).Where(x => x.Status.Equals("false")).ToList();

            return(task.Any() ? "false" : "true");
        }
Exemplo n.º 2
0
        public bool AddNewUser(UserItem objUser)
        {
            try
            {
                var userContext = entity.Set <User>();
                userContext.Add(new User
                {
                    Employee_ID = objUser.EmployeeId,
                    First_Name  = objUser.FirstName,
                    Last_Name   = objUser.LastName,
                });
            }
            catch (Exception ex)
            {
                return(false);
            }

            return(entity.SaveChanges() == 1);
        }
Exemplo n.º 3
0
        private Project GetProjectDetails(string projectName)
        {
            Project projectObj = new Project();

            try
            {
                var projectContext = entity.Set <Project>();
                projectObj = projectContext.FirstOrDefault(x => x.Project1.Equals(projectName));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(projectObj);
        }