public static FullPatientJounrney GetApprovedJourneyFromTemp(string CountryId, string BrandId, string Year)
        {
            FullPatientJounrney lstJourney   = new FullPatientJounrney();
            PatientJourneyModel firstresult  = new PatientJourneyModel();
            List <String>       lstCountryId = new List <String>();

            lstCountryId = CountryId.Split(',').ToList();
            List <String> lstBrandId = new List <String>();

            lstBrandId = BrandId.Split(',').ToList();
            try
            {
                Patient_Journey_Temp result = new Patient_Journey_Temp();
                result = dbPatientJourney.GetApprovedJourneyFromTemp(Convert.ToInt32(lstCountryId[0]), Convert.ToInt32(lstBrandId[0]), Convert.ToInt32(Year));
                PJEntities entity = new PJEntities();
                if (result != null)
                {
                    firstresult.PatientJourneyId = result.Patient_Journey_Temp_Id;
                    firstresult.JourneyTitle     = result.Journey_Title;
                    firstresult.StatusID         = Convert.ToInt32(result.Status_Master_Id);
                    List <JourneyStage> stages = bsPatientAdministration.GetJourneyStageFromTemp(result.Patient_Journey_Temp_Id.ToString());
                    lstJourney.Stage   = stages;
                    lstJourney.Journey = firstresult;
                }
            }
            catch (Exception)
            {
            }
            return(lstJourney);
        }
Beispiel #2
0
        public static Patient_Journey_Temp GetApprovedJourneyFromTemp(int CountryId, int BrandId, int Year)
        {
            Patient_Journey_Temp listWithSearch = new Patient_Journey_Temp();

            try
            {
                using (PJEntities entity = new PJEntities())
                {
                    listWithSearch = (from journey in entity.Patient_Journey_Temp
                                      where journey.Country_Master_Id == CountryId && journey.Brand_Master_Id == BrandId && journey.Year == Year && (journey.Status_Master_Id == 3 || journey.Status_Master_Id == 7)
                                      select journey).FirstOrDefault();
                }
            }
            catch (Exception)
            {
            }
            return(listWithSearch);
        }