public ServiceResponse ManageCustomer()
 {
     ServiceResponse response = new ServiceResponse { IsSuccess = false };
     CustomerSearchModel searchModel = new CustomerSearchModel();
     try
     {
         response.IsSuccess = true;
         response.Data = searchModel;
     }
     catch (Exception)
     {
         response.IsSuccess = false;
         response.ErrorCode = Constants.ErrorCode_InternalError;
         response.Message = Resource.ExceptionMessage;
     }
     return response;
 }
        public ServiceResponse GetCustomerList(CustomerSearchModel searchParams, int pageSize, int pageIndex, string sortIndex, string sortDirection)
        {
            ServiceResponse response = new ServiceResponse();
            try
            {
                List<SearchValueData> searchList = new List<SearchValueData>() {
                    new SearchValueData { Name = "FromIndex", Value = Convert.ToString(((pageIndex - 1) * pageSize) + 1) },
                    new SearchValueData { Name = "ToIndex", Value = Convert.ToString(pageIndex * pageSize) },
                    new SearchValueData{ Name = "SortExpression",Value = string.IsNullOrEmpty(sortIndex) ? "CreatedDate" : Convert.ToString(sortIndex)},
                    new SearchValueData{ Name = "SortType",Value = string.IsNullOrEmpty(sortDirection) ? "DESC" : Convert.ToString(sortDirection)},
                    new SearchValueData{ Name = "Email",Value =  Convert.ToString(searchParams.Email)},
                    new SearchValueData{ Name = "Name",Value =  Convert.ToString(searchParams.Name)}
                };

                List<CustomerViewModel> totalData = GetEntityList<CustomerViewModel>("GetCustomerList", searchList);
                int count = 0;
                if (totalData != null && totalData.Count > 0)
                    count = totalData.First().Count;

                Page<CustomerViewModel> customers = GetPageInStoredProcResultSet(pageIndex, pageSize, count, totalData);
                response.Data = customers;
                response.IsSuccess = true;

            }
            catch (Exception)
            {
                response.IsSuccess = false;
                response.ErrorCode = Constants.ErrorCode_InternalError;
                response.Message = Resource.ExceptionMessage;
            }

            return response;
        }