示例#1
0
 public IHttpActionResult Get(string type, int id)
 {
     if (type == "D")
     {
         var request = new BaseRequest <DrugRecordFilter>()
         {
             Data = new DrugRecordFilter()
             {
                 DrugrecordId = id,
             }
         };
         var response = service.GetDrugRec(request);
         return(Ok(response));
     }
     else if (type == "M")
     {
         var request = new BaseRequest <MaterialRecordFilter>()
         {
             Data = new MaterialRecordFilter()
             {
                 MaterialRecordId = id,
             }
         };
         var response = service.GetMaterialRec(request);
         return(Ok(response));
     }
     else if (type == "S")
     {
         var request = new BaseRequest <ServiceRecordFilter>()
         {
             Data = new ServiceRecordFilter()
             {
                 ServiceRecordId = id,
             }
         };
         var response = service.GetServiceRec(request);
         return(Ok(response));
     }
     else
     {
         var response = new BaseResponse <ServiceRecordFilter>();
         return(Ok(response));
     }
 }