public void PrintReceipt(Resolver resolver) { Receipt receipt = receiptMgr.LoadReceipt(resolver.Code, true); receipt.ReceiptDetails = receiptDetailMgr.SummarizeReceiptDetails(receipt.ReceiptDetails); IList <object> list = new List <object>(); list.Add(receipt); list.Add(receipt.ReceiptDetails); resolver.PrintUrl = reportMgr.WriteToFile("ReceiptNotes.xls", list); }
public void TransferOrder(Resolver resolver) { IList <OrderDetail> orderDetails = executeMgr.ConvertResolverToOrderDetails(resolver); Receipt receipt = orderMgr.QuickReceiveOrder(resolver.Code, orderDetails, resolver.UserCode); #region Print if (resolver.NeedPrintReceipt && resolver.IsCSClient) { receipt.ReceiptDetails = receiptDetailMgr.SummarizeReceiptDetails(receipt.ReceiptDetails); IList <object> list = new List <object>(); list.Add(receipt); list.Add(receipt.ReceiptDetails); resolver.PrintUrl = reportMgr.WriteToFile("ReceiptNotes.xls", list); } #endregion resolver.Result = languageMgr.TranslateMessage("Receipt.Transfer.Successfully", resolver.UserCode, receipt.ReceiptNo); resolver.Code = receipt.ReceiptNo; resolver.Transformers = null;//TransformerHelper.ConvertReceiptToTransformer(receipt.ReceiptDetails); resolver.Command = BusinessConstants.CS_BIND_VALUE_TRANSFORMER; }
private void PrintReceipt(Resolver resolver, string[] region) { DetachedCriteria criteria = DetachedCriteria.For(typeof(Receipt)); criteria.Add(Expression.Eq("IsPrinted", false)); criteria.Add(Expression.Eq("NeedPrint", true)); criteria.Add(Expression.In("PartyTo.Code", region)); IList <Receipt> receiptList = criteriaMgr.FindAll <Receipt>(criteria); List <ReceiptNote> receiptNotes = new List <ReceiptNote>(); if (receiptList != null && receiptList.Count > 0) { foreach (Receipt receipt in receiptList) { IList <object> list = new List <object>(); list.Add(receipt); list.Add(receiptDetailMgr.SummarizeReceiptDetails(receipt.ReceiptDetails)); string newUrl = reportMgr.WriteToFile(receipt.ReceiptTemplate, list); receipt.IsPrinted = true;//to be refactored receiptMgr.UpdateReceipt(receipt); ReceiptNote receiptNote = Receipt2ReceiptNote(receipt); receiptNote.PrintUrl = newUrl; receiptNotes.Add(receiptNote); } } if (resolver.ReceiptNotes == null) { resolver.ReceiptNotes = receiptNotes; } else { IListHelper.AddRange <ReceiptNote>(resolver.ReceiptNotes, receiptNotes); } }