//
 // GET: /ProjectPlanCollection/Details/5
 public ViewResult Details(int id)
 {
     ProjectPlanCollectionService service = new ProjectPlanCollectionService();
     ProjectPlanCollection model = service.GetProjectPlanCollectionByID(new ProjectPlanCollection() { Id = id });
     model.ActionOperationType = EActionOperationType.Details;
     return View("Create",model);
 }
 public ActionResult DeleteConfirmed(int id)
 {
     ProjectPlanCollectionService service = new ProjectPlanCollectionService();
     ProjectPlanCollection model = service.GetProjectPlanCollectionByID(new ProjectPlanCollection() { Id = id });
     service.Remove(model);
     return RedirectToAction("Index");
 }
 //
 // GET: /ProjectPlanCollection/Edit/5
 public ActionResult Edit(int id)
 {
     ProjectPlanCollectionService service = new ProjectPlanCollectionService();
     ProjectPlanCollection model = service.GetProjectPlanCollectionByID(new ProjectPlanCollection() { Id = id });
     model.ActionOperationType = EActionOperationType.Edit;
     this.LoadEditViewBag(model);
     return View("Create",model);
 }
 public ActionResult Create(ProjectPlanCollection model)
 {
     model.ActionOperationType = EActionOperationType.Create;
     if (ModelState.IsValid)
     {
         ProjectPlanCollectionService service = new ProjectPlanCollectionService();
         service.Add(model);
         return RedirectToAction("Index");
     }
     this.LoadEditViewBag(model);
     return View("Create",model);
 }
        private PagedList<ProjectPlanCollection> QueryListData(ProjectPlanCollectionSearch searchModel)
        {
            int recordCount = 0;
            int pageSize = ConstantManager.PageSize;
            ProjectPlanCollectionService service = new ProjectPlanCollectionService();

            string Group = searchModel.IsAsc ? searchModel.SortBy : searchModel.SortBy + " Descending";

            IList<ProjectPlanCollection> allEntities = service.QueryByPage(this.GetSearchFilter(searchModel), Group, pageSize, searchModel.PageIndex + 1, out recordCount);

            var formCondition = "var condition=" + JsonConvert.SerializeObject(searchModel);
            return new PagedList<ProjectPlanCollection>(allEntities, searchModel.PageIndex, pageSize, recordCount, "Id", "Id", formCondition);
        }