Ejemplo n.º 1
0
        public INVTransferLineCollection SelectByField(int transferHeaderID)
        {
            List <INVTransferLine>    transferLineList          = new List <INVTransferLine>();
            INVTransferLineCollection invtransferLineCollection = transferLineService.SelectByField("TransferHeaderID", transferHeaderID, null, DataLayer.TypeOperation.Equal);

            transferLineList = (
                from line in invtransferLineCollection
                join product in productService.SelectAll() on line.ProductID equals product.ProductID
                select new INVTransferLine
            {
                TransferLineID = line.TransferLineID,
                TransferHeaderID = line.TransferHeaderID,
                ProductID = line.ProductID,
                ProductName = product.ProductName,
                Qty = line.Qty,
                CreatedBy = line.CreatedBy,
                CreateDate = line.CreateDate,
                UpdatedBy = line.UpdatedBy,
                UpdateDate = line.UpdateDate,
                IsDeleted = line.IsDeleted,
                DeletedBy = line.DeletedBy,
                DeletedDate = line.DeletedDate
            }
                ).ToList();
            invtransferLineCollection = new INVTransferLineCollection();
            invtransferLineCollection.AddRange(transferLineList);
            return(invtransferLineCollection);
        }
Ejemplo n.º 2
0
        public List <INVAdjustStock> getAllINVAdjustStock()
        {
            List <INVAdjustStock> resultList = new List <INVAdjustStock>();

            try
            {
                resultList = (from item in SelectAll()
                              join product in productService.SelectAll() on item.ProductID equals product.ProductID
                              join invt in invinventoryService.SelectAll() on item.InventoryID equals invt.InventoryID
                              join aRes in invAdjustStockReasonService.SelectAll() on item.AdjustReasonID equals aRes.AdjustStockReasonID
                              join sType in invStockTypeService.SelectAll() on item.StockTypeID equals sType.StockTypeID
                              join oldSType in invStockTypeService.SelectAll() on item.OldStockTypeID equals oldSType.StockTypeID
                              join usr in aduserService.SelectAll() on item.CreatedBy equals usr.UserID
                              select new INVAdjustStock()
                {
                    AdjustReasonID = item.AdjustReasonID,
                    AdjustStockID = item.AdjustStockID,
                    BatchID = item.BatchID,
                    CreatedBy = item.CreatedBy,
                    CreatedByName = usr.UserName,
                    CredateDate = item.CredateDate,
                    InventoryID = item.InventoryID,
                    ProductID = item.ProductID,
                    ProductName = product.ProductName,
                    Qty = item.Qty,
                    StockTypeID = item.StockTypeID,
                    UpdateDate = item.UpdateDate,
                    UpdatedBy = item.UpdatedBy,
                    StockTypeName = sType.StockTypeName,
                    OldStockTypeName = oldSType.StockTypeName,
                    InventoryName = invt.InventoryName,
                    AdjustReasonName = aRes.AdjustStockreasonName
                }
                              ).ToList();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(resultList);
        }
Ejemplo n.º 3
0
        private void FrmOpenTakingInventory_Load(object sender, EventArgs e)
        {
            INVInventoryService inventoryService = new INVInventoryService();

            cmb_inventory.DataSource    = inventoryService.SelectAll();
            cmb_inventory.DisplayMember = "InventoryName";
            cmb_inventory.ValueMember   = "InventoryID";

            BDProductService productService = new BDProductService();

            cmb_Product.DataSource    = productService.SelectAll();
            cmb_Product.DisplayMember = "ProductName";
            cmb_Product.ValueMember   = "ProductID";

            BDProductGroupService productGroupService = new BDProductGroupService();

            cmb_productGroup.DataSource    = productGroupService.SelectAll();
            cmb_productGroup.DisplayMember = "ProductGroupName";
            cmb_productGroup.ValueMember   = "ProductGroupID";

            ResetFields();
        }