예제 #1
0
        // GET: /Collection/SetCollection
        public ActionResult SetCollection()
        {
            var manageCollectionDto = new ManageCollectionDTO();
            var deptCode            = Request.Cookies["Employee"]?["DeptCode"];

            manageCollectionDto.CollectionPoint  = _collectionRepo.GetCollectionPointByDeptCode(deptCode);
            manageCollectionDto.CollectionPoints = _collectionRepo.GetAll();
            return(View(manageCollectionDto));
        }
예제 #2
0
        // GET: Disbursement/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var disbursement = await _disbursementRepo.GetByIdAsync((int)id);

            if (disbursement == null)
            {
                return(HttpNotFound());
            }

            ViewBag.CollectionPointId = new SelectList(_collectionRepo.GetAll(), "CollectionPointId",
                                                       "CollectionName", disbursement.CollectionPointId);

            return(View(disbursement));
        }
예제 #3
0
        /// <summary>
        /// The actual Work to be done.
        /// </summary>
        protected override void Execute()
        {
            List <CollectionModel> newlist = new List <CollectionModel>();

            IQueryable <collection> pagedCollectionnList = CollectionRepository.GetAll();

            foreach (collection item in pagedCollectionnList.ToList())
            {
                newlist.Add(Util.ConvertToCollectionModel(item, string.Empty));
            }

            Response = new ResponseModel()
            {
                Collections        = newlist,
                IsOperationSuccess = true
            };
        }
        /// <summary>
        /// The actual Work to be done.
        /// </summary>
        protected override void Execute()
        {
            List <SubseryModel> newlist = new List <SubseryModel>();

            IQueryable <subsery> pagedCollectionnList = SubseryRepository.GetAll();

            IQueryable <collection> collections = CollectionRepository.GetAll();

            foreach (subsery item in pagedCollectionnList.ToList())
            {
                newlist.Add(Util.ConvertToSubseryModel(item, collections.First(c => c.Id == item.CollectionId).CollectionName));
            }

            Response = new ResponseModel()
            {
                Subseries          = newlist,
                IsOperationSuccess = true
            };
        }
 public IActionResult Get()
 {
     return(Ok(_collectionRepository.GetAll()));
 }