// GET: ReferringPractice public ActionResult Index() { ReferringPracticeIndexViewModel viewM = new ReferringPracticeIndexViewModel(); string strPracName = ""; string strAddress1 = ""; string strAddress2 = ""; string strCity = ""; string strFax = ""; List <string> hospitals = new List <string>(); List <string> refphys = new List <string>(); if (Session["refPracName"] != null) { strPracName = Session["refPracName"].ToString(); } if (Session["refAddress1"] != null) { strAddress1 = Session["refAddress1"].ToString(); } if (Session["refAddress2"] != null) { strAddress2 = Session["refAddress2"].ToString(); } if (Session["refCity"] != null) { strCity = Session["refCity"].ToString(); } if (Session["refFax"] != null) { strFax = Session["refFax"].ToString(); } if (Session["refHospitals"] != null) { hospitals = (List <string>)Session["refHospitals"]; } if (Session["refRefPhys"] != null) { refphys = (List <string>)Session["refRefPhys"]; } viewM.ReferringPractices = refPracQueryGenerator(strPracName, strAddress1, strAddress2, strCity, strFax, hospitals, refphys).AsEnumerable(); viewM.filterPracticeName = strPracName; viewM.filterAddressLine1 = strAddress1; viewM.filterCity = strCity; viewM.filterFax = strFax; viewM.SelectedHospitals = hospitals; viewM.SelectedRefPhy = refphys; viewM.HospitalList = DataCollections.getHospital(db); viewM.RefPhyList = DataCollections.getPCP(db); return(View(viewM)); }
public ActionResult Index(ReferringPracticeIndexViewModel viewM) { string strPracName = ""; string strAddress1 = ""; string strAddress2 = ""; string strCity = ""; string strFax = ""; string[] splitList; List <string> hospitals = new List <string>(); List <string> refphys = new List <string>(); //if (viewM.filterPracticeName != null) //{ // strPracName = viewM.filterPracticeName; //} //if (viewM.filterAddressLine1 != null) //{ // strAddress1 = viewM.filterAddressLine1; //} //if (viewM.filterCity != null) //{ // strCity = viewM.filterCity; //} //if (viewM.filterFax != null) //{ // strFax = viewM.filterFax; //} //if (viewM.hidHospitals != null) //{ // splitList = viewM.hidHospitals.Split(new char[] { ',' }); // hospitals = splitList.ToList(); //} //if (viewM.hidRefPhy != null) //{ // splitList = viewM.hidRefPhy.Split(new char[] { ',' }); // refphys = splitList.ToList(); //} ReferringPracticeIndexViewModel returnM = new ReferringPracticeIndexViewModel(); returnM.ReferringPractices = refPracQueryGenerator(strPracName, strAddress1, strAddress2, strCity, strFax, hospitals, refphys).AsEnumerable(); returnM.filterPracticeName = strPracName; returnM.filterAddressLine1 = strAddress1; returnM.filterCity = strCity; returnM.filterFax = strFax; returnM.SelectedHospitals = hospitals; returnM.SelectedRefPhy = refphys; returnM.HospitalList = DataCollections.getHospital(db); returnM.RefPhyList = DataCollections.getPCP(db); return(View(returnM)); }