示例#1
0
        public ActionResult Task(String id)
        {
            UserBissnessLayer bissnessLayer = new UserBissnessLayer();
            List <Task>       TaskList      = bissnessLayer.GetTaskForProject(id);

            ViewBag.ProjectId = id;
            return(View(TaskList));
        }
示例#2
0
        public ActionResult Xml(String id)
        {
            UserBissnessLayer   layer   = new UserBissnessLayer();
            Project             project = layer.GetAllProject().Find(x => x.Id == id);
            List <Task>         tasks   = layer.GetTaskForProject(id);
            List <UserWithPerm> users   = layer.UserInProject(id).ToList();

            Response.AppendHeader("Content-Disposition", "attachment;filename=project.xml");
            byte[] file = Encoding.ASCII.GetBytes(layer.createXML(project, tasks, users));
            return(File(file, "text/xml", "project.xml"));
        }