Example #1
0
        public List <INVTransferHeaderModel> getAllTransferTransaction()
        {
            List <INVTransferHeaderModel> resultList = new List <INVTransferHeaderModel>();

            try
            {
                resultList = (from item in SelectAll()
                              join fromInv in invinventoryService.SelectAll() on item.FromInventoryID equals fromInv.InventoryID
                              join toInv in invinventoryService.SelectAll() on item.ToInventoryID equals toInv.InventoryID
                              join usr in aduserService.SelectAll() on item.CreatedBy equals usr.UserID
                              where item.IsDeleted == false
                              select new INVTransferHeaderModel()
                {
                    INVTransferHeaderID = item.INVTransferHeaderID.Value,
                    CreatedBy = usr.UserName,
                    FromInventory = fromInv.InventoryName,
                    ToInventory = toInv.InventoryName,
                    TransferDate = item.CreateDate.Value.Date.ToShortDateString(),
                    IsClosed = item.IsClosed.Value,
                    InvoiceNumber = item.InvoiceNumber
                }
                              ).ToList();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(resultList);
        }
Example #2
0
 private void FillInventoryCBX()
 {
     cbx_Inventory.DataSource    = _invInventoryService.SelectAll();
     cbx_Inventory.ValueMember   = "InventoryID";
     cbx_Inventory.DisplayMember = "InventoryName";
     cbx_Inventory.SelectedIndex = -1;
 }
Example #3
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);
        }
Example #4
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();
        }