public ReturnBaseMessageModel EditCollection(MainViewModel.CollectionVerificationEntry collection)
        {
            try
            {
                uow.ExecWithStoreProcedure("[dbo].[PsetCollectionDue] @SubsCollId,@custId,@Subsid,@CollectorId,@CollectionAmt,@CollDiscount,@CollectionDate,@PostedBy",
                                           new SqlParameter("@SubsCollId", collection.Subscollid),
                                           new SqlParameter("@custId", collection.CustId),
                                           new SqlParameter("@Subsid", collection.subsid),
                                           new SqlParameter("@CollectorId", collection.CollectorId),
                                           new SqlParameter("@CollectionAmt", collection.CollectionAmt),
                                           new SqlParameter("@CollDiscount", collection.DiscountAmt),

                                           new SqlParameter("@CollectionDate", collection.CollectionDate),
                                           new SqlParameter("@PostedBy", Global.UserId)
                                           );



                returnMessage.Msg     = "Edited Sucessfully";
                returnMessage.Success = true;
                return(returnMessage);
            }
            catch (Exception ex)
            {
                returnMessage.Msg     = " Not Saved";
                returnMessage.Success = false;
                return(returnMessage);

                throw ex;
            }
        }
        public ActionResult _CollectionVerify(string CollectorName = "", string LocationName = "", string EntryTypeList = "", int pageNo = 1, int pageSize = 10)
        {
            if (EntryTypeList == "--Select Event--")
            {
                EntryTypeList = "";
            }
            MainViewModel.CollectionVerificationEntry collectionViewModel = new MainViewModel.CollectionVerificationEntry();
            var collectionList = collection.getCollectionList(CollectorName, LocationName, EntryTypeList, pageNo, pageSize);

            collectionViewModel.collectionPagedList = new StaticPagedList <MainViewModel.CollectionVerificationEntry>(collectionList, pageNo, pageSize, (collectionList.Count == 0) ? 0 : collectionList.FirstOrDefault().TotalCount);

            //foreach (var item in customerList)
            //{
            //    customerViewModel.customerViewModelList.Add(item);
            //}

            return(PartialView(collectionViewModel));
        }
        public ActionResult CollectionVerify(string CollectorName = "", string LocationName = "", string EntryTypeList = "")
        {
            try
            {
                MainViewModel.CollectionVerificationEntry collectionViewModel = new MainViewModel.CollectionVerificationEntry();
                var collectionList = collection.getCollectionList(CollectorName, LocationName, EntryTypeList, 1, 10);
                collectionViewModel.collectionPagedList = new StaticPagedList <MainViewModel.CollectionVerificationEntry>(collectionList, 1, 10, (collectionList.Count == 0) ? 0 : collectionList.FirstOrDefault().TotalCount);

                //foreach (var item in customerList)
                //{
                //    customerViewModel.customerViewModelList.Add(item);
                //}

                return(PartialView(collectionViewModel));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public ActionResult collectionEditSave(MainViewModel.CollectionVerificationEntry collections)
        {
            var collectionResult = collection.EditCollection(collections);

            return(Json(collectionResult, JsonRequestBehavior.AllowGet));
        }