public List <getAllServiceByCustomerDTO> GetAllService(getServiceDTO objBranch)
        {
            List <getAllServiceByCustomerDTO> site = new List <getAllServiceByCustomerDTO>();

            using (DbLayer dbLayer = new DbLayer())
            {
                SqlCommand SqlCmd = new SqlCommand("spSelectContractByCustomer");
                SqlCmd.Parameters.AddWithValue("@CustomerId", objBranch.CustomerId);
                SqlCmd.Parameters.AddWithValue("@ActionBy", objBranch.ActionBy);
                SqlCmd.CommandType = CommandType.StoredProcedure;
                site = dbLayer.GetEntityList <getAllServiceByCustomerDTO>(SqlCmd);
            }
            return(site);
        }
        public HttpResponseMessage getAllSiteAllocation(getServiceDTO service)
        {
            HttpResponseMessage message;

            try
            {
                // SiteMappingDataAccessLayer dal = new SiteMappingDataAccessLayer();
                var dynObj = new { result = _Site.GetAllSiteAllocation(service) };
                message = Request.CreateResponse(HttpStatusCode.OK, dynObj);
            }
            catch (Exception ex)
            {
                message = Request.CreateResponse(HttpStatusCode.BadRequest, new { msgText = "Something wrong. Try Again!" });

                ErrorLog.CreateErrorMessage(ex, "SiteMapping", "getAllSiteAllocation");
            }
            return(message);
        }