public ActionResult Index(Bid b) { bool status = false; connectionstring(); con.Open(); com.Connection = con; com.CommandText = "select b.p_id , b.u_id from BID b where b.p_id ='" + b.P_id + "' and b.u_id ='" + b.U_id + "'"; dr = com.ExecuteReader(); if (dr.Read()) { status = false; } else { db.bidinsert(b); status = true; } return(new JsonResult { Data = new { status = status } }); }