public static List<Object> getChart(int itemName, int catName, int depName, string fromdate, string todate)
        {
            stationeryEntities se = new stationeryEntities();
            int itemID = itemName;
            int catID = catName;
            int depID = depName;

            DateTime fromdates = new DateTime();

            List<Object> chart = new List<object>();
            DateTime todates = new DateTime();
            fromdates = Convert.ToDateTime(fromdate);
            todates = Convert.ToDateTime(todate);

            //get Chart by Category
            if ((itemID == 0) && (catID != 0) && (depID == 0))
            {
                chart = se.getChartbyCategoryandItem(fromdates, todates, catID).ToList<Object>();

            }

                //get chart by Department
            else if ((itemID == 0) && ((catID != 0) || (catID == 0)) && (depID != 0))
            {
                chart = se.getChartForDepByCategoryOnly(fromdates, todates, depID).ToList<object>();

            }
            return chart;

            //chart = se.getChartbyCategory(fromdate, todate).ToList<Object>();
            //return chart;
        }