public static void MakeStockCalculationsStoredProc(int currentMonth, int currentYear, int orderDetailID, int storeID, int unpricedOrPricedOrBoth, bool markStockoutBit, out int usableStock, out int approved, out int availableQuantity)
        {
            usableStock = approved = availableQuantity = 0;

            Balance bal = new Balance();
            if (currentMonth == 13)
            {
                currentYear++;
                currentMonth = 1;
            }
            ListDictionary ld = new ListDictionary
            {
                {"@currentMonth",currentMonth},
                {"@currentYear",currentYear},
                {"@currentDay",DateTime.DaysInMonth(currentYear,currentMonth)},
                {"@orderDetailID",orderDetailID},
                {"@storeID",storeID},
                {"@unpricedOrPricedOrBoth",unpricedOrPricedOrBoth},
                {"@markStockoutBit",markStockoutBit?1:0}
            };

            SqlParameter pUs=new SqlParameter();
            pUs.Direction = ParameterDirection.Output;
            pUs.ParameterName = "@usableStock";
            pUs.Value = usableStock;
            ld.Add(pUs.ParameterName, pUs.Value);

            SqlParameter pApp = new SqlParameter();
            pApp.Direction = ParameterDirection.Output;
            pApp.ParameterName = "@approved";
            pApp.Value = approved;
            ld.Add(pApp.ParameterName, pApp.Value);

            SqlParameter pAv = new SqlParameter();
            pAv.Direction = ParameterDirection.Output;
            pAv.ParameterName = "@availableQuantity";
            pAv.Value = availableQuantity;
            ld.Add(pAv.ParameterName, pAv.Value);

            bal.LoadFromSqlNoExec("MakeStockCalculations", ld);

            usableStock = Convert.ToInt32(ld["@usableStock"]);// Convert.ToInt32(pUs.Value);
            approved = Convert.ToInt32(ld["@approved"]); //Convert.ToInt32(pApp.Value);
            availableQuantity = Convert.ToInt32(ld["@availableQuantity"]); //Convert.ToInt32(pAv.Value);
        }