private tblInventoryImports Map(InventoryImport  import)
        {
            var inventoryImport = new tblInventoryImports();
            inventoryImport.id = Guid.NewGuid();
            inventoryImport.ProductCode = import.ProductCode;
            inventoryImport.Quantity = import.Quantity;
            inventoryImport.Ref = DateTime.Now.ToString("yyyyMMddHHmmssfff");
            inventoryImport.WarehouseCode = import.WarehouseCode;
            inventoryImport.ImportStatus = (int)ProcessStatus.New;
            inventoryImport.IM_DateCreated = DateTime.Now;
            inventoryImport.IM_DateLastUpdated = DateTime.Now;
            inventoryImport.IM_Status = (int) EntityStatus.Active;

            return inventoryImport;
            

        }
Example #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the tblInventoryImports EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotblInventoryImports(tblInventoryImports tblInventoryImports)
 {
     base.AddObject("tblInventoryImports", tblInventoryImports);
 }
Example #3
0
 /// <summary>
 /// Create a new tblInventoryImports object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 /// <param name="ref">Initial value of the Ref property.</param>
 /// <param name="warehouseCode">Initial value of the WarehouseCode property.</param>
 /// <param name="productCode">Initial value of the ProductCode property.</param>
 /// <param name="quantity">Initial value of the Quantity property.</param>
 /// <param name="iM_DateCreated">Initial value of the IM_DateCreated property.</param>
 /// <param name="iM_DateLastUpdated">Initial value of the IM_DateLastUpdated property.</param>
 /// <param name="iM_Status">Initial value of the IM_Status property.</param>
 /// <param name="importStatus">Initial value of the ImportStatus property.</param>
 public static tblInventoryImports CreatetblInventoryImports(global::System.Guid id, global::System.String @ref, global::System.String warehouseCode, global::System.String productCode, global::System.Decimal quantity, global::System.DateTime iM_DateCreated, global::System.DateTime iM_DateLastUpdated, global::System.Int32 iM_Status, global::System.Int32 importStatus)
 {
     tblInventoryImports tblInventoryImports = new tblInventoryImports();
     tblInventoryImports.id = id;
     tblInventoryImports.Ref = @ref;
     tblInventoryImports.WarehouseCode = warehouseCode;
     tblInventoryImports.ProductCode = productCode;
     tblInventoryImports.Quantity = quantity;
     tblInventoryImports.IM_DateCreated = iM_DateCreated;
     tblInventoryImports.IM_DateLastUpdated = iM_DateLastUpdated;
     tblInventoryImports.IM_Status = iM_Status;
     tblInventoryImports.ImportStatus = importStatus;
     return tblInventoryImports;
 }