//
        // GET: /PaymentMethod/
        public ActionResult Index(PaymentMethodViewModel model)
        {
            model.Patients = PatientManager.GetAllPatient();
            model.Services = ServiceManager.GetAllService();
            var totalrecords = 0;

            model.PaymentMethods = PaymentMethodManager.GetAllPaymentbyPaging(out totalrecords, model).Where(x => (x.Date >= model.FromDate || model.FromDate == null) && (x.Date <= model.ToDate || model.ToDate == null)).ToList();
            model.TotalCharge    = model.Charge - model.DiscountAmount;
            model.TotalRecords   = totalrecords;

            return(View(model));
        }