public bool RemoveBDMAppointmentDetail(BDMAppoinmentDetailRemoveDTO objAppointmentDetail) { bool res = false; SqlCommand sqlcmd = new SqlCommand(""); sqlcmd.Parameters.AddWithValue("@Id", objAppointmentDetail.Id); sqlcmd.CommandType = CommandType.StoredProcedure; int result = _unitOfWork.DbLayer.ExecuteNonQuery(sqlcmd); if (result != Int32.MaxValue) { res = true; } return(res); }
public HttpResponseMessage RemoveBDMAppointmentDetail(BDMAppoinmentDetailRemoveDTO objAppointmentDetail) { HttpResponseMessage message; try { // BDMAppointmentDetailDAL dal = new BDMAppointmentDetailDAL(); var dynObj = new { result = _obj.RemoveBDMAppointmentDetail(objAppointmentDetail) }; message = Request.CreateResponse(HttpStatusCode.OK, dynObj); } catch (Exception ex) { message = Request.CreateResponse(HttpStatusCode.BadRequest, new { msgText = "Something wrong. Try Again!" }); ErrorLog.CreateErrorMessage(ex, "BDMAppoinmentDetail", "RemoveBDMAppointmentDetail"); } return(message); }