private DataGridViewModel <Dictionary <string, object> > GetListSplittinDraws(BalanceDrawRequestQuery query) { DataGridViewModel <Dictionary <string, object> > dataGridViewModel = new DataGridViewModel <Dictionary <string, object> >(); if (query != null) { DbQueryResult balanceDrawRequests = MemberHelper.GetBalanceDrawRequests(query, true); dataGridViewModel.rows = DataHelper.DataTableToDictionary(balanceDrawRequests.Data); dataGridViewModel.total = balanceDrawRequests.TotalRecords; foreach (Dictionary <string, object> row in dataGridViewModel.rows) { row.Add("RequestStateText", OnLinePaymentEnumHelper.GetOnLinePaymentDescription(row["RequestState"])); } } return(dataGridViewModel); }
private DataGridViewModel <Dictionary <string, object> > GetDataList(StoreBalanceDrawRequestQuery query) { DataGridViewModel <Dictionary <string, object> > dataGridViewModel = new DataGridViewModel <Dictionary <string, object> >(); if (query != null) { PageModel <StoreBalanceDrawRequestInfo> balanceDrawRequests = StoreBalanceHelper.GetBalanceDrawRequests(query, true); dataGridViewModel.rows = new List <Dictionary <string, object> >(); dataGridViewModel.total = balanceDrawRequests.Total; foreach (StoreBalanceDrawRequestInfo model in balanceDrawRequests.Models) { Dictionary <string, object> dictionary = model.ToDictionary(); dictionary.Add("RequestStateText", OnLinePaymentEnumHelper.GetOnLinePaymentDescription(model.RequestState)); dataGridViewModel.rows.Add(dictionary); } } return(dataGridViewModel); }
private DataGridViewModel <Dictionary <string, object> > GetListSplittinDraws(BalanceDrawRequestQuery query) { DataGridViewModel <Dictionary <string, object> > dataGridViewModel = new DataGridViewModel <Dictionary <string, object> >(); string empty = string.Empty; if (query != null) { DbQueryResult splittinDraws = MemberHelper.GetSplittinDraws(query, query.AuditStatus); List <Dictionary <string, object> > list = DataHelper.DataTableToDictionary(splittinDraws.Data); foreach (Dictionary <string, object> item in list) { SplittinDrawInfo splittinDrawInfo = item.ToObject <SplittinDrawInfo>(); item.Add("RequestStateStr", OnLinePaymentEnumHelper.GetOnLinePaymentDescription(splittinDrawInfo.RequestState)); if (splittinDrawInfo.RequestState.ToInt(0) == 3) { item.Add("RequestStateImgStr", "<i class='glyphicon glyphicon-question-sign' data-container='body' style='cursor: pointer' data-toggle='popover' data-placement='left' title='" + splittinDrawInfo.RequestError + "' ></i>"); } } dataGridViewModel.rows = list; dataGridViewModel.total = splittinDraws.TotalRecords; } return(dataGridViewModel); }