public List<CustomerInvoiceViewModel> GetCustomersInvoiceForReport(string startDate, string endDate, int customerId, string invoiceType)
        {
            DateTime? _startDate = null;
            DateTime? _endDate = null;
            if (startDate != "") { _startDate = Convert.ToDateTime(startDate); };
            if (endDate != "") { _endDate = Convert.ToDateTime(endDate); };
            SecurityAgencyEntities ob = new SecurityAgencyEntities();
            List<getAllCustomerInvoice_Result> customer = ob.getAllCustomerInvoice(_startDate, _endDate).ToList();

            if(customerId!=0)
            {
                customer = customer.Where(i => i.customerid == customerId).ToList();
            }
            ////Check For invoiceType
            //if (invoiceType == SecurityAgency.Common.Utility.EnumUtility.InvoiceType.Paid.ToString())
            //{
            //    customer = customer.Where(i => i.CustomerPaymentId != 0).ToList();
            //}
            //else if (invoiceType == SecurityAgency.Common.Utility.EnumUtility.InvoiceType.Unpaid.ToString())
            //{
            //    customer = customer.Where(i => i.CustomerPaymentId == 0).ToList();
            //}
            if (customer == null)
                return null;

            Mapper.CreateMap<getAllCustomerInvoice_Result, CustomerInvoiceViewModel>();
            return Mapper.Map<List<getAllCustomerInvoice_Result>, List<CustomerInvoiceViewModel>>(customer);
        }