Ejemplo n.º 1
0
        private DataGridViewModel <Dictionary <string, object> > GetDataList(CountDownQuery query)
        {
            DataGridViewModel <Dictionary <string, object> > dataGridViewModel = new DataGridViewModel <Dictionary <string, object> >();

            if (query != null)
            {
                DbQueryResult countDownTotalList = PromoteHelper.GetCountDownTotalList(query);
                dataGridViewModel.rows  = DataHelper.DataTableToDictionary(countDownTotalList.Data);
                dataGridViewModel.total = countDownTotalList.TotalRecords;
                foreach (Dictionary <string, object> row in dataGridViewModel.rows)
                {
                    row.Add("OrderStatusText", EnumDescription.GetEnumDescription((Enum)(object)(OrderStatus)row["OrderStatus"], 0));
                }
            }
            return(dataGridViewModel);
        }