public static List<CustomChart> getCustomChart(List<string> date)
        {
            stationeryEntities se = new stationeryEntities();
            List<string> Datesn = new List<string>();

            int index = Datesn.Count;
            int length = 0;
            List<CustomDepOrder> DepOrder = new List<CustomDepOrder>();
            List<CustomChart> finalChart = new List<CustomChart>();

            Datesn = date;
            foreach (string d in Datesn)
            {
                DateTime fromDate = new DateTime();
                DateTime toDate = new DateTime();
                List<Object> chart = new List<object>();
                fromDate = Convert.ToDateTime(d);
                toDate = fromDate.AddDays(30);
                DepOrder = se.getDepOrderByMonth1(fromDate,toDate).ToList<CustomDepOrder>();
                foreach (CustomDepOrder deporder in DepOrder)
                {
                    if (finalChart.Count == 0)
                    {
                        CustomChart newcc = new CustomChart();
                        newcc.depName = deporder.DepName;
                        newcc.Month1 = deporder.QuantDelivered ?? default(int);
                        finalChart.Add(newcc);

                    }
                    else
                    {
                        int notfound = 0;
                        length = finalChart.Count;
                        for (int i = 0; i < length; i++)
                        {
                            if (finalChart[i].depName == deporder.DepName)
                            {

                                if (finalChart[i].Month1 == 0)
                                {
                                    finalChart[i].Month1 = deporder.QuantDelivered ?? default(int);
                                }
                                else if (finalChart[i].Month2 == 0)
                                {
                                    finalChart[i].Month2 = deporder.QuantDelivered ?? default(int);
                                }
                                else if (finalChart[i].Month3 == 0)
                                {
                                    finalChart[i].Month3 = deporder.QuantDelivered ?? default(int);
                                }
                                notfound = 0;
                                break;

                            }
                            else
                            {
                                notfound = 1;

                            }

                        }

                        if (notfound != 0)
                        {
                            CustomChart newchart = new CustomChart();
                            newchart.depName = deporder.DepName;
                            newchart.Month1 = deporder.QuantDelivered ?? default(int);
                            finalChart.Add(newchart);
                        }

                        //foreach (CustomChart cusdep in finalChart)
                        //{
                        //    if (cusdep.depName == deporder.DepName)
                        //    {
                        //        if (cusdep.Month1 == 0)
                        //        {
                        //            cusdep.Month1 = deporder.QuantDelivered ?? default(int);
                        //        }
                        //        else if (cusdep.Month2 == 0)
                        //        {
                        //            cusdep.Month2 = deporder.QuantDelivered ?? default(int);
                        //        }
                        //        else if (cusdep.Month3 == 0)
                        //        {
                        //            cusdep.Month3 = deporder.QuantDelivered ?? default(int);
                        //        }

                        //    }
                        //    else
                        //    {
                        //        CustomChart newchart = new CustomChart();
                        //        newchart.depName = deporder.DepName;
                        //        newchart.Month1 = deporder.QuantDelivered ?? default(int);
                        //        finalChart.Add(newchart);

                        //    }

                        //}
                    }

                }

            }
            return finalChart;
        }