void Query(Pagination pagination) { try { var oem = OEMService.QueryOEM(CurrentCompany.CompanyId); Range <DateTime> time = new Range <DateTime> { Lower = DateTime.Parse(txtStartTime.Text), Upper = DateTime.Parse(txtEndTime.Text) }; var query_list = IntegralServer.GetIntegralConsumptionList(time, null, IntegralWay.Exchange, (ExchangeState)int.Parse(XiaoFei.Value), null, "1", oem == null ? (Guid?)null : oem.Id, pagination); var list = from item in query_list select new { ID = item.Id, item.ExchangeTiem, item.CommodityName, item.CompanyShortName, item.AccountNo, item.AccountName, Count = item.CommodityCount, Integral = item.ConsumptionIntegral, Phone = item.AccountPhone, Exchange = item.Exchange.GetDescription(), item.ConsumptionIntegral, Remark = item.Way == IntegralWay.ExchangeSms ? "" : (item.OEMCommodityState == OEMCommodityState.Processing ? "<a href='javascript:shengqi(\"" + item.Id + "\");'>申请平台处理</a>" : item.Exchange == ExchangeState.Processing ? "平台正在处理" : "平台已处理") }; grv_xiaofei.DataSource = list; grv_xiaofei.DataBind(); if (query_list.Any()) { this.pager.Visible = true; showempty.Visible = false; if (pagination.GetRowCount) { this.pager.RowCount = pagination.RowCount; } grv_xiaofei.HeaderRow.TableSection = TableRowSection.TableHeader; } else { pager.Visible = false; showempty.Visible = true; } } catch (Exception ex) { pager.Visible = false; showempty.Visible = true; ShowExceptionMessage(ex, "查询"); } }
void Query(Pagination pagination) { try { Range <DateTime> time = new Range <DateTime> { Lower = DateTime.Parse(txtStartTime.Text), Upper = DateTime.Parse(txtEndTime.Text) }; var query_list = IntegralServer.GetIntegralConsumptionList(time, null, IntegralWay.Exchange, (ExchangeState)int.Parse(XiaoFei.Value), CurrentCompany.CompanyType == CompanyType.Platform ? Common.Enums.OEMCommodityState.Success : (OEMCommodityState?)null, "1", null, pagination); var list = from item in query_list select new { ID = item.Id, item.ExchangeTiem, item.CommodityName, item.CompanyShortName, item.AccountNo, item.AccountName, Count = item.CommodityCount, Integral = item.ConsumptionIntegral, Phone = item.AccountPhone, Exchange = item.Exchange.GetDescription(), item.ConsumptionIntegral, OEMName = item.OEMName, Remark = item.Exchange == ExchangeState.Processing ? "<a href='CommodityExChange.aspx?id=" + item.Id + "&type=chuli'>兑换处理</a>" : "<a href='CommodityExChange.aspx?id=" + item.Id + "&type=look'>查看详细</a>" }; grv_xiaofei.DataSource = list; grv_xiaofei.DataBind(); if (query_list.Any()) { this.pager.Visible = true; showempty.Visible = false; if (pagination.GetRowCount) { this.pager.RowCount = pagination.RowCount; } grv_xiaofei.HeaderRow.TableSection = TableRowSection.TableHeader; } else { pager.Visible = false; showempty.Visible = true; } } catch (Exception ex) { pager.Visible = false; showempty.Visible = true; ShowExceptionMessage(ex, "查询"); } }
void Query(Pagination pagination) { try { Range <DateTime> time = new Range <DateTime> { Lower = DateTime.Parse(txtStartTime.Text), Upper = DateTime.Parse(txtEndTime.Text) }; var query_list = IntegralServer.GetIntegralConsumptionList(time, CurrentUser.Owner, (IntegralWay)int.Parse(XiaoFei.Value), ExchangeState.All, null, "", null, pagination); var list = from item in query_list select new { item.ExchangeTiem, Way = item.Way.GetDescription(), item.ConsumptionIntegral, Remark = item.Exchange == ExchangeState.Refuse ? "拒绝兑换商品,拒绝原因:<br />" + item.Reason + "<br /><a href='javascript:show(\"" + item.CommodityName + "\",\"" + item.CommodityCount + "\",\"" + item.ConsumptionIntegral + "\",\"" + item.DeliveryAddress + "\",\"" + item.ExpressCompany + "\",\"" + item.ExpressDelivery + "\",\"" + item.Exchange + "\");'>" + item.CommodityName + " | " + item.CommodityCount + "件</a>" : item.Way == IntegralWay.Exchange || item.Way == IntegralWay.ExchangeSms ? "<a href='javascript:show(\"" + item.CommodityName + "\",\"" + item.CommodityCount + "\",\"" + item.ConsumptionIntegral + "\",\"" + item.DeliveryAddress + "\",\"" + item.ExpressCompany + "\",\"" + item.ExpressDelivery + "\",\"" + item.Exchange + "\");'>" + item.CommodityName + " | " + item.CommodityCount + "件</a>" : (item.Way == IntegralWay.TuiPiao ? "<a href='/OrderModule/Purchase/RefundApplyformDetail.aspx?id=" + item.Remark + "'>" + item.Remark + "</a>" : item.Way.GetDescription()) }; grv_xiaofei.DataSource = list; grv_xiaofei.DataBind(); if (query_list.Any()) { this.pager.Visible = true; showempty.Visible = false; if (pagination.GetRowCount) { this.pager.RowCount = pagination.RowCount; } grv_xiaofei.HeaderRow.TableSection = TableRowSection.TableHeader; } else { pager.Visible = false; showempty.Visible = true; } } catch (Exception ex) { pager.Visible = false; showempty.Visible = true; ShowExceptionMessage(ex, "查询"); } }