Exemple #1
0
        public ActionResult viewTask(int id)
        {
            _repositoryTask = new RepositoryTask();
            var list = _repositoryTask.GetListTaskByProjectId(id);

            return(PartialView(list));
        }
Exemple #2
0
        public ActionResult Edit(ProjectEng.Models.Task task, string pMStaff)
        {
            _repositorytask    = new RepositoryTask();
            _repositoryproject = new RepositoryProject();

            if (ModelState.IsValid)
            {
                //task.Create = DateTime.Now;
                OperationStatus ops = _repositorytask.SaveTask(task);
                if (!ops.Status)
                {
                    ModelState.AddModelError("", ops.ExceptionInnerMessage);
                }
                else
                {
                    ModelState.AddModelError("", "Data Save!!");
                }
            }
            var listproject = _repositoryproject.GetListProject("");

            ViewBag.ProjectId = new SelectList(listproject, "ProjectId", "Description");

            ViewBag.ProjectId = task.ProjectID;
            ViewBag.PMStaff   = pMStaff;
            loadPMStaff("ALL");
            return(RedirectToAction("ProjectList", "Project", new { ProjectId = task.ProjectID, PMStaff = pMStaff }));
        }
Exemple #3
0
        // GET: Task
        public ActionResult Index(string pMStaff, int id = 0)
        {
            _repositorytask = new RepositoryTask();
            var listtak = _repositorytask.GetListTaskByProjectId_All(id);

            ViewBag.PMStaff = pMStaff;
            return(View(listtak));
        }
Exemple #4
0
        public ActionResult CreateComment()
        {
            _repositoryTask = new RepositoryTask();
            var listTask = _repositoryTask.GetListTask();

            ViewBag.TaskID = new SelectList(listTask, "ID", "Description");
            return(View());
        }
Exemple #5
0
        public ActionResult Edit(int id, string pMStaff)
        {
            _repositorytask = new RepositoryTask();
            var task = _repositorytask.GetTaskByID(id);

            //ViewBag.ProjectID = task.ProjectID;
            loadPMStaff(task.Responsable);
            ViewBag.PMStaff = pMStaff;
            return(View(task));
        }
Exemple #6
0
        public ActionResult TaskToPdf(int id, string page)
        {
            _repositorytask = new RepositoryTask();

            //int idp = int.Parse(page);
            var model = _repositorytask.GetListTaskByProjectId_All(id);

            return(new PartialViewAsPdf("_TaskProject", model)
            {
                FileName = "_TaskProject.pdf",
                PageSize = Size.Letter,
                PageOrientation = Orientation.Portrait,
                MinimumFontSize = 14,
                PageMargins = { Top = 20, Bottom = 10 },
                PageHeight = 40,
                CustomSwitches =
                    "--footer-center \"Name: " + "_TaskProject" + "  DOS: " +
                    DateTime.Now.Date.ToString("MM/dd/yyyy") + "  Page: [page]/[toPage]\"" +
                    " --footer-line --footer-font-size \"9\" --footer-spacing 6 --footer-font-name \"calibri light\""
            });
        }
 public ServiceTask(IRepositoryTask repositoryTask)
 {
     _repositoryTask = repositoryTask;
 }
 public TaskController(IRepositoryTask <Entities.Task> repositoryTask)
 {
     _repositoryTask = repositoryTask;
 }