public bool removeClassification(removeClassificationDTO objClassification) { bool res = false; SqlCommand SqlCmd = new SqlCommand("spDeleteCustomerSiteMapping"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@Id", objClassification.Id); SqlCmd.Parameters.AddWithValue("@ActionBy", objClassification.ActionBy); int result = _unitOfWork.DbLayer.ExecuteNonQuery(SqlCmd); if (result != Int32.MaxValue) { res = true; } return(res); }
public HttpResponseMessage removeClassification(removeClassificationDTO classification) { HttpResponseMessage message; try { // CustomerSiteMappingDataAccessLayer dal = new CustomerSiteMappingDataAccessLayer(); var dynObj = new { result = _Customermapping.removeClassification(classification) }; message = Request.CreateResponse(HttpStatusCode.OK, dynObj); } catch (Exception ex) { message = Request.CreateResponse(HttpStatusCode.BadRequest, new { msgText = "Something wrong. Try Again!" }); ErrorLog.CreateErrorMessage(ex, "CustomerSiteMapping", "removeClassification"); } return(message); }