Beispiel #1
0
        public static List <InventoryDetails> GetInventoryData()
        {
            EmployeeDetailsBLL _employeedetailsbll = new EmployeeDetailsBLL();
            InventoryDetailsR  _InventoryDetailsR  = _employeedetailsbll.GetInventoryDetails();

            int TotalStock    = Convert.ToInt32(_InventoryDetailsR.TotalStock.ToString());
            int TotalPurchase = Convert.ToInt32(_InventoryDetailsR.TotalPurchase.ToString());
            int TotalIssue    = Convert.ToInt32(_InventoryDetailsR.TotalIssue.ToString());
            int TotalDamage   = Convert.ToInt32(_InventoryDetailsR.TotalDamage.ToString());
            int TotalReturn   = Convert.ToInt32(_InventoryDetailsR.TotalReturn.ToString());


            List <InventoryDetails> dataAtt = new List <InventoryDetails>()
            {
                new InventoryDetails {
                    totalStock = "Total Stock", totalIssue = TotalStock
                },
                new InventoryDetails {
                    totalStock = "Total Purchase", totalIssue = TotalPurchase
                },
                new InventoryDetails {
                    totalStock = "Total Issue", totalIssue = TotalIssue
                },
                new InventoryDetails {
                    totalStock = "Total Damage", totalIssue = TotalDamage
                },
                new InventoryDetails {
                    totalStock = "Total Return", totalIssue = TotalReturn
                }
            };


            return(dataAtt);
        }
Beispiel #2
0
        private void GetInventoryDetails()
        {
            EmployeeDetailsBLL _employeedetailsbll = new EmployeeDetailsBLL();

            try
            {
                InventoryDetailsR _inventory = _employeedetailsbll.GetInventoryDetails();
                if (_inventory != null)
                {
                    lblTotalStock.Text    = _inventory.TotalStock.ToString();
                    lblTotalPurchase.Text = _inventory.TotalPurchase.ToString();
                    lblTotalIssue.Text    = _inventory.TotalIssue.ToString();
                    lblTotalDamage.Text   = _inventory.TotalDamage.ToString();
                    lblTotalReturn.Text   = _inventory.TotalReturn.ToString();
                }
            }
            catch (Exception)
            {
                throw;
            }
        }