private void BindRefund() { RefundApplyQuery refundQuery = this.GetRefundQuery(); DbQueryResult refundApplys = OrderHelper.GetRefundApplysMoney(refundQuery); this.dlstRefund.DataSource = refundApplys.Data; this.dlstRefund.DataBind(); this.pager.TotalRecords = refundApplys.TotalRecords; this.pager1.TotalRecords = refundApplys.TotalRecords; this.txtOrderId.Text = refundQuery.OrderId; this.txtHandler.Text = refundQuery.Operator; this.ddlHandleStatus.SelectedIndex = 0; this.calendarEndDate.Text = refundQuery.EndTime; this.calendarStartDate.Text = refundQuery.StratTime; if (refundQuery.HandleStatus.HasValue && refundQuery.HandleStatus.Value > -1) { this.ddlHandleStatus.SelectedValue = refundQuery.HandleStatus.Value.ToString(); } if (refundQuery.SupplierId.HasValue && refundQuery.SupplierId.Value > 0) { this.ddlSupplier.SelectedValue = refundQuery.SupplierId; } }
public void GetList(HttpContext context) { int num = 1; int num2 = 10; num = base.GetIntParam(context, "page", false).Value; if (num < 1) { num = 1; } num2 = base.GetIntParam(context, "rows", false).Value; if (num2 < 1) { num2 = 10; } RefundApplyQuery refundApplyQuery = new RefundApplyQuery(); refundApplyQuery.OrderId = Globals.UrlDecode(context.Request["OrderId"]); refundApplyQuery.HandleStatus = base.GetIntParam(context, "HandleStatus", true); refundApplyQuery.PageIndex = num; refundApplyQuery.PageSize = num2; refundApplyQuery.SortBy = "ApplyForTime"; refundApplyQuery.SortOrder = SortAction.Desc; DataGridViewModel <Dictionary <string, object> > dataList = this.GetDataList(refundApplyQuery); string s = base.SerializeObjectToJson(dataList); context.Response.Write(s); context.Response.End(); }
public DbQueryResult GetRefundApplys(RefundApplyQuery query) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(" 1=1"); if (!string.IsNullOrEmpty(query.OrderId)) { stringBuilder.AppendFormat(" AND OrderId = '{0}'", DataHelper.CleanSearchString(query.OrderId)); } if (query.HandleStatus.HasValue) { stringBuilder.AppendFormat(" AND HandleStatus = {0}", query.HandleStatus); } if (query.UserId.HasValue) { stringBuilder.AppendFormat(" AND UserId = {0}", query.UserId.Value); } if (!string.IsNullOrEmpty(query.StratTime)) { stringBuilder.AppendFormat(" and HandleTime>='{0}'", DataHelper.CleanSearchString(query.StratTime)); } if (!string.IsNullOrEmpty(query.EndTime)) { stringBuilder.AppendFormat(" and HandleTime<='{0} 23:59:59'", DataHelper.CleanSearchString(query.EndTime)); } return(DataHelper.PagingByRownumber(query.PageIndex, query.PageSize, query.SortBy, query.SortOrder, query.IsCount, "vw_Ecshop_OrderRefund", "RefundId", stringBuilder.ToString(), "*")); }
private void BindRefundNote() { RefundApplyQuery refundApplyQuery = new RefundApplyQuery(); if (!string.IsNullOrEmpty(this.Page.Request.QueryString["OrderId"])) { refundApplyQuery.OrderId = Globals.UrlDecode(this.Page.Request.QueryString["OrderId"]); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["StartDate"])) { refundApplyQuery.StratTime = Globals.UrlDecode(this.Page.Request.QueryString["StartDate"]); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["EndDate"])) { refundApplyQuery.EndTime = Globals.UrlDecode(this.Page.Request.QueryString["EndDate"]); } refundApplyQuery.HandleStatus = new int?(1); refundApplyQuery.PageIndex = this.pager.PageIndex; refundApplyQuery.PageSize = this.pager.PageSize; refundApplyQuery.SortBy = "HandleTime"; refundApplyQuery.SortOrder = SortAction.Desc; DbQueryResult refundApplys = OrderHelper.GetRefundApplys(refundApplyQuery); this.dlstRefundNote.DataSource = refundApplys.Data; this.dlstRefundNote.DataBind(); this.pager.TotalRecords = refundApplys.TotalRecords; this.pager1.TotalRecords = refundApplys.TotalRecords; this.txtOrderId.Text = refundApplyQuery.OrderId; this.calendarStartDate.Text = refundApplyQuery.StratTime; this.calendarEndDate.Text = refundApplyQuery.EndTime; }
/// <summary> /// 导出退款单信息 /// </summary> /// <param name="query"></param> /// <returns></returns> public DataSet ExportRefundApplys(RefundApplyQuery query) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("select * from vw_Ecshop_OrderRefund where 1=1"); if (!string.IsNullOrEmpty(query.OrderId)) { stringBuilder.AppendFormat(" AND OrderId = '{0}'", query.OrderId); } if (query.HandleStatus.HasValue) { stringBuilder.AppendFormat(" AND HandleStatus = {0}", query.HandleStatus); } if (query.UserId.HasValue) { stringBuilder.AppendFormat(" AND UserId = {0}", query.UserId.Value); } if (!string.IsNullOrEmpty(query.StratTime)) { stringBuilder.AppendFormat(" and HandleTime>='{0}'", query.StratTime); } if (!string.IsNullOrEmpty(query.EndTime)) { stringBuilder.AppendFormat(" and HandleTime<='{0} 23:59:59'", query.EndTime); } System.Data.Common.DbCommand sqlStringCommand = this.database.GetSqlStringCommand(stringBuilder.ToString()); return(this.database.ExecuteDataSet(sqlStringCommand)); }
private RefundApplyQuery GetRefundQuery() { RefundApplyQuery refundApplyQuery = new RefundApplyQuery(); int num = this.Page.Request.QueryString["afterSaleId"].ToInt(0); if (!string.IsNullOrEmpty(this.Page.Request.QueryString["OrderId"])) { refundApplyQuery.OrderId = Globals.UrlDecode(this.Page.Request.QueryString["OrderId"]); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["HandleStatus"])) { int num2 = 0; if (int.TryParse(this.Page.Request.QueryString["HandleStatus"], out num2) && num2 > -1) { refundApplyQuery.HandleStatus = num2; } } if (num > 0) { refundApplyQuery.RefundId = num; } refundApplyQuery.PageIndex = this.pager.PageIndex; refundApplyQuery.PageSize = this.pager.PageSize; refundApplyQuery.SortBy = "ApplyForTime"; refundApplyQuery.SortOrder = SortAction.Desc; return(refundApplyQuery); }
public void GetList(HttpContext context) { RefundApplyQuery dataQuery = this.GetDataQuery(context); DataGridViewModel <Dictionary <string, object> > dataList = this.GetDataList(dataQuery); string s = base.SerializeObjectToJson(dataList); context.Response.Write(s); context.Response.End(); }
public DbQueryResult GetAllSendNote(RefundApplyQuery query) { StringBuilder builder = new StringBuilder(); builder.Append(" 1=1"); if (!string.IsNullOrEmpty(query.OrderId)) { builder.AppendFormat(" and OrderId = '{0}'", query.OrderId); } return DataHelper.PagingByRownumber(query.PageIndex, query.PageSize, query.SortBy, query.SortOrder, query.IsCount, "vw_Hishop_OrderSendNote", "OrderId", builder.ToString(), "*"); }
public DbQueryResult GetAllSendNote(RefundApplyQuery query) { StringBuilder builder = new StringBuilder(); builder.Append(" 1=1"); if (!string.IsNullOrEmpty(query.OrderId)) { builder.AppendFormat(" and OrderId = '{0}'", query.OrderId); } return(DataHelper.PagingByRownumber(query.PageIndex, query.PageSize, query.SortBy, query.SortOrder, query.IsCount, "vw_Hishop_OrderSendNote", "OrderId", builder.ToString(), "*")); }
private void BindSendNote() { RefundApplyQuery refundApplyQuery = this.GetRefundApplyQuery(); DbQueryResult allSendNote = OrderHelper.GetAllSendNote(refundApplyQuery); this.dlstSendNote.DataSource = allSendNote.Data; this.dlstSendNote.DataBind(); this.pager.TotalRecords = allSendNote.TotalRecords; this.pager1.TotalRecords = allSendNote.TotalRecords; this.txtOrderId.Text = refundApplyQuery.OrderId; }
private void BindSendNote() { RefundApplyQuery refundApplyQuery = this.GetRefundApplyQuery(); DbQueryResult dbQueryResult = Methods.SendNote_Gets(refundApplyQuery, this.ctype); this.dlstSendNote.DataSource = dbQueryResult.Data; this.dlstSendNote.DataBind(); this.pager.TotalRecords = dbQueryResult.TotalRecords; this.pager1.TotalRecords = dbQueryResult.TotalRecords; this.txtOrderId.Text = refundApplyQuery.OrderId; this.drpOrderType.SelectedValue = this.ctype.ToString(); }
private RefundApplyQuery GetRefundApplyQuery() { RefundApplyQuery query = new RefundApplyQuery(); if (!string.IsNullOrEmpty(this.Page.Request.QueryString["OrderId"])) { query.OrderId = Globals.UrlDecode(this.Page.Request.QueryString["OrderId"]); } query.PageIndex = this.pager.PageIndex; query.PageSize = this.pager.PageSize; query.SortBy = "ShippingDate"; query.SortOrder = SortAction.Desc; return query; }
public void ExportToExcel(HttpContext context) { RefundApplyQuery refundApplyQuery = new RefundApplyQuery(); refundApplyQuery.OrderId = Globals.UrlDecode(context.Request["OrderId"]); refundApplyQuery.HandleStatus = base.GetIntParam(context, "HandleStatus", true); refundApplyQuery.RefundIds = context.Request["Ids"].ToNullString(); refundApplyQuery.SortBy = "ApplyForTime"; refundApplyQuery.SortOrder = SortAction.Desc; IList <RefundModel> refundApplysNoPage = OrderHelper.GetRefundApplysNoPage(refundApplyQuery); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("<table border='1'>"); stringBuilder.Append("<thead><tr>"); stringBuilder.Append("<th>售后编号</th>"); stringBuilder.Append("<th>会员名</th>"); stringBuilder.Append("<th>订单编号</th>"); stringBuilder.Append("<th>申请时间</th>"); stringBuilder.Append("<th>匹配门店</th>"); stringBuilder.Append("<th>处理状态</th>"); stringBuilder.Append("<th>退款原因</th>"); stringBuilder.Append("<th>退款金额</th>"); stringBuilder.Append("<th>处理时间</th>"); stringBuilder.Append("<th>退款途径</th>"); stringBuilder.Append("</tr></thead>"); StringBuilder stringBuilder2 = new StringBuilder(); foreach (RefundModel item in refundApplysNoPage) { stringBuilder2.Append("<tr>"); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(item.RefundId, true)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(item.UserName, true)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(item.OrderId, true)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(item.ApplyForTime, true)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD((item.StoreId.HasValue && item.StoreId.Value > 0) ? DepotHelper.GetStoreNameByStoreId(item.StoreId.Value) : "平台店", true)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(EnumDescription.GetEnumDescription((Enum)(object)item.HandleStatus, 0), true)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(item.RefundReason, true)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(item.RefundAmount, false)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(item.GetDealTime, false)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(EnumDescription.GetEnumDescription((Enum)(object)item.RefundType, 0), true)); stringBuilder2.Append("</tr>"); } stringBuilder.AppendFormat("<tbody>{0}</tbody></table>", stringBuilder2.ToString()); StringWriter stringWriter = new StringWriter(); stringWriter.Write(stringBuilder); DownloadHelper.DownloadFile(context.Response, stringWriter.GetStringBuilder(), "RefundApplys" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".xls"); stringWriter.Close(); context.Response.End(); }
private RefundApplyQuery GetRefundApplyQuery() { RefundApplyQuery query = new RefundApplyQuery(); if (!string.IsNullOrEmpty(this.Page.Request.QueryString["OrderId"])) { query.OrderId = Globals.UrlDecode(this.Page.Request.QueryString["OrderId"]); } query.PageIndex = this.pager.PageIndex; query.PageSize = this.pager.PageSize; query.SortBy = "ShippingDate"; query.SortOrder = SortAction.Desc; return(query); }
public PageModel <RefundModel> GetRefundApplys(RefundApplyQuery query) { query.OrderId = base.GetTrueOrderId(query.OrderId); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(" 1=1"); if (!string.IsNullOrEmpty(query.OrderId)) { stringBuilder.AppendFormat(" AND OrderId = '{0}'", query.OrderId); } if (query.HandleStatus.HasValue) { if (query.HandleStatus.Value != 3) { stringBuilder.AppendFormat(" AND HandleStatus = {0}", query.HandleStatus); } else { stringBuilder.AppendFormat(" AND HandleStatus = {0} AND ExceptionInfo IS NOT NULL AND ExceptionInfo <>''", 0); } } if (query.UserId.HasValue) { stringBuilder.AppendFormat(" AND UserId = {0}", query.UserId.Value); } if (query.StoreId.HasValue && query.StoreId > 0) { stringBuilder.AppendFormat(" AND StoreId = {0}", query.StoreId.Value); } if (query.RefundId.HasValue) { stringBuilder.AppendFormat(" AND RefundId = {0}", query.RefundId.Value); } if (query.SupplierId.HasValue) { if (query.SupplierId == -1) { stringBuilder.Append(" AND SupplierId > 0 "); } else { stringBuilder.AppendFormat(" AND SupplierId = {0} ", query.SupplierId.Value); } } else if (query.UserId.ToInt(0) <= 0) { stringBuilder.Append(" and ISNULL(SupplierId,0)=0 "); } return(DataHelper.PagingByRownumber <RefundModel>(query.PageIndex, query.PageSize, query.SortBy, query.SortOrder, query.IsCount, "vw_Hishop_OrderRefund", "RefundId", stringBuilder.ToString(), "*")); }
private void BindRefund() { RefundApplyQuery refundQuery = this.GetRefundQuery(); DbQueryResult refundApplys = TradeHelper.GetRefundApplys(refundQuery, HiContext.Current.User.UserId); this.listRefunds.DataSource = refundApplys.Data; this.listRefunds.DataBind(); this.pager.TotalRecords = refundApplys.TotalRecords; this.txtOrderId.Text = refundQuery.OrderId; this.ddlHandleStatus.SelectedIndex = 0; if (refundQuery.HandleStatus.HasValue && refundQuery.HandleStatus.Value > -1) { this.ddlHandleStatus.SelectedValue = refundQuery.HandleStatus.Value.ToString(); } }
public override DbQueryResult GetRefundApplys(RefundApplyQuery query, int userId) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendFormat(" UserId={0}", userId); if (!string.IsNullOrEmpty(query.OrderId)) { stringBuilder.AppendFormat(" and OrderId = '{0}'", query.OrderId); } if (query.HandleStatus.HasValue) { stringBuilder.AppendFormat(" AND HandleStatus = {0}", query.HandleStatus); } return(DataHelper.PagingByRownumber(query.PageIndex, query.PageSize, query.SortBy, query.SortOrder, query.IsCount, "vw_Hishop_OrderRefund", "RefundId", stringBuilder.ToString(), "*")); }
private void BindRefund() { RefundApplyQuery refundQuery = this.GetRefundQuery(); DbQueryResult refundApplys = SubsiteSalesHelper.GetRefundApplys(refundQuery); this.dlstRefund.DataSource = refundApplys.Data; this.dlstRefund.DataBind(); this.pager.TotalRecords = refundApplys.TotalRecords; this.pager1.TotalRecords = refundApplys.TotalRecords; this.txtOrderId.Text = refundQuery.OrderId; this.ddlHandleStatus.SelectedIndex = 0; if (refundQuery.HandleStatus.HasValue && (refundQuery.HandleStatus.Value > -1)) { this.ddlHandleStatus.SelectedValue = refundQuery.HandleStatus.Value.ToString(); } }
public void ExportToExcel(HttpContext context) { RefundApplyQuery dataQuery = this.GetDataQuery(context); dataQuery.RefundIds = context.Request["Ids"].ToNullString(); IList <RefundModel> refundApplysNoPage = OrderHelper.GetRefundApplysNoPage(dataQuery); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("<table border='1'>"); stringBuilder.Append("<thead><tr>"); stringBuilder.Append("<th>编号</th>"); stringBuilder.Append("<th>会员名</th>"); stringBuilder.Append("<th>订单编号</th>"); stringBuilder.Append("<th>申请时间</th>"); stringBuilder.Append("<th>供应商</th>"); stringBuilder.Append("<th>处理状态</th>"); stringBuilder.Append("<th>退款原因</th>"); stringBuilder.Append("<th>退款金额</th>"); stringBuilder.Append("<th>处理时间</th>"); stringBuilder.Append("<th>退款途径</th>"); stringBuilder.Append("</tr></thead>"); StringBuilder stringBuilder2 = new StringBuilder(); foreach (RefundModel item in refundApplysNoPage) { stringBuilder2.Append("<tr>"); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(item.RefundId, true)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(item.UserName, true)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(item.OrderId, true)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(item.ApplyForTime, true)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD((item.SupplierId > 0) ? SupplierHelper.GetSupplierName(item.SupplierId) : "平台店", true)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(EnumDescription.GetEnumDescription((Enum)(object)item.HandleStatus, 0), true)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(item.RefundReason, true)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(item.RefundAmount, false)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(item.GetDealTime, false)); stringBuilder2.Append(ExcelHelper.GetXLSFieldsTD(EnumDescription.GetEnumDescription((Enum)(object)item.RefundType, 0), true)); stringBuilder2.Append("</tr>"); } stringBuilder.AppendFormat("<tbody>{0}</tbody></table>", stringBuilder2.ToString()); StringWriter stringWriter = new StringWriter(); stringWriter.Write(stringBuilder); DownloadHelper.DownloadFile(context.Response, stringWriter.GetStringBuilder(), "SupplierRefundApplys" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".xls"); stringWriter.Close(); context.Response.End(); }
private void BindRefund() { RefundApplyQuery refundQuery = this.GetRefundQuery(); refundQuery.UserId = new int?(HiContext.Current.User.UserId); //DbQueryResult refundApplys = TradeHelper.GetRefundApplys(refundQuery); //this.rptApply.DataSource = refundApplys.Data; this.rptApply.DataSource = TradeHelper.NewGetRefundApplys(refundQuery); this.rptApply.DataBind(); //this.pager.TotalRecords = refundApplys.TotalRecords; //this.txtOrderId.Value = refundQuery.OrderId; //this.handleStatus.SelectedIndex = 0; //if (refundQuery.HandleStatus.HasValue && refundQuery.HandleStatus.Value > -1) //{ // this.handleStatus.Value = refundQuery.HandleStatus.Value.ToString(); //} }
protected override void AttachChildControls() { PageTitle.AddSiteNameTitle("退款记录"); int.TryParse(this.Page.Request.QueryString["Status"], out this.Status); this.rptUserRefunds = (AppshopTemplatedRepeater)this.FindControl("rptUserRefunds"); this.rptUserRefunds.ItemDataBound += this.rptUserRefunds_ItemDataBound; this.txtTotalPages = (HtmlInputHidden)this.FindControl("txtTotal"); int pageIndex = default(int); if (!int.TryParse(this.Page.Request.QueryString["page"], out pageIndex)) { pageIndex = 1; } int pageSize = default(int); if (!int.TryParse(this.Page.Request.QueryString["size"], out pageSize)) { pageSize = 20; } RefundApplyQuery refundApplyQuery = new RefundApplyQuery(); if (!string.IsNullOrEmpty(this.Page.Request.QueryString["OrderId"])) { refundApplyQuery.OrderId = Globals.UrlDecode(this.Page.Request.QueryString["OrderId"]); } if (int.TryParse(this.Page.Request.QueryString["Status"], out this.Status) && this.Status > -1) { refundApplyQuery.HandleStatus = this.Status; } refundApplyQuery.PageIndex = pageIndex; refundApplyQuery.PageSize = pageSize; refundApplyQuery.SortBy = "ApplyForTime"; refundApplyQuery.SortOrder = SortAction.Desc; refundApplyQuery.UserId = HiContext.Current.UserId; int num = 0; PageModel <RefundModel> refundApplys = TradeHelper.GetRefundApplys(refundApplyQuery); this.rptUserRefunds.DataSource = refundApplys.Models; this.rptUserRefunds.DataBind(); num = refundApplys.Total; this.txtTotalPages.SetWhenIsNotNull(num.ToString()); }
public DataSet NewGetRefundApplys(RefundApplyQuery query) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(" 1=1"); if (!string.IsNullOrEmpty(query.OrderId)) { stringBuilder.AppendFormat(" AND OrderId = '{0}'", DataHelper.CleanSearchString(query.OrderId)); } if (query.HandleStatus.HasValue) { stringBuilder.AppendFormat(" AND HandleStatus = {0}", query.HandleStatus); } if (query.UserId.HasValue) { stringBuilder.AppendFormat(" AND UserId = {0}", query.UserId.Value); } if (!string.IsNullOrEmpty(query.StratTime)) { stringBuilder.AppendFormat(" and HandleTime>='{0}'", DataHelper.CleanSearchString(query.StratTime)); } if (!string.IsNullOrEmpty(query.EndTime)) { stringBuilder.AppendFormat(" and HandleTime<='{0} 23:59:59'", DataHelper.CleanSearchString(query.EndTime)); } string sqlText = "SELECT * FROM vw_Ecshop_OrderRefund where "; sqlText += stringBuilder.ToString(); sqlText += " order by RefundId desc ;"; sqlText = sqlText + " SELECT OrderId, ThumbnailsUrl, ItemDescription, SKUContent, SKU, ProductId FROM Ecshop_OrderItems WHERE OrderId IN (SELECT OrderId FROM Ecshop_Orders WHERE " + stringBuilder.ToString() + ")"; DbCommand sqlStringCommand = this.database.GetSqlStringCommand(sqlText); DataSet dataSet = this.database.ExecuteDataSet(sqlStringCommand); DataColumn parentColumn = dataSet.Tables[0].Columns["OrderId"]; DataColumn childColumn = dataSet.Tables[1].Columns["OrderId"]; DataRelation relation = new DataRelation("OrderItems", parentColumn, childColumn, false); dataSet.Relations.Add(relation); return(dataSet); }
private void BindRefund() { RefundApplyQuery refundQuery = this.GetRefundQuery(); refundQuery.UserId = HiContext.Current.UserId; PageModel <RefundModel> refundApplys = TradeHelper.GetRefundApplys(refundQuery); this.RefundList.DataSource = refundApplys.Models; this.RefundList.DataBind(); this.pager.TotalRecords = refundApplys.Total; this.txtOrderId.Value = refundQuery.OrderId; if (refundQuery.RefundId.HasValue) { this.txtAfterSaleId.Text = refundQuery.RefundId.Value.ToString(); } if (refundQuery.HandleStatus.HasValue && refundQuery.HandleStatus.Value > -1) { this.handleStatus.SelectedValue = refundQuery.HandleStatus.Value; } }
private DataGridViewModel <Dictionary <string, object> > GetDataList(RefundApplyQuery query) { DataGridViewModel <Dictionary <string, object> > dataGridViewModel = new DataGridViewModel <Dictionary <string, object> >(); if (query != null) { PageModel <RefundModel> refundApplys = OrderHelper.GetRefundApplys(query); dataGridViewModel.rows = new List <Dictionary <string, object> >(); dataGridViewModel.total = refundApplys.Total; foreach (RefundModel model in refundApplys.Models) { Dictionary <string, object> dictionary = model.ToDictionary(); dictionary.Add("HandleTime", this.GetHandleTime(model)); dictionary.Add("OperText", this.GetOperText(model.HandleStatus)); dictionary.Add("StatusStr", this.GetStatusText(model.HandleStatus, model.ExceptionInfo.ToNullString())); dataGridViewModel.rows.Add(dictionary); } } return(dataGridViewModel); }
private void BindRefundNote() { RefundApplyQuery refundApplyQuery = new RefundApplyQuery(); if (!string.IsNullOrEmpty(this.Page.Request.QueryString["PurchaseOrderId"])) { refundApplyQuery.OrderId = Globals.UrlDecode(this.Page.Request.QueryString["PurchaseOrderId"]); } refundApplyQuery.HandleStatus = new int?(1); refundApplyQuery.PageIndex = this.pager.PageIndex; refundApplyQuery.PageSize = this.pager.PageSize; refundApplyQuery.SortBy = "HandleTime"; refundApplyQuery.SortOrder = SortAction.Desc; DbQueryResult purchaseRefundApplys = SalesHelper.GetPurchaseRefundApplys(refundApplyQuery); this.dlstRefundNote.DataSource = purchaseRefundApplys.Data; this.dlstRefundNote.DataBind(); this.pager.TotalRecords = purchaseRefundApplys.TotalRecords; this.pager1.TotalRecords = purchaseRefundApplys.TotalRecords; this.txtPurchaseOrderId.Text = refundApplyQuery.OrderId; }
private void BindRefundNote() { RefundApplyQuery query = new RefundApplyQuery(); if (!string.IsNullOrEmpty(this.Page.Request.QueryString["OrderId"])) { query.OrderId = Globals.UrlDecode(this.Page.Request.QueryString["OrderId"]); } query.HandleStatus = 1; query.PageIndex = this.pager.PageIndex; query.PageSize = this.pager.PageSize; query.SortBy = "HandleTime"; query.SortOrder = SortAction.Desc; DbQueryResult refundApplys = OrderHelper.GetRefundApplys(query); this.dlstRefundNote.DataSource = refundApplys.Data; this.dlstRefundNote.DataBind(); this.pager.TotalRecords = refundApplys.TotalRecords; this.pager1.TotalRecords = refundApplys.TotalRecords; this.txtOrderId.Text = query.OrderId; }
private RefundApplyQuery GetRefundQuery() { RefundApplyQuery refundApplyQuery = new RefundApplyQuery(); if (!string.IsNullOrEmpty(this.Page.Request.QueryString["OrderId"])) { refundApplyQuery.OrderId = Globals.UrlDecode(this.Page.Request.QueryString["OrderId"]); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["Operator"])) { refundApplyQuery.Operator = Globals.UrlDecode(this.Page.Request.QueryString["Operator"]); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["SupplierId"])) { int supplierId; int.TryParse(this.Page.Request.QueryString["SupplierId"], out supplierId); refundApplyQuery.SupplierId = supplierId; } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["HandleStatus"])) { int num = 0; if (int.TryParse(this.Page.Request.QueryString["HandleStatus"], out num) && num > -1) { refundApplyQuery.HandleStatus = new int?(num); } } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["StartTime"])) { refundApplyQuery.StratTime = this.Page.Request.QueryString["StartTime"]; } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["StartTime"])) { refundApplyQuery.EndTime = this.Page.Request.QueryString["EndtTime"]; } refundApplyQuery.PageIndex = this.pager.PageIndex; refundApplyQuery.PageSize = this.pager.PageSize; refundApplyQuery.SortBy = "ApplyForTime"; refundApplyQuery.SortOrder = SortAction.Desc; return(refundApplyQuery); }
private RefundApplyQuery GetRefundQuery() { RefundApplyQuery query = new RefundApplyQuery(); if (!string.IsNullOrEmpty(this.Page.Request.QueryString["OrderId"])) { query.OrderId = Globals.UrlDecode(this.Page.Request.QueryString["OrderId"]); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["HandleStatus"])) { int result = 0; if (int.TryParse(this.Page.Request.QueryString["HandleStatus"], out result) && (result > -1)) { query.HandleStatus = new int?(result); } } query.PageIndex = this.pager.PageIndex; query.PageSize = this.pager.PageSize; query.SortBy = "ApplyForTime"; query.SortOrder = SortAction.Desc; return(query); }
private RefundApplyQuery GetDataQuery(HttpContext context) { RefundApplyQuery refundApplyQuery = new RefundApplyQuery(); refundApplyQuery.OrderId = base.GetParameter(context, "OrderId", true); refundApplyQuery.HandleStatus = base.GetIntParam(context, "HandleStatus", true); int?intParam = base.GetIntParam(context, "SupplierId", true); if (intParam.HasValue) { refundApplyQuery.SupplierId = intParam.Value; } else { refundApplyQuery.SupplierId = -1; } refundApplyQuery.PageIndex = base.CurrentPageIndex; refundApplyQuery.PageSize = base.CurrentPageSize; refundApplyQuery.SortBy = "ApplyForTime"; refundApplyQuery.SortOrder = SortAction.Desc; return(refundApplyQuery); }
private RefundApplyQuery GetRefundQuery() { RefundApplyQuery refundApplyQuery = new RefundApplyQuery(); if (!string.IsNullOrEmpty(this.Page.Request.QueryString["OrderId"])) { refundApplyQuery.OrderId = Globals.UrlDecode(this.Page.Request.QueryString["OrderId"]); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["HandleStatus"])) { int num = 0; if (int.TryParse(this.Page.Request.QueryString["HandleStatus"], out num) && num > -1) { refundApplyQuery.HandleStatus = new int?(num); } } refundApplyQuery.PageIndex = 1; refundApplyQuery.PageSize = 100; refundApplyQuery.SortBy = "ApplyForTime"; refundApplyQuery.SortOrder = SortAction.Desc; return(refundApplyQuery); }
public static DbQueryResult GetAllSendNote(RefundApplyQuery query) { return(new SendNoteDao().GetAllSendNote(query)); }
public static DbQueryResult GetRefundApplys(RefundApplyQuery query) { return(SalesProvider.Instance().GetRefundApplys(query)); }
public static DbQueryResult GetAllSendNote(RefundApplyQuery query) { return new SendNoteDao().GetAllSendNote(query); }