private DataSet GetData(bool isDownload = false) { var result = refundManager.GetRefundList(shopid, isDownload ? totalCount : this.pageSize, isDownload ? 1 : this.page, beginDate, endDate, payAmountMin, payAmountMax, refundNumber, orderNumber, customerName, customerTel, refundStatus, out this.totalCount); this.total.Value = totalCount.ToString(); if (result != null && result.Tables.Count > 0 && result.Tables[0].Rows.Count > 0) { DataRow dr; int count = result.Tables[0].Rows.Count; for (int i = 0; i < count; i++) { dr = result.Tables[0].Rows[i]; var refundnumber = dr["RefundNumber"].ToString(); var detail = refundManager.GetRefundDetail(refundnumber); dr["Detail"] = detail; dr["OrderNo"] = i + 1; var status = dr["refundStatus"] != null && dr["refundStatus"] != DBNull.Value ? dr["refundStatus"].ToString() : string.Empty; dr["RefundStatusDesc"] = GetRefundStatusItem(status); } result.AcceptChanges(); } return(result); }
public void GetRefund(string openID) { var managebll = new BLL.wx_diancai_tuidan_manage(); DataSet dr = managebll.GetRefundList(openID); if (dr.Tables[0].Rows.Count > 0) { var builder = new StringBuilder(); for (int i = 0; i < dr.Tables[0].Rows.Count; i++) { builder.Append("<ul>"); builder.Append("<li>"); builder.AppendFormat("<a href=\"diancai_RefundOrderDetail.aspx?wid={0}&shopid={1}&dingdan={2}&refundCode={3}&openid={4}\">", dr.Tables[0].Rows[i]["wid"].ToString(), dr.Tables[0].Rows[i]["shopinfoid"].ToString(), dr.Tables[0].Rows[i]["dingdan"].ToString(), dr.Tables[0].Rows[i]["refundCode"].ToString(), openId); builder.Append("<div class=\"info_01\">"); builder.AppendFormat("<h3>{0}</h3>", dr.Tables[0].Rows[i].Field <string>("hotelName")); builder.AppendFormat("<p>退款<b>¥{0}</b>共<b>{1}</b>件商品</p>", dr.Tables[0].Rows[i]["refundAmount"].ToString(), dr.Tables[0].Rows[i]["RefundCount"].ToString()); builder.Append("<span class=\"wave_blue_icon\"></span>"); builder.Append("</div>"); builder.Append("<div class=\"info_02\">"); builder.Append("<dl>"); builder.AppendFormat("<dd><b class=\"i_gray_icon\"></b>订单编号 {0}</dd>", dr.Tables[0].Rows[i]["orderNumber"].ToString()); builder.AppendFormat("<dd><b class=\"i_gray_icon\"></b>退单编号 {0}</dd>", dr.Tables[0].Rows[i]["refundCode"].ToString()); builder.AppendFormat("<dd><b class=\"time_gray_icon\"></b>退单日期 {0}</dd>", dr.Tables[0].Rows[i]["createDate"].ToString()); //此处应该有购票日期 builder.Append("</dl>"); builder.Append("</div>"); builder.Append("<div class=\"info_03\">"); var refundStatus = Convert.ToInt32(dr.Tables[0].Rows[i]["refundStatus"]); var statusDict = StatusManager.DishStatus.GetStatusDict(refundStatus); builder.AppendFormat("<span>{0}</span>", statusDict.StatusName); builder.Append("</div>"); builder.Append("</a>"); builder.Append("</li>"); builder.Append("</ul>"); } str = builder.ToString(); } }