public override ActionResult _Index()
        {
            int totalRows = 0;

            ViewBag.PageSize = ConfigurationHelper.GetsmARTLookupGridPageSize();
            ScaleLibrary        scaleLib   = new ScaleLibrary(ConfigurationHelper.GetsmARTDBContextConnectionString());
            IEnumerable <Scale> resultList = scaleLib.GetAllByPaging(out totalRows, 1, ViewBag.PageSize, "", "Asc", _includeEntities, null, ReceivingTicketType);

            return(View("~/Views/Transaction/QScale/_List.cshtml", resultList));
        }
        public override ActionResult _Index(GridCommand command)
        {
            int totalRows = 0;

            FilterDescriptor filterDesc = new FilterDescriptor("Active_Ind", FilterOperator.IsNotEqualTo, "false");

            command.FilterDescriptors.Add(filterDesc);
            ScaleLibrary        scaleLib   = new ScaleLibrary(ConfigurationHelper.GetsmARTDBContextConnectionString());
            IEnumerable <Scale> resultList = scaleLib.GetAllByPaging(
                out totalRows,
                command.Page,
                command.PageSize,
                command.SortDescriptors.Count == 0 ? "" : command.SortDescriptors[0].Member,
                command.SortDescriptors.Count == 0 ? "" : command.SortDescriptors[0].SortDirection == System.ComponentModel.ListSortDirection.Descending ? "Desc" : "Asc",
                _includeEntities,
                (command.FilterDescriptors.Count == 0 ? null : command.FilterDescriptors),
                ReceivingTicketType
                );

            return(View(new GridModel {
                Data = resultList,
                Total = totalRows
            }));
        }