示例#1
0
        public ActionResult <DesignationViewModel> Get(string name)
        {
            _designationService.GetDesignation(name);
            DesignationModel     designation     = _designationService.GetDesignation(name);
            DesignationViewModel designationData = _mapper.Map <DesignationModel, DesignationViewModel>(designation);

            return(designationData);
        }
 public IActionResult Get(int id)
 {
     try
     {
         responseData.Results = _designationService.GetDesignation(id);
         responseData.Status  = "OK";
     }
     catch (Exception ex)
     {
         responseData.Status       = "Failed";
         responseData.ErrorMessage = ex.Message + " exception details:" + ex.ToString();
     }
     return(Ok(responseData));
 }
示例#3
0
        //
        // GET: CreateEdit
        public ActionResult CreateEdit(string did)
        {
            UDesignation designation = new UDesignation();

            Guid designationId;

            if (Guid.TryParse(did, out designationId))
            {
                ViewBag.Action           = Resources.Global_String_Update;
                designation._Designation = designationService.GetDesignation(designationId);
            }
            return(View(designation));
        }