本文整理汇总了C#中Entities.Trace.Document类的典型用法代码示例。如果您正苦于以下问题:C# Document类的具体用法?C# Document怎么用?C# Document使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Document类属于Entities.Trace命名空间,在下文中一共展示了Document类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetReportInformation
public ReportHeaderFormat GetReportInformation(Document document, string template)
{
DataSet result = new DataSet();
// quitamos temporalmente el location del Documento, para q no busque por ese filtro
Location loc_doc = document.Location;
document.Location = null;
//Obtiene los datos del documento a procesar cuando el reporte es de tipo documento
document = Factory.DaoDocument().Select(new Document { DocID = document.DocID }).First(); //.SelectById(document);
document.Company = Factory.DaoCompany().SelectById(document.Company);
document.Location = loc_doc;
//Convert Object To DataSet
if (template == WmsSetupValues.HAZMAT_REPORT)
return ProcessHeaderAndDetailsForHAZMAT(document);
else
{ //DEFAULT
//Si es Shipment hace un tratamiento especial del document
if (document.DocType.DocTypeID == SDocType.SalesShipment)
return ProcessHeaderAndDetailsForShipment(document);
else if (document.DocType.DocTypeID == SDocType.CountTask)
return ProcessHeaderAndDetailsForCounting(document);
else
return ProcessHeaderAndDetails(document);
}
}
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:34,代码来源:ReportMngr.Document.cs
示例2: CreateNewDocument
public Document CreateNewDocument(Document data, Boolean autocommit)
{
//Start Transaction
Factory.IsTransactional = true;
//Asigna el consecutivo obtenido a el documento
if (string.IsNullOrEmpty(data.DocNumber))
data.DocNumber = GetNextDocSequence(data.Company, data.DocType).CodeSequence;
//Informacion del Documento
Account defaultAccount = WType.GetAccount(new Account { AccountCode = WmsSetupValues.DEFAULT });
data.Customer = (data.Customer == null) ? defaultAccount : data.Customer;
data.Vendor = (data.Vendor == null) ? defaultAccount : data.Vendor;
data.DocStatus = (data.DocStatus == null) ? WType.GetStatus(new Status { StatusID = DocStatus.New }) : data.DocStatus;
if (data.DocConcept == null)
data.DocConcept = WType.GetDefaultConcept(data.DocType.DocClass);
data.CreationDate = DateTime.Now;
data.CreatedBy = (data.CreatedBy != null) ? data.CreatedBy : "";
data.PickMethod = data.DocType.PickMethod;
//Salva el documento nuevo y lo retorna
data = Factory.DaoDocument().Save(data);
if (autocommit)
Factory.Commit();
data.DocumentLines = new List<DocumentLine>();
return data;
}
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:34,代码来源:DocumentMngr.cs
示例3: Select
public IList<Document> Select(Document data)
{
IList<Document> datos = new List<Document>();
try
{
datos = GetHsql(data).List<Document>();
//if (!Factory.IsTransactional)
// Factory.Commit();
}
catch (Exception e)
{
NHibernateHelper.WriteEventLog(WriteLog.GetTechMessage(e));
}
return datos;
}
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:18,代码来源:DaoDocument.cs
示例4: GetDocumentSuggestedBins
public Dictionary<int,object[]> GetDocumentSuggestedBins(Document document, Location location, PickMethod pickMethod, short binDirection)
{
string result = "";
string firstBin = "";
IList<ProductStock> list = Factory.DaoLabel().GetDocumentSuggestedBins(document, location, pickMethod);
IList<Bin> resultBin = new List<Bin>();
Dictionary<int, object[]> resultDictionary = new Dictionary<int, object[]>();
foreach (Product product in list.Select(p => p.Product).Distinct())
{
if (list == null || list.Count == 0)
{
if (!resultDictionary.ContainsKey(product.ProductID))
resultDictionary.Add(product.ProductID, new object[] { "NO STOCK", WmsSetupValues.MaxBinRank, firstBin });
}
IList<ZoneBinRelation> listBin = GetAssignedBinsList(product, location);
foreach (ProductStock ps in list.Where(f=>f.Product.ProductID == product.ProductID).OrderBy(f => f.Bin.Rank))
{
if (binDirection == BinType.In_Out)
{
result += ps.Bin.BinCode + " (";
if (ps.PackStock + ps.Stock > 0)
result += (ps.PackStock + ps.Stock).ToString();
result += ")\n";
resultBin.Add(ps.Bin);
if (string.IsNullOrEmpty(firstBin))
firstBin = ps.Bin.BinCode;
}
else
{
if (listBin != null && listBin.Any(f => f.Bin.BinID == ps.Bin.BinID && f.BinType != binDirection))
continue;
if (binDirection == BinType.Exclude_Out && ps.BinType == BinType.Out_Only)
continue;
if (binDirection == BinType.Exclude_In && ps.BinType == BinType.In_Only)
continue;
result += ps.Bin.BinCode + " (";
if (ps.PackStock + ps.Stock > 0)
result += (ps.PackStock + ps.Stock).ToString();
result += ")\n";
resultBin.Add(ps.Bin);
if (string.IsNullOrEmpty(firstBin))
firstBin = ps.Bin.BinCode;
}
if (!resultDictionary.ContainsKey(product.ProductID))
resultDictionary.Add(product.ProductID, new object[] { result, resultBin[0].Rank, firstBin });
}
}
return resultDictionary;
}
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:72,代码来源:BasicMngr.cs
示例5: ValidateReceiptDocumentTrackingOptions
public Boolean ValidateReceiptDocumentTrackingOptions(Document data, Node node, Boolean autoThrow)
{
//Hace que traiga las lineas in lazy = true
Factory.IsTransactional = true;
//Validate company is linked to ERP
/*
if (Factory.DaoConfigOptionByCompany()
.Select(new ConfigOptionByCompany
{
ConfigOption = new ConfigOption { Code = "WITHERP" },
Company = data.Company,
}
).FirstOrDefault().Value == "F")
return true;
*/
//Saco los productos del document que requieren track options
IList<Product> productList;
if (data.IsFromErp == true)
productList = Factory.DaoDocumentLine().Select(new DocumentLine { Document = data })
.Select(f => f.Product).Where(f => f.ProductTrack != null && f.ProductTrack.Count > 0)
.Distinct().ToList();
else
productList = Factory.DaoDocumentBalance().PostingBalance(
new DocumentBalance { Document = data, Location = data.Location, Node = node })
.Select(f => f.Product).ToList();
if (productList == null || productList.Count == 0)
return true; //No tiene track option ninguno de los productos
//Busca si todos los items tienen el track que necesitan.
string errorMsg = "";
NodeTrace pattern = null;
foreach (Product product in productList)
{
if (product.ProductTrack == null || product.ProductTrack.Count == 0) //product.ErpTrackOpt == 0 ||
continue;
//Para las que no son unique //LOTES/FECHAS etc.
foreach (ProductTrackRelation pt in product.ProductTrack.Where(f => f.TrackOption.IsUnique != true && f.TrackOption.DataType.DataTypeID != SDataTypes.ProductQuality))
{
if (Factory.DaoNodeTrace().GetRecordWithoutTrackOption(data, pt, node).Count > 0)
{
//errorMsg += "Product " + pt.Product.Name + " require " + pt.TrackOption.DisplayName + ".\n";
errorMsg += "Some " + pt.TrackOption.DisplayName + " for product " + product.ProductCode + " are missing.\n";
continue;
}
}
//Para productos unique, los labels de tipo 1002 deben tener X hijos de tipo 1005
foreach (ProductTrackRelation pt in product.ProductTrack.Where(f => f.IsUnique == true))
{
pattern = new NodeTrace
{
Document = data,
Label = new Label { Product = product, LabelType = new DocumentType { DocTypeID = LabelType.ProductLabel } },
Node = node
};
if (Factory.DaoNodeTrace().Select(pattern).Select(f => f.Label).Sum(f => f.CurrQty) > 0)
{
//errorMsg += "Product " + pt.Product.Name + " require " + pt.TrackOption.DisplayName + ".\n";
errorMsg += "Some " + pt.TrackOption.DisplayName + " for product " + product.ProductCode + " are missing.\n";
continue;
}
}
}
if (!string.IsNullOrEmpty(errorMsg))
if (autoThrow)
{
Factory.Rollback();
throw new Exception(errorMsg + "Please enter data before process.");
}
else
return false;
Factory.Commit();
Factory.IsTransactional = false;
return true;
}
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:89,代码来源:BasicMngr.cs
示例6: ChangeLabelLocationV2
public Label ChangeLabelLocationV2(Label labelSource, Label labelDest, Document document)
{
return TranMngr.ChangeLabelLocationV2(labelSource, labelDest, document);
}
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:4,代码来源:Control.cs
示例7: GetDocumentLabelAvailable
public IList<Label> GetDocumentLabelAvailable(Document data, Label searchLabel)
{
if (data.DocType != null && data.DocType.DocTypeID == SDocType.WarehouseTransferReceipt)
{
//Get the posting shipment
Document shipment;
try
{
shipment = Factory.DaoDocument().Select(
new Document { DocNumber = data.CustPONumber, Company = data.Company }).First();
}
catch {
return null;
}
return Factory.DaoLabel().GetDocumentLabelAvailableFromTransfer(data, shipment, null);
}
else
return Factory.DaoLabel().GetDocumentLabelAvailable(data, searchLabel);
}
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:20,代码来源:Control.cs
示例8: GetDocumentStock
public IList<ProductStock> GetDocumentStock(Document document, bool printed)
{ return Factory.DaoLabel().GetDocumentStock(document, printed); }
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:2,代码来源:Control.cs
示例9: GetDocumentProduct
public IList<Product> GetDocumentProduct(Document data, Product product)
{ return DocMngr.GetDocumentProduct(data, product); }
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:2,代码来源:Control.cs
示例10: PrintKitAssemblyLabels
public void PrintKitAssemblyLabels(Document ssDocument, int qtyType)
{
ssDocument.DocumentLines = Factory.DaoDocumentLine().Select(
new DocumentLine { Document = new Document { DocID = ssDocument.DocID } });
// el documento debe tener lineas
if (ssDocument.DocumentLines == null || ssDocument.DocumentLines.Count == 0)
return;
else
BasicMngr.PrintKitAssemblyLabels(ssDocument, qtyType);
}
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:11,代码来源:Control.cs
示例11: ValidateReceiptDocumentTrackingOptions
public Boolean ValidateReceiptDocumentTrackingOptions(Document data, Node node, Boolean autoThrow)
{
return BasicMngr.ValidateReceiptDocumentTrackingOptions(data, node, autoThrow);
}
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:4,代码来源:Control.cs
示例12: GetDocumentProductUnit
public IList<Unit> GetDocumentProductUnit(Document document, Product product)
{
return BasicMngr.GetDocumentProductUnit(document, product);
//return GetProductUnit(product);
}
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:5,代码来源:Control.cs
示例13: ResetInspectionLine
public void ResetInspectionLine(Document document, Label label, string username, bool cancelDocument)
{
TranMngr.ResetInspectionLine(document, label, username, cancelDocument);
}
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:4,代码来源:Control.cs
示例14: ConfirmInspectionDocument
public void ConfirmInspectionDocument(Document document, string appPath, string username)
{
TranMngr.ConfirmInspectionDocument(document, appPath, username);
}
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:4,代码来源:Control.cs
示例15: IsTrackRequiredInDocument
public bool IsTrackRequiredInDocument(Document document, Node node)
{
return DocMngr.IsTrackRequiredInDocument(document, node);
}
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:4,代码来源:Control.cs
示例16: GetCrossDockSalesOrders
public IList<Document> GetCrossDockSalesOrders(Document data)
{
return DocMngr.GetCrossDockSalesOrders(data);
}
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:4,代码来源:Control.cs
示例17: AssociateUserDocument
public Boolean AssociateUserDocument(Document document, IList<SysUser> userList)
{ DocMngr.AssociateUserDocument(document, userList); return true; }
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:2,代码来源:Control.cs
示例18: CreateLocationTransfer
public void CreateLocationTransfer(Document trfDoc)
{
ErpMngr.CreateLocationTransfer(trfDoc);
}
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:4,代码来源:Control.cs
示例19: GetPendingDocument
public IList<Document> GetPendingDocument(Document document, int daysAgo, int records)
{ return Factory.DaoDocument().SelectPending(document, daysAgo, records); }
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:2,代码来源:Control.cs
示例20: SaveDocument
public Document SaveDocument(Document data) { return Factory.DaoDocument().Save(data); }
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:1,代码来源:Control.cs
注:本文中的Entities.Trace.Document类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论