// // GET: /ProjectStructure/Details/5 public ViewResult Details(int id) { ProjectStructureService service = new ProjectStructureService(); ProjectStructure model = service.GetProjectStructureByID(new ProjectStructure() { Id = id }); model.ActionOperationType = EActionOperationType.Details; return View("Create",model); }
public ActionResult DeleteConfirmed(int id) { ProjectStructureService service = new ProjectStructureService(); ProjectStructure model = service.GetProjectStructureByID(new ProjectStructure() { Id = id }); service.Remove(model); return RedirectToAction("Index"); }
public FilesController(FileService fileService, ProjectStructureService projectStructureService, ILogger <FilesController> logger) { _fileService = fileService; _projectStructureService = projectStructureService; _logger = logger; }
// // GET: /ProjectStructure/Edit/5 public ActionResult Edit(int id) { ProjectStructureService service = new ProjectStructureService(); ProjectStructure model = service.GetProjectStructureByID(new ProjectStructure() { Id = id }); model.ActionOperationType = EActionOperationType.Edit; this.LoadEditViewBag(model); return View("Create",model); }
public ActionResult Create(ProjectStructure model) { model.ActionOperationType = EActionOperationType.Create; if (ModelState.IsValid) { ProjectStructureService service = new ProjectStructureService(); service.Add(model); return RedirectToAction("Index"); } this.LoadEditViewBag(model); return View("Create",model); }
public ProjectStructureController(ProjectStructureService projectStructureService, ILogger <ProjectStructureController> logger) { _projectStructureService = projectStructureService; _logger = logger; }
private PagedList<ProjectStructure> QueryListData(ProjectStructureSearch searchModel) { int recordCount = 0; int pageSize = ConstantManager.PageSize; ProjectStructureService service = new ProjectStructureService(); string Group = searchModel.IsAsc ? searchModel.SortBy : searchModel.SortBy + " Descending"; IList<ProjectStructure> allEntities = service.QueryByPage(this.GetSearchFilter(searchModel), Group, pageSize, searchModel.PageIndex + 1, out recordCount); var formCondition = "var condition=" + JsonConvert.SerializeObject(searchModel); return new PagedList<ProjectStructure>(allEntities, searchModel.PageIndex, pageSize, recordCount, "Id", "Id", formCondition); }