コード例 #1
0
        public ActionResult SearchProduct(string searchText, string productCode, string practitionerId)
        {
            if (!String.IsNullOrEmpty(practitionerId))
            {
                List <MedicineModel> result  = new List <MedicineModel>();
                PractitionerProcess  process = new PractitionerProcess();
                MedicineViewModel    vm      = new MedicineViewModel();
                vm.PractitionerId = Guid.Parse(practitionerId);
                vm.SearchText     = searchText;
                vm.ProductCode    = productCode;
                result            = process.SearchProduct(vm);

                return(Json(result, JsonRequestBehavior.AllowGet));
            }
            else
            {
                throw new UnauthorizedAccessException("Error! Not Authorized.", new Exception("No Practitioner Id Found!"));
            }
        }