public List <getCustomerSitebyBranchDTO> GetAllSite(getCustomerSiteDTO objBranch) { List <getCustomerSitebyBranchDTO> role = new List <getCustomerSitebyBranchDTO>(); SqlCommand SqlCmd = new SqlCommand("spSelectSiteMaster"); SqlCmd.Parameters.AddWithValue("@BranchId", objBranch.BranchId); SqlCmd.Parameters.AddWithValue("@ActionBy", objBranch.ActionBy); SqlCmd.CommandType = CommandType.StoredProcedure; role = _unitOfWork.DbLayer.GetEntityList <getCustomerSitebyBranchDTO>(SqlCmd); return(role); }
public HttpResponseMessage getSite(getCustomerSiteDTO site) { HttpResponseMessage message; try { // CustomerSiteMappingDataAccessLayer dal = new CustomerSiteMappingDataAccessLayer(); var dynObj = new { result = _Customermapping.GetAllSite(site) }; message = Request.CreateResponse(HttpStatusCode.OK, dynObj); } catch (Exception ex) { message = Request.CreateResponse(HttpStatusCode.BadRequest, new { msgText = "Something wrong. Try Again!" }); ErrorLog.CreateErrorMessage(ex, "CustomerSiteMapping", "getSite"); } return(message); }