public static string CreateRootDirectory(string pageName, string dirPath) { try { using (objDataContext = new CommonDataContext(StrConnection)) { AAAAConfigSetting objSetting = objDataContext.AAAAConfigSettings.Where(x => x.KeyName == "DocRootFolderPath").FirstOrDefault(); if (objSetting != null) { dirPath = objSetting.KeyValue + dirPath; if (!Directory.Exists(dirPath)) { Directory.CreateDirectory(dirPath); } } return(dirPath); } } catch (Exception ex) { Write(ex, System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), PageMaster.LgCommon); return(null); } }
public AppConfiguration(ILogger logger, IConfiguration configuration, CommonDataContext commonDataContext) { _logger = logger; BaseConfiguration = configuration; _commonDataContext = commonDataContext; }
/// <summary> /// Finds all Gender data with language I D containing specified keyword /// </summary> /// <param name="languageID"> Language I D</param> /// <returns>List of Gender</returns> public List <Gender> FindByLanguageID(string languageID) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.Genders where o.LanguageID.Contains(languageID) select o; return(list.ToList()); }
//------------------- Find by keywords -------------------------------------------------------- /// <summary> /// Finds all City data with city Name containing specified keyword /// </summary> /// <param name="cityName"> City Name</param> /// <returns>List of City</returns> public List <City> FindByCityName(string cityName) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.Cities where o.CityName.Contains(cityName) select o; return(list.ToList()); }
//---------------------- find by dates ----------------------------------------------- //----------------------- Find by Foreign keys --------------------------------------- /// <summary> /// Finds all City data with specified country Id /// </summary> /// <param name="countryId"> Country Id</param> /// <returns>List of City</returns> public List <City> FindByCountryId(Int16 countryId) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.Cities where o.CountryId == countryId select o; return(list.ToList()); }
/// <summary> /// Finds all Language data with language Desc containing specified keyword /// </summary> /// <param name="languageDesc"> Language Desc</param> /// <returns>List of Language</returns> public List <Language> FindByLanguageDesc(string languageDesc) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.Languages where o.LanguageDesc.Contains(languageDesc) select o; return(list.ToList()); }
/// <summary> /// Finds all User Info data with phone containing specified keyword /// </summary> /// <param name="phone"> Phone</param> /// <returns>List of User Info</returns> public List <UserInfo> FindByPhone(string phone) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.UserInfoes where o.Phone.Contains(phone) select o; return(list.ToList()); }
/// <summary> /// Finds all User Info data with last Name containing specified keyword /// </summary> /// <param name="lastName"> Last Name</param> /// <returns>List of User Info</returns> public List <UserInfo> FindByLastName(string lastName) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.UserInfoes where o.LastName.Contains(lastName) select o; return(list.ToList()); }
/// <summary> /// Finds all User Info data with specified city Id /// </summary> /// <param name="cityId"> City Id</param> /// <returns>List of User Info</returns> public List <UserInfo> FindByCityId(Int16 cityId) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.UserInfoes where o.CityId == cityId select o; return(list.ToList()); }
/// <summary> /// Finds all User Info data with address containing specified keyword /// </summary> /// <param name="address"> Address</param> /// <returns>List of User Info</returns> public List <UserInfo> FindByAddress(string address) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.UserInfoes where o.Address.Contains(address) select o; return(list.ToList()); }
//---------------------- find by dates ----------------------------------------------- //----------------------- Find by Foreign keys --------------------------------------- /// <summary> /// Finds all Country data with specified is Active /// </summary> /// <param name="isActive"> Is Active</param> /// <returns>List of Country</returns> public List <Country> FindByIsActive(Int16 isActive) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.Countries where o.IsActive == isActive select o; return(list.ToList()); }
/// <summary> /// Finds all Country data with country Flag Icon containing specified keyword /// </summary> /// <param name="countryFlagIcon"> Country Flag Icon</param> /// <returns>List of Country</returns> public List <Country> FindByCountryFlagIcon(string countryFlagIcon) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.Countries where o.CountryFlagIcon.Contains(countryFlagIcon) select o; return(list.ToList()); }
/// <summary> /// Finds all Language Keyword data with keyword Text containing specified keyword /// </summary> /// <param name="keywordText"> Keyword Text</param> /// <returns>List of Language Keyword</returns> public List <LanguageKeyword> FindByKeywordText(string keywordText) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.LanguageKeywords where o.KeywordText.Contains(keywordText) select o; return(list.ToList()); }
/// <summary> /// Finds all City data with lang I D containing specified keyword /// </summary> /// <param name="langID"> Lang I D</param> /// <returns>List of City</returns> public List <City> FindByLangID(string langID) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.Cities where o.LangID.Contains(langID) select o; return(list.ToList()); }
/// <summary> /// Finds all City data with city Location Lat containing specified keyword /// </summary> /// <param name="cityLocationLat"> City Location Lat</param> /// <returns>List of City</returns> public List <City> FindByCityLocationLat(float cityLocationLat) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.Cities where o.CityLocationLat.Equals(cityLocationLat) select o; return(list.ToList()); }
/// <summary> /// Finds all Gender data with gender Icon containing specified keyword /// </summary> /// <param name="genderIcon"> Gender Icon</param> /// <returns>List of Gender</returns> public List <Gender> FindByGenderIcon(string genderIcon) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.Genders where o.GenderIcon.Contains(genderIcon) select o; return(list.ToList()); }
/// <summary> /// Finds all User Login data with application I D containing specified keyword /// </summary> /// <param name="applicationID"> Application I D</param> /// <returns>List of User Login</returns> public List <UserLogin> FindByApplicationID(string applicationID) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.UserLogins where o.ApplicationID.Contains(applicationID) select o; return(list.ToList()); }
/// <summary> /// Finds all User Login data with user Password containing specified keyword /// </summary> /// <param name="userPassword"> User Password</param> /// <returns>List of User Login</returns> public List <UserLogin> FindByUserPassword(string userPassword) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.UserLogins where o.UserPassword.Contains(userPassword) select o; return(list.ToList()); }
/// <summary> /// Delete all User Info data with phone containing specified keyword /// </summary> /// <param name="phone"> Phone</param> /// <returns>List of User Info</returns> public void DeleteByPhone(string phone) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.UserInfoes where o.Phone.Contains(phone) select o; dataContext.UserInfoes.RemoveRange(list); dataContext.SaveChanges(); }
/// <summary> /// Delete all User Info data with specified city Id /// </summary> /// <param name="cityId"> City Id</param> /// <returns>List of User Info</returns> public void DeleteByCityId(Int16 cityId) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.UserInfoes where o.CityId == cityId select o; dataContext.UserInfoes.RemoveRange(list); dataContext.SaveChanges(); }
/// <summary> /// Delete all User Info data with address containing specified keyword /// </summary> /// <param name="address"> Address</param> /// <returns>List of User Info</returns> public void DeleteByAddress(string address) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.UserInfoes where o.Address.Contains(address) select o; dataContext.UserInfoes.RemoveRange(list); dataContext.SaveChanges(); }
/// <summary> /// Delete all Gender data with language I D containing specified keyword /// </summary> /// <param name="languageID"> Language I D</param> /// <returns>List of Gender</returns> public void DeleteByLanguageID(string languageID) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.Genders where o.LanguageID.Contains(languageID) select o; dataContext.Genders.RemoveRange(list); dataContext.SaveChanges(); }
/// <summary> /// Delete all Gender data with gender Icon containing specified keyword /// </summary> /// <param name="genderIcon"> Gender Icon</param> /// <returns>List of Gender</returns> public void DeleteByGenderIcon(string genderIcon) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.Genders where o.GenderIcon.Contains(genderIcon) select o; dataContext.Genders.RemoveRange(list); dataContext.SaveChanges(); }
/// <summary> /// Finds all User Info data with specified user Id, gender Id /// </summary> /// <param name="userId"> User Id</param> /// <param name="genderId"> Gender Id</param> /// <returns>List of User Info</returns> public List <UserInfo> FindByUserIdAndGenderId(Int64 userId, Int16 genderId) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.UserInfoes where o.UserId == userId && o.GenderId == genderId select o; return(list.ToList()); }
/// <summary> /// Delete all City data with city Location Lat containing specified keyword /// </summary> /// <param name="cityLocationLat"> City Location Lat</param> /// <returns>List of City</returns> public void DeleteByCityLocationLat(float cityLocationLat) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.Cities where o.CityLocationLat.Equals(cityLocationLat) select o; dataContext.Cities.RemoveRange(list); dataContext.SaveChanges(); }
//------------------- Delete by keywords -------------------------------------------------------- /// <summary> /// Delete all City data with city Name containing specified keyword /// </summary> /// <param name="cityName"> City Name</param> /// <returns>List of City</returns> public void DeleteByCityName(string cityName) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.Cities where o.CityName.Contains(cityName) select o; dataContext.Cities.RemoveRange(list); dataContext.SaveChanges(); }
/// <summary> /// Delete all User Login data with application I D containing specified keyword /// </summary> /// <param name="applicationID"> Application I D</param> /// <returns>List of User Login</returns> public void DeleteByApplicationID(string applicationID) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.UserLogins where o.ApplicationID.Contains(applicationID) select o; dataContext.UserLogins.RemoveRange(list); dataContext.SaveChanges(); }
/// <summary> /// Delete all User Login data with created Date containing specified keyword /// </summary> /// <param name="createdDate"> Created Date</param> /// <returns>List of User Login</returns> public void DeleteByCreatedDate(DateTime createdDate) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.UserLogins where o.CreatedDate.Equals(createdDate) select o; dataContext.UserLogins.RemoveRange(list); dataContext.SaveChanges(); }
//----------------------- Delete by Foreign keys --------------------------------------- /// <summary> /// Delete all User Login data with specified is Active /// </summary> /// <param name="isActive"> Is Active</param> /// <returns>List of User Login</returns> public void DeleteByIsActive(Int16 isActive) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.UserLogins where o.IsActive == isActive select o; dataContext.UserLogins.RemoveRange(list); dataContext.SaveChanges(); }
/// <summary> /// Delete all User Login data with user Password containing specified keyword /// </summary> /// <param name="userPassword"> User Password</param> /// <returns>List of User Login</returns> public void DeleteByUserPassword(string userPassword) { CommonDataContext dataContext = (CommonDataContext)this.DataContext; var list = from o in dataContext.UserLogins where o.UserPassword.Contains(userPassword) select o; dataContext.UserLogins.RemoveRange(list); dataContext.SaveChanges(); }
public bool commitDelete(int _id) { //deleting the record by id CommonDataContext obj = new CommonDataContext(); using (obj) { var delFeedback = obj.brdhc_Feedbacks.Single(x => x.feedbackId == _id); obj.brdhc_Feedbacks.DeleteOnSubmit(delFeedback); obj.SubmitChanges(); return true; } }
public bool commitInsert(string _firstname, string _lastname, string _ispatient, string _gender, string _city, string _state, string _mobile, string _email, string _feedback) { // insert new record into database CommonDataContext objfeedback = new CommonDataContext(); using (objfeedback) { brdhc_Feedback obj = new brdhc_Feedback(); obj.firstName = _firstname; obj.lastName = _lastname; obj.isPatient = _ispatient; obj.gender = _gender; obj.city = _city; obj.state = _state; obj.mobile = _mobile; obj.email = _email; obj.feedback = _feedback; objfeedback.brdhc_Feedbacks.InsertOnSubmit(obj); objfeedback.SubmitChanges(); return true; } }
public IQueryable<brdhc_Feedback> getFeedbackByID(int id) { CommonDataContext objfeedback = new CommonDataContext(); var feedback = objfeedback.brdhc_Feedbacks.Where(x => x.feedbackId == id).Select(x => x); return feedback; }
public IQueryable<brdhc_Feedback> getFeedbacks() { CommonDataContext objfeedback = new CommonDataContext(); var allfeedbacks = objfeedback.brdhc_Feedbacks.Select(x => x); return allfeedbacks; }