public LogOnAuditBuilder LogOnUserAuditForMs(String UserName, String ClientTime, String ClientTimeZone, String UtcTime) { LogOnAuditBuilder _LogonAuditBuilder = new LogOnAuditBuilder(); var userdetails = _dbAuthentication.GetUserforADlogonID(UserName); using (PJEntities db = new PJEntities()) { User_Logon_Audit_MS userLogonAudit = new User_Logon_Audit_MS(); userLogonAudit.User_511 = userdetails.User_511; userLogonAudit.UPI = userdetails.UPI == null ? String.Empty : userdetails.UPI.ToString(); userLogonAudit.First_Name = userdetails.First_Name; userLogonAudit.Middle_Initial = userdetails.Middle_Initial; userLogonAudit.Last_Name = userdetails.Last_Name; userLogonAudit.Email_Id = userdetails.Email_Id; userLogonAudit.Logon_Client_Date = DateTimeOffset.Parse(ClientTime.Substring(0, Math.Min(ClientTime.Length, 25))); userLogonAudit.Logon_UTC_Date = DateTimeOffset.Parse(UtcTime.Substring(0, Math.Min(UtcTime.Length, 25))); userLogonAudit.Logon_Client_TimeZone = ClientTimeZone; userLogonAudit.Created_By = "RANGARX6"; userLogonAudit.Created_Date = DateTimeOffset.Now; userLogonAudit.Modified_By = "RANGARX6"; userLogonAudit.Modified_Date = DateTimeOffset.Now; db.User_Logon_Audit_MS.Add(userLogonAudit); db.SaveChanges(); } return(_LogonAuditBuilder); }
//public static UserListResult GetUserList() //{ // UserListResult result = new UserListResult(); // using (PJEntities entity = new PJEntities()) // { // var userMasterData = from r in entity.PJ_USERS select r; // var roleMasterData = from r in entity.PJ_USER_ROLES_MASTER select r; // result.UserList = (from j in userMasterData // select new UserList() // { // FullName = j.FIRST_NAME + j.LAST_NAME, // Email = j.EMAILID, // UPI = j.UPI, // AD_Logon = j.USER_511, // Role = "ADMIN" // }).ToList(); // } // return result; //} //public static String AddNewUser(string FirstName, string MiddleName, string LastName, string EmailId, string UPI, // string ADLogon, string userTypeID, string RoleID, List<string> lstCountryId) //{ // int countryID = 0; // using (PJEntities entity = new PJEntities()) // { // var userData = from r in entity.PJ_USERS select r; // PJ_USERS _userDetails = new PJ_USERS(); // _userDetails.USER_511 = ADLogon; // _userDetails.UPI = Convert.ToDecimal(UPI); // _userDetails.FIRST_NAME = FirstName; // _userDetails.MIDDLE_INITIAL = MiddleName; // _userDetails.LAST_NAME = LastName; // _userDetails.EMAILID = EmailId; // _userDetails.IS_ACTIVE = true; // _userDetails.CREATED_BY = "RANGARX6"; // _userDetails.CREATED_DATE = DateTime.Now; // _userDetails.MODIFIED_BY = "RANGARX6"; // _userDetails.MODIFIED_DATE = DateTime.Now; // entity.PJ_USERS.Add(_userDetails); // entity.SaveChanges(); // entity.Entry(_userDetails).GetDatabaseValues(); // int User_Id = _userDetails.ID; // for (int i = 0; i < lstCountryId.Count; i++) // { // countryID = Convert.ToInt32(lstCountryId[i]); // PJ_USER_ADDON _userDetailsAdd = new PJ_USER_ADDON(); // _userDetailsAdd.COUNTRY_ID = countryID; // _userDetailsAdd.ROLE_TYPE_ID = Convert.ToInt32(RoleID); // _userDetailsAdd.USER_ID = User_Id; // _userDetailsAdd.DESCRIPTIONS = null; // _userDetailsAdd.CREATED_BY = "RANGARX6"; // _userDetailsAdd.CREATED_DATE = DateTime.Now; // _userDetailsAdd.MODIFIED_BY = "RANGARX6"; // _userDetailsAdd.MODIFIED_DATE = DateTime.Now; // entity.PJ_USER_ADDON.Add(_userDetailsAdd); // entity.SaveChanges(); // } // } // return "TRUE"; //} public static List <Stage_Master> GetStageData(int JourneyId, int StatusId) { List <Stage_Master> listresponse = new List <Stage_Master>(); using (PJEntities entity = new PJEntities()) { if (StatusId == 7 || StatusId == 3) { var stagelist = entity.Patient_Journey_Stages_Temp.Where(x => x.Patient_Journey_Temp_Id == JourneyId).ToList(); var fulllist = entity.Stage_Master.ToList(); listresponse = fulllist.Where(p => !stagelist.Any(x => x.Stage_Master_Id == p.Stage_Master_Id)).ToList(); if (!listresponse.Any(x => x.Stage_Name.ToLower() == "other")) { var othertrans = entity.Stage_Master.Where(x => x.Stage_Name.ToLower() == "other").FirstOrDefault(); listresponse.Add(othertrans); } listresponse = listresponse.OrderBy(x => x.Stage_Name).ToList(); } else { var stagelist = entity.Patient_Journey_Stages.Where(x => x.Patient_Journey_Id == JourneyId).ToList(); var fulllist = entity.Stage_Master.ToList(); listresponse = fulllist.Where(p => !stagelist.Any(x => x.Stage_Master_Id == p.Stage_Master_Id)).ToList(); if (!listresponse.Any(x => x.Stage_Name.ToLower() == "other")) { var othertrans = entity.Stage_Master.Where(x => x.Stage_Name.ToLower() == "other").FirstOrDefault(); listresponse.Add(othertrans); } listresponse = listresponse.OrderBy(x => x.Stage_Name).ToList(); } } return(listresponse); }
public static List <CountryColourVJ> GetCountryNames(List <String> lstCountryId) { List <CountryColourVJ> lstresponse = new List <CountryColourVJ>(); using (PJEntities entity = new PJEntities()) { var countryData = entity.Country_Master.ToList(); for (int i = 0; i < lstCountryId.Count; i++) { int countryID = Convert.ToInt32(lstCountryId[i]); CountryColourVJ countrylist = (from h in countryData where h.Country_Master_Id == countryID where h.Is_Active == true select new CountryColourVJ() { CountryNames = h.Country_Name, CountryIDs = h.Country_Master_Id }).FirstOrDefault(); lstresponse.Add(countrylist); } } return(lstresponse); }
public static List <CountryList> GetCountryData(int areaId, int[] countryid) { List <CountryList> listresponse = new List <CountryList>(); try { CountryList country = null; using (PJEntities entity = new PJEntities()) { for (int i = 0; i < countryid.Length; i++) { country = new CountryList(); int cuurentcountry = countryid[i]; country = (from areaMaster in entity.Area_Master join countryMaster in entity.Country_Master on areaMaster.Area_Master_Id equals countryMaster.Area_Master_Id where areaMaster.Area_Master_Id == areaId && countryMaster.Country_Master_Id == cuurentcountry select new CountryList() { CountryId = countryMaster.Country_Master_Id, CountryName = countryMaster.Country_Name }).FirstOrDefault(); if (country != null) { listresponse.Add(country); } } } listresponse = listresponse.OrderBy(x => x.CountryName).ToList(); } catch (Exception) { } return(listresponse); }
public static SEARCH_CRITERIA GetSearchCriteria(string UserName) { SEARCH_CRITERIA result = new SEARCH_CRITERIA(); using (PJEntities entity = new PJEntities()) { var userData = from r in entity.Users select r; var searchData = from r in entity.Favourite_Search select r; int userId = userData.Where(x => x.User_511 == UserName.ToUpper()).Select(x => x.User_Id).FirstOrDefault(); var searchResults = searchData.Where(x => x.User_Id == userId).FirstOrDefault(); int searchId = searchResults.Favourite_Search_Id; List <int?> searchResultsBrand = entity.Favourite_Search_Brand.Where(x => x.Favourite_Search_Id == searchId).Select(x => x.Brand_Master_Id).ToList(); List <int?> searchResultsArea = entity.Favourite_Search_Area.Where(x => x.Favourite_Search_Id == searchId).Select(x => x.Area_Master_Id).ToList(); List <int?> searchResultsCountry = entity.Favourite_Search_Country.Where(x => x.Favourite_Search_Id == searchId).Select(x => x.Country_Master_Id).ToList(); List <int?> searchResultsArchetype = entity.Favourite_Search_Archetype.Where(x => x.Favourite_Search_Id == searchId).Select(x => x.Archetype_Master_Id).ToList(); result.THERAPEUTIC_ID = (int)searchResults.Therapeutic_Area_Master_Id; result.SUB_THERAPEUTIC_ID = (int)searchResults.SubTherapeutic_Area_Master_Id; result.INDICATION_ID = (int)searchResults.Indication_Master_Id; result.ARCHETYPE_ID = string.Join <int?>(",", searchResultsArchetype); result.BRAND_ID = string.Join <int?>(",", searchResultsBrand); result.AREA_ID = string.Join <int?>(",", searchResultsArea); result.COUNTRY_ID = string.Join <int?>(",", searchResultsCountry); result.YEAR = (int)searchResults.Year; return(result); } }
public static List <IndicationList2> GetProductListDSForPJ(int IndicationId, int SubTherapeuticId, int TherapeuticId) { List <IndicationList2> listresponse = new List <IndicationList2>(); using (PJEntities entity = new PJEntities()) { var productData = from r in entity.Brand_Master select r; var indicationData = from r in entity.Indication_Master select r; IndicationList2 _indication = new IndicationList2(); _indication.IndicationId = Convert.ToInt32(IndicationId); _indication.IndicationName = indicationData.Where(x => x.Indication_Master_Id == _indication.IndicationId).FirstOrDefault().Indication_Name.ToString(); var productlist = (from h in productData where h.Indication_Master_Id == _indication.IndicationId where h.Therapeutic_Area_Master_Id == TherapeuticId where h.SubTherapeutic_Area_Master_Id == SubTherapeuticId where h.Is_Active == true select new ProductList() { ProductId = h.Brand_Master_Id, ProductName = h.Brand_Name, IndicationId = h.Indication_Master_Id }).OrderBy(x => x.ProductName).ToList(); _indication.ProductList = productlist; listresponse.Add(_indication); } return(listresponse); }
public static List <AreaList2> GetCountryListDSForPJ(List <String> areaID) { List <AreaList2> lstresponse = new List <AreaList2>(); using (PJEntities entity = new PJEntities()) { var countryData = entity.Country_Master.ToList(); var areaData = entity.Area_Master.ToList(); for (int i = 0; i < areaID.Count; i++) { AreaList2 _area = new AreaList2(); _area.AreaId = Convert.ToInt32(areaID[i]); _area.AreaName = areaData.Where(x => x.Area_Master_Id == _area.AreaId).FirstOrDefault().Area_Name.ToString(); var countrylist = (from h in countryData where h.Area_Master_Id == _area.AreaId where h.Is_Active == true select new CountryList() { CountryId = h.Country_Master_Id, CountryName = h.Country_Name, AreaId = h.Area_Master_Id }).OrderBy(x => x.CountryName).ToList(); _area.CountryList = countrylist; lstresponse.Add(_area); } } return(lstresponse); }
public static Int32?InsertNewUser(User userdetails) { using (PJEntities _entity = new PJEntities()) { //USER _user = new USER(); //_user.FIRST_NAME = userdetail.FirstName; //_user.LAST_NAME = userdetail.LastName; //_user.MIDDLE_INITIAL = userdetail.MiddleInitial; //_user.IS_ACTIVE = userdetail.IsActive; //_user.USER_511 = userdetail.User511; //_user.UPI = Convert.ToDecimal(userdetail.UPI); //_user.EMAILID = userdetail.Email; //_user.CREATED_BY = userdetail.CreatedBy; //_user.CREATED_DATE = Convert.ToDateTime(userdetail.CreatedDate); //_user.MODIFIED_BY = userdetail.ModifiedBy; //_user.MODIFIED_DATE = Conveuserdetail.ModifiedDate; try { _entity.Users.Add(userdetails); _entity.SaveChanges(); return(userdetails.User_Id); } catch { return(0); } } }
public static Int32?UpdateUserDetails(User _user) { using (PJEntities _entity = new PJEntities()) { try { var _selectedUser = _entity.Users.Where(x => x.User_Id == _user.User_Id).FirstOrDefault(); _selectedUser.First_Name = _user.First_Name; _selectedUser.Last_Name = _user.Last_Name; _selectedUser.Middle_Initial = _user.Middle_Initial; _selectedUser.Email_Id = _user.Email_Id; _selectedUser.User_511 = _user.User_511; _selectedUser.UPI = _user.UPI; _selectedUser.Is_Active = _user.Is_Active; _selectedUser.Modified_Date = _user.Modified_Date; _selectedUser.Modified_By = _user.Modified_By; _entity.SaveChanges(); return(_selectedUser.User_Id); } catch { return(0); } } }
public static StrategicMoment GetAllStrategicMoment(string CountryId, string BrandId, string Year) { StrategicMoment lstJourney = new StrategicMoment(); List <String> lstCountryId = new List <String>(); lstCountryId = CountryId.Split(',').ToList(); List <String> lstBrandId = new List <String>(); lstBrandId = BrandId.Split(',').ToList(); try { Patient_Journey result = new Patient_Journey(); result = dbPatientJourney.GetApprovedJourney(Convert.ToInt32(lstCountryId[0]), Convert.ToInt32(lstBrandId[0]), Convert.ToInt32(Year)); PJEntities entity = new PJEntities(); if (result != null) { lstJourney.JourneyId = result.Patient_Journey_Id; List <StrategicMomentModel> strategicMoment = bsStrategicMoment.GetStrategicMoment(result.Patient_Journey_Id.ToString()); lstJourney.Strategic_Moment = strategicMoment; } } catch (Exception) { } return(lstJourney); }
public static List <StrategicMomentModel> GetStrategicMoment(string JourneyId) { List <StrategicMomentModel> listStrategicMoment = new List <StrategicMomentModel>(); PJEntities entity = new PJEntities(); var momentList = dbStrategicMoment.GetStrategicMoment(Convert.ToInt32(JourneyId)); var stagesMasterList = dbStrategicMoment.GetStages(); var transactionMasterList = dbStrategicMoment.GetTransactions(); var journeyStagesList = dbStrategicMoment.GetJourneyStages(); var journeyTransactionsList = dbStrategicMoment.GetJourneyTransactions(); for (int i = 0; i < momentList.Count; i++) { StrategicMomentModel strategicMoment = new StrategicMomentModel(); strategicMoment.Id = i + 1; strategicMoment.Title = momentList[i].Title; strategicMoment.StrategicMomentId = Convert.ToInt32(momentList[i].Patient_Journey_Strategic_Moment_Id); strategicMoment.StrategicMomentTempId = Convert.ToInt32(momentList[i].Patient_Journey_Strategic_Moment_Temp_Id); strategicMoment.StartStageId = Convert.ToInt32(momentList[i].Patient_Journey_Start_Stage_Id); strategicMoment.StartStageMasterId = journeyStagesList.Where(x => x.Patient_Journey_Stages_Id == strategicMoment.StartStageId).Select(x => x.Stage_Master_Id).FirstOrDefault(); strategicMoment.StartStage = stagesMasterList.Where(x => x.Stage_Master_Id == strategicMoment.StartStageMasterId).Select(x => x.Stage_Name).FirstOrDefault().ToString(); strategicMoment.EndStageId = Convert.ToInt32(momentList[i].Patient_Journey_End_Stage_Id); strategicMoment.EndStageMasterId = journeyStagesList.Where(x => x.Patient_Journey_Stages_Id == strategicMoment.EndStageId).Select(x => x.Stage_Master_Id).FirstOrDefault(); strategicMoment.EndStage = stagesMasterList.Where(x => x.Stage_Master_Id == strategicMoment.EndStageMasterId).Select(x => x.Stage_Name).FirstOrDefault().ToString();; strategicMoment.Description = momentList[i].Description; strategicMoment.Category = momentList[i].Category; strategicMoment.StartTransactionId = momentList[i].Patient_Journey_Start_Transaction_Id; strategicMoment.EndTransactionId = momentList[i].Patient_Journey_End_Transaction_Id; strategicMoment.StartTransactionMasterId = journeyTransactionsList.Where(x => x.Patient_Journey_Transactions_Id == strategicMoment.StartTransactionId).Select(x => x.Transaction_Master_Id).FirstOrDefault(); strategicMoment.EndTransactionMasterId = journeyTransactionsList.Where(x => x.Patient_Journey_Transactions_Id == strategicMoment.EndTransactionId).Select(x => x.Transaction_Master_Id).FirstOrDefault(); strategicMoment.StartTransaction = transactionMasterList.Where(x => x.Transaction_Master_Id == strategicMoment.StartTransactionMasterId).Select(x => x.Transaction_Name).FirstOrDefault().ToString(); strategicMoment.EndTransaction = transactionMasterList.Where(x => x.Transaction_Master_Id == strategicMoment.EndTransactionMasterId).Select(x => x.Transaction_Name).FirstOrDefault().ToString(); listStrategicMoment.Add(strategicMoment); } return(listStrategicMoment); }
public static int?SaveTempData(int CountryId, int BrandId, int Year, string UserName) { int status = 0; using (PJEntities entity = new PJEntities()) { var currentPdf = entity.Journey_Pdf_TempData.Where(s => s.UserName.ToUpper() == UserName.ToUpper()); foreach (var _currentPdf in currentPdf) { entity.Journey_Pdf_TempData.Remove(_currentPdf); } entity.SaveChanges(); Journey_Pdf_TempData pdfTempData = new Journey_Pdf_TempData(); pdfTempData.Brand_Id = Convert.ToInt32(BrandId); pdfTempData.Country_Id = Convert.ToInt32(CountryId); pdfTempData.Year = Convert.ToInt32(Year); pdfTempData.UserName = UserName.ToUpper(); pdfTempData.CreatedBy = UserName; pdfTempData.CreatedDate = DateTime.UtcNow; pdfTempData.ModifiedDate = DateTime.UtcNow; entity.Journey_Pdf_TempData.Add(pdfTempData); entity.SaveChanges(); status = 1; } return(status); }
public static Int32?AddSubClinicalInterventionToTemp(List <Patient_Journey_Trans_SubClin_Interventions_Temp> subclinicalIntervention) { try { using (PJEntities entity = new PJEntities()) { Patient_Journey_Trans_SubClin_Interventions_Temp subClinical = null; if (subclinicalIntervention != null) { for (int i = 0; i < subclinicalIntervention.Count; i++) { subClinical = new Patient_Journey_Trans_SubClin_Interventions_Temp(); subClinical.Patient_Journey_Trans_Clin_Interventions_Temp_Id = subclinicalIntervention[i].Patient_Journey_Trans_Clin_Interventions_Temp_Id; subClinical.SubClinical_Intervention_Master_Id = subclinicalIntervention[i].SubClinical_Intervention_Master_Id; subClinical.Created_By = subclinicalIntervention[i].Created_By; subClinical.Created_Date = subclinicalIntervention[i].Created_Date; subClinical.Modified_By = subclinicalIntervention[i].Modified_By; subClinical.Modified_Date = subclinicalIntervention[i].Modified_Date; entity.Patient_Journey_Trans_SubClin_Interventions_Temp.Add(subClinical); entity.SaveChanges(); } return(1); } else { return(0); } } } catch (Exception) { return(0); } }
public static Int32?AddClinicalInterventionToTemp(Patient_Journey_Trans_Clin_Interventions_Temp clinicalIntervention, int[] lstSubClinical) { try { using (PJEntities entity = new PJEntities()) { entity.Patient_Journey_Trans_Clin_Interventions_Temp.Add(clinicalIntervention); Patient_Journey_Trans_SubClin_Interventions_Temp subClinical = null; if (lstSubClinical != null) { for (int i = 0; i < lstSubClinical.Length; i++) { subClinical = new Patient_Journey_Trans_SubClin_Interventions_Temp(); subClinical.Patient_Journey_Trans_Clin_Interventions_Temp_Id = clinicalIntervention.Patient_Journey_Trans_Clin_Interventions_Temp_Id; subClinical.SubClinical_Intervention_Master_Id = lstSubClinical[i]; subClinical.Created_By = clinicalIntervention.Created_By; subClinical.Created_Date = clinicalIntervention.Created_Date; subClinical.Modified_By = clinicalIntervention.Modified_By; subClinical.Modified_Date = clinicalIntervention.Modified_Date; entity.Patient_Journey_Trans_SubClin_Interventions_Temp.Add(subClinical); } } entity.SaveChanges(); return(clinicalIntervention.Patient_Journey_Trans_Clin_Interventions_Temp_Id); } } catch (Exception) { return(0); } }
public static List <ArchetypeList> GetArchetypeName(List <String> lstArchetypeId) { List <ArchetypeList> lstresponse = new List <ArchetypeList>(); using (PJEntities entity = new PJEntities()) { var archetypeData = entity.Archetype_Master.ToList(); for (int i = 0; i < lstArchetypeId.Count; i++) { int archetypeID = Convert.ToInt32(lstArchetypeId[i]); var archetypelist = (from h in archetypeData where h.Archetype_Master_Id == archetypeID where h.Is_Active == true select new ArchetypeList() { ArchetypeName = h.Archetype_Name }).ToList(); lstresponse = archetypelist; } } return(lstresponse); }
public static List <SelectedProduct> GetProductNames(List <String> lstProductId) { List <SelectedProduct> lstresponse = new List <SelectedProduct>(); using (PJEntities entity = new PJEntities()) { var brandData = entity.Brand_Master.ToList(); for (int i = 0; i < lstProductId.Count; i++) { int productID = Convert.ToInt32(lstProductId[i]); SelectedProduct productlist = (from h in brandData where h.Brand_Master_Id == productID where h.Is_Active == true select new SelectedProduct() { ProductName = h.Brand_Name, ProductId = h.Brand_Master_Id }).FirstOrDefault(); lstresponse.Add(productlist); } } return(lstresponse); }
public static Int32?UpdateStrategicMomentTemp(Patient_Journey_Strategic_Moment_Temp strategicMomentsTemp) { try { using (PJEntities entity = new PJEntities()) { var currentStrategic = entity.Patient_Journey_Strategic_Moment_Temp.Where(s => s.Patient_Journey_Strategic_Moment_Temp_Id == strategicMomentsTemp.Patient_Journey_Strategic_Moment_Temp_Id).FirstOrDefault(); if (currentStrategic != null) { currentStrategic.Title = strategicMomentsTemp.Title; currentStrategic.Patient_Journey_Temp_Id = strategicMomentsTemp.Patient_Journey_Temp_Id; currentStrategic.Patient_Journey_Start_Stage_Temp_Id = strategicMomentsTemp.Patient_Journey_Start_Stage_Temp_Id; currentStrategic.Patient_Journey_End_Stage_Temp_Id = strategicMomentsTemp.Patient_Journey_End_Stage_Temp_Id; currentStrategic.Patient_Journey_Start_Transaction_Temp_Id = strategicMomentsTemp.Patient_Journey_Start_Transaction_Temp_Id; currentStrategic.Patient_Journey_End_Transaction_Temp_Id = strategicMomentsTemp.Patient_Journey_End_Transaction_Temp_Id; currentStrategic.Description = strategicMomentsTemp.Description; currentStrategic.Category = strategicMomentsTemp.Category; currentStrategic.Modified_By = strategicMomentsTemp.Modified_By; currentStrategic.Modified_Date = strategicMomentsTemp.Modified_Date; } entity.SaveChanges(); return(1); } } catch (Exception) { return(0); } }
public static List <User_Logon_Audit> GetAuditforSearchCriteria(String SearchText) { using (PJEntities _entity = new PJEntities()) { try { List <User_Logon_Audit> _auditFilter = new List <User_Logon_Audit>(); var auditList = _entity.User_Logon_Audit.ToList(); SearchText = SearchText.ToLower(); _auditFilter = (from h in auditList where h.First_Name.Contains(SearchText) || h.Last_Name.Contains(SearchText) || h.UPI.ToString().Contains(SearchText) || h.User_511.Contains(SearchText) || h.Email_Id.Contains(SearchText) || h.Logon_Client_TimeZone.Contains(SearchText) select h).ToList(); return(_auditFilter); } catch (Exception ex) { throw ex; } } }
public static List <MasterDataModel> GetMastersForAddUser() { List <MasterDataModel> _finalList = new List <MasterDataModel>(); MasterDataModel _master; using (PJEntities _entity = new PJEntities()) { var countryData = _entity.Country_Master.ToList(); var roleData = _entity.Role_Master.ToList(); _master = new MasterDataModel(); _master.CountryMasterList = (from a in countryData select new CountryMaster_List() { CountryId = a.Country_Master_Id, CountryName = a.Country_Name }).OrderBy(x => x.CountryName).ToList(); _master.RoleMasterList = (from a in roleData select new RoleMaster_List() { RoleId = a.Role_Master_Id, RoleName = a.Role_Name }).OrderBy(x => x.RoleName).ToList(); _finalList.Add(_master); } return(_finalList); }
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); }
public static List <User_Country_Association> GetCountryForUser(int userId) { using (PJEntities _entity = new PJEntities()) { var result = _entity.User_Country_Association.Where(x => x.User_Id == userId).ToList(); return(result); } }
public static List <User_Roles> GetRolesForUser(int userId) { using (PJEntities _entity = new PJEntities()) { var result = _entity.User_Roles.Where(x => x.User_Id == userId).ToList(); return(result); } }
public static List <User_Country_Association> GetallCountryForUsers() { using (PJEntities _entity = new PJEntities()) { var result = _entity.User_Country_Association.ToList(); return(result); } }
public static List <User_Roles> GetallRolesForUser() { using (PJEntities _entity = new PJEntities()) { var result = _entity.User_Roles.ToList(); return(result); } }
public static List <Country_Master> GetallCountry() { using (PJEntities _entity = new PJEntities()) { var result = _entity.Country_Master.ToList(); return(result); } }
public static List <Role_Master> GetallRoles() { using (PJEntities _entity = new PJEntities()) { var result = _entity.Role_Master.ToList(); return(result); } }
public List <Stage_Master> GetStagesMasterData() { using (PJEntities _entity = new PJEntities()) { var result = _entity.Stage_Master.ToList(); return(result); } }
public List <Patient_Journey_Transactions> GetPatientJourneyTransactions() { using (PJEntities _entity = new PJEntities()) { var result = _entity.Patient_Journey_Transactions.ToList(); return(result); } }
public List <Patient_Journey_Stages> GetPatientJourneyStages() { using (PJEntities _entity = new PJEntities()) { var result = _entity.Patient_Journey_Stages.ToList(); return(result); } }
public List <Brand_Master> GetProductDetails() { using (PJEntities _entity = new PJEntities()) { var result = _entity.Brand_Master.ToList(); return(result); } }