示例#1
0
        public ActionResult Project()
        {
            UserBissnessLayer businessLayer = new UserBissnessLayer();
            List <Project>    projects      = businessLayer.GetAllProject();

            return(View(projects));
        }
示例#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"));
        }