Beispiel #1
0
        private DataGridViewModel <Dictionary <string, object> > GetDataList(int preSaleId, int pageIndex, int pageSize)
        {
            DataGridViewModel <Dictionary <string, object> > dataGridViewModel = new DataGridViewModel <Dictionary <string, object> >();

            if (preSaleId > 0)
            {
                PageModel <ProductPreSaleOrderInfo> preSaleOrderList = ProductPreSaleHelper.GetPreSaleOrderList(preSaleId, pageIndex, pageSize);
                dataGridViewModel.rows  = new List <Dictionary <string, object> >();
                dataGridViewModel.total = preSaleOrderList.Total;
                foreach (ProductPreSaleOrderInfo model in preSaleOrderList.Models)
                {
                    Dictionary <string, object> item = model.ToDictionary();
                    dataGridViewModel.rows.Add(item);
                }
            }
            return(dataGridViewModel);
        }