public SearchResult SearchCustomerTransDetail(Sender sender, SearchCustomerTransDetailArgs args) { try { using (ObjectProxy op = new ObjectProxy()) { return(op.SearchCustomerTransDetail(args)); } } catch (Exception ex) { PLogger.LogError(ex); throw ex; } }
public void SearchTransDetail() { using (ProxyBE p = new ProxyBE()) { SearchCustomerTransDetailArgs args = new SearchCustomerTransDetailArgs(); args.RowNumberFrom = pagingParm.RowNumberFrom; args.RowNumberTo = pagingParm.RowNumberTo; args.OrderBy = "Created desc"; if (!string.IsNullOrEmpty(Request["QuoteID"])) { args.QuoteID = Guid.Parse(Request["QuoteID"]); } if (!string.IsNullOrEmpty(Request["CustomerID"])) { args.CustomerID = Guid.Parse(Request["CustomerID"]); } SearchResult sr = p.Client.SearchCustomerTransDetail(SenderUser, args); Response.Write(JSONHelper.Dataset2Json(sr.DataSet)); } }
public void GetCustomerTransAmount() { try { using (ProxyBE p = new ProxyBE()) { if (string.IsNullOrEmpty(Request["CustomerID"])) { throw new Exception("CustomerID:参数无效"); } if (string.IsNullOrEmpty(Request["QuoteID"])) { throw new Exception("QuoteID:参数无效"); } SearchCustomerTransDetailArgs args = new SearchCustomerTransDetailArgs(); args.CustomerID = Guid.Parse(Request["CustomerID"].ToString()); args.QuoteID = Guid.Parse(Request["QuoteID"].ToString()); SearchResult sr = p.Client.SearchCustomerTransDetail(SenderUser, args); if (sr.Total != 0) { decimal DisCount = 0.00m; foreach (DataRow dr in sr.DataSet.Tables[0].Rows) { DisCount += decimal.Parse(dr["Amount"].ToString()); } WriteMessage(1, DisCount.ToString()); } else { WriteMessage(1, "0"); } } } catch (Exception ex) { WriteError(ex.Message, ex); } }