コード例 #1
0
ファイル: INVTransferHeaderWrapper.cs プロジェクト: taiab/POS
        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);
        }
コード例 #2
0
ファイル: frmPurchaseOrderAddEdit.cs プロジェクト: taiab/POS
 private void FillInventoryCBX()
 {
     cbx_Inventory.DataSource    = _invInventoryService.SelectAll();
     cbx_Inventory.ValueMember   = "InventoryID";
     cbx_Inventory.DisplayMember = "InventoryName";
     cbx_Inventory.SelectedIndex = -1;
 }
コード例 #3
0
ファイル: INVAdjustStockWrapper.cs プロジェクト: taiab/POS
        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);
        }
コード例 #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();
        }