Example #1
0
        public static async Task <IQueryable <Payment> > InquirePaymentAsync(this PaymentQueryViewModel queryViewModel, SampleController <UserProfile> controller)

        {
            var ModelState  = controller.ModelState;
            var ViewBag     = controller.ViewBag;
            var HttpContext = controller.HttpContext;
            var models      = controller.DataSource;

            ViewBag.ViewModel = queryViewModel;
            PaymentQueryViewModel viewModel = (PaymentQueryViewModel)queryViewModel.Duplicate();
            var profile = await HttpContext.GetUserAsync();

            return(viewModel.InquirePayment(models));
        }
Example #2
0
        public static IQueryable <Payment> InquirePayment <TEntity>(this PaymentQueryViewModel queryViewModel, SampleController <TEntity> controller, out String alertMessage)
            where TEntity : class, new()
        {
            alertMessage = null;
            var ModelState  = controller.ModelState;
            var ViewBag     = controller.ViewBag;
            var HttpContext = controller.HttpContext;
            var models      = controller.DataSource;

            ViewBag.ViewModel = queryViewModel;
            PaymentQueryViewModel viewModel = (PaymentQueryViewModel)queryViewModel.Duplicate();
            var profile = HttpContext.GetUser();

            return(viewModel.InquirePayment(models));
        }