Ejemplo n.º 1
0
        // GET api/designation/5
        public HttpResponseMessage Get(int id)
        {
            var Designation = _Designation.GetDesignationById(id);

            if (Designation != null)
            {
                return(Request.CreateResponse(HttpStatusCode.OK, Designation));
            }
            return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "No grDesignationade found for this id"));
        }
        public ActionResult GetDesignationById(Designation designation)
        {
            Designation desig = new Designation();

            if (designation.DesigId > 0)
            {
                desig = objDesignation.GetDesignationById(designation.DesigId);
            }
            return(Json(desig, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 3
0
        public async Task <PartialViewResult> EditDesignation(int designationId)
        {
            DesignationModel designationModel = await _designation.GetDesignationById(designationId);

            return(PartialView("_AddDesignation", designationModel));
        }