コード例 #1
0
        // GET: Clients/Details/5
        public ActionResult Details(int id)
        {
            if (id == 0)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            return(PartialView(clientsB.GetById(id)));
        }
コード例 #2
0
        // GET: api/Client/5
        public IHttpActionResult Get(int id)
        {
            All_Clients clients = null;

            ClientsB clientB = new ClientsB();

            clients = clientB.GetById(id);

            if (clients == null)
            {
                return(Ok(false));
            }

            return(Ok(clients));
        }
コード例 #3
0
        // GET: Clients
        public JsonResult GetClient(string id)
        {
            All_Clients client = clientsB.GetById(Convert.ToInt32(id));

            return(Json(client, JsonRequestBehavior.AllowGet));
        }