예제 #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (cluster_ != null)
            {
                hash ^= Cluster.GetHashCode();
            }
            if (JobName.Length != 0)
            {
                hash ^= JobName.GetHashCode();
            }
            if (TaskIndex != 0)
            {
                hash ^= TaskIndex.GetHashCode();
            }
            if (defaultSessionConfig_ != null)
            {
                hash ^= DefaultSessionConfig.GetHashCode();
            }
            if (Protocol.Length != 0)
            {
                hash ^= Protocol.GetHashCode();
            }
            return(hash);
        }
예제 #2
0
        public ViewResult Index()
        {
            var tasks = _repository.GetAll();
            var model = new TaskIndex(tasks);

            return(View(model));
        }
예제 #3
0
        public ActionResult Index()
        {
            var MemberCountByProject = from AssignResource in db.AssignResources
                                       group AssignResource.UserId by AssignResource.ProjectId into g
                                       select new { ProjectId = g.Key, NumberOfMember = g.Count() };

            var TaskCountByProject = from Task in db.Tasks
                                     group Task.Id by Task.ProjectId into g
                                     select new { ProjectId = g.Key, NumberOfTask = g.Count() };
            string userId = User.Identity.GetUserId();
            var    result = from Project in db.Projects
                            join a in MemberCountByProject on
                            Project.Id equals a.ProjectId
                            join b in TaskCountByProject on
                            Project.Id equals b.ProjectId
                            join c in db.AssignResources.Where(x => x.UserId == userId) on
                            Project.Id equals c.ProjectId
                            select new ProjectInfo
            {
                Id             = Project.Id,
                Name           = Project.Name,
                CodeName       = Project.CodeName,
                Status         = Project.Status,
                NumberOfMember = a.NumberOfMember,
                NumberOfTask   = b.NumberOfTask
            };

            TaskIndex taskIndex = new TaskIndex();

            taskIndex.ProjectInfos = result;
            taskIndex.Tasks        = db.Tasks.Where(x => x.UserId == userId).Include(t => t.Project);
            return(View(taskIndex));
        }
예제 #4
0
        // GET: Tasks
        public ActionResult Index()
        {
            string    userID    = User.Identity.GetUserId();
            TaskIndex viewModel = this.db.Users
                                  .Where(u => u.Id == userID)
                                  .Include(u => u.Tasks)
                                  .Include(u => u.OwnedTasks)
                                  .ToList()
                                  .Select(u => new TaskIndex()
            {
                OwnedTasks = u.OwnedTasks, AssignedTasks = u.Tasks
            })
                                  .FirstOrDefault();

            return(View(viewModel));
        }
예제 #5
0
        private void taskBtn_Click(object sender, RoutedEventArgs e)
        {
            TaskIndex taskIndex = new TaskIndex();

            taskIndex.ShowDialog();
        }
예제 #6
0
 public ViewResult Index()
 {
     var tasks = _repository.GetAll();
     var model = new TaskIndex(tasks);
     return View(model);
 }