Exemple #1
0
 public ActionResult Main(MasterPackageModel model)
 {
     try
     {
         using (Service.WS_TrakcareCls ws = new Service.WS_TrakcareCls())
         {
             PackageInformationModel pi = new PackageInformationModel();
             pi.string_search          = model.string_search;
             pi.listPackageInformation = ws.GetAllOrderSet(pi.string_search).AsEnumerable()
                                         .Where(x => x.Field <string>("ARCOS_Code") != null && x.Field <string>("ARCOS_Code").Trim() != "" &&
                                                x.Field <string>("ARCOS_Desc") != null && x.Field <string>("ARCOS_Desc").Trim() != "")
                                         .Select(x => new PackageInformation
             {
                 package_code = x.Field <string>("ARCOS_Code"),
                 package_name = x.Field <string>("ARCOS_Desc")
             }).Distinct()
                                         .ToList();
             if (pi.listPackageInformation.Count == 0)
             {
                 return(View(model));
             }
             else
             {
                 return(View("PackageList", pi));
             }
         }
         //using (InhCheckupDataContext cdc = new InhCheckupDataContext())
         //{
         //    PackageInformationModel pi = new PackageInformationModel();
         //    pi.string_search = model.string_search;
         //    pi.listPackageInformation = cdc.trn_patient_order_sets
         //                                   .Where(x => x.tos_od_set_code.ToUpper().StartsWith(model.string_search.ToUpper()))
         //                                   .Select(x => new PackageInformation
         //                                   {
         //                                       package_code = x.tos_od_set_code,
         //                                       package_name = x.tos_od_set_name
         //                                   }).Distinct()
         //                                   .ToList();
         //    if (pi.listPackageInformation.Count == 0)
         //    {
         //        return View(model);
         //    }
         //    else
         //    {
         //        return View("PackageList", pi);
         //    }
         //}
     }
     catch
     {
         return(View(model));
     }
 }
Exemple #2
0
 public ActionResult PackageList(PackageInformationModel model)
 {
     return(View("Main"));
 }