public ActionResult Index()
        {
            PosReceiptOfTestingTableViewModel model = new PosReceiptOfTestingTableViewModel();

            model.PosMerchants = _posMerchantService.GetAllPosMerchants().PosMerchants.Select(u => new SelectListItem()
            {
                Text = u.MerchantName, Value = u.MerchantId.ToString()
            }).ToList();
            return(View("../Datatables/PosReceiptOfTestingTable", model));
        }
        public JsonResult GetAllRows()
        {
            IEnumerable <PosMerchantFlatViewModel> posMerchants;

            posMerchants = _posMerchantService.GetAllPosMerchants().PosMerchants.ConvertToPosMerchantFlatViewModels();
            DataTableViewModel data = new DataTableViewModel();

            data.draw            = "1";
            data.recordsTotal    = posMerchants.ToList().Count.ToString();
            data.recordsFiltered = posMerchants.ToList().Count.ToString();

            data.data = posMerchants.ToList <object>();

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