public static void RenameFilter(int FilterID, string FilterName) { PIKCV.DAL.Filters objFilters = new PIKCV.DAL.Filters(); objFilters.LoadByPrimaryKey(FilterID); objFilters.FilterName = Util.ReplaceStrForDB(FilterName); objFilters.Save(); }
public static bool RemoveFilter(int FilterID) { try { PIKCV.DAL.Filters objFilters = new PIKCV.DAL.Filters(); objFilters.LoadByPrimaryKey(FilterID); objFilters.IsDeleted = true; objFilters.Save(); return(true); } catch (Exception) { return(false); } }
public static void SaveFilter(PIKCV.COM.EnumDB.FilterTypes FilterType, string FilterName, int OwnerID, PIKCV.COM.EnumDB.MemberTypes MemberType, string FilterValue) { try { PIKCV.DAL.Filters objFilter = new PIKCV.DAL.Filters(); objFilter.AddNew(); objFilter.CreateDate = DateTime.Now; objFilter.FilterName = Util.ReplaceStrForDB(FilterName); objFilter.FilterOwnerID = OwnerID; objFilter.FilterOwnerTypeCode = (int)MemberType; objFilter.FilterTypeCode = (int)FilterType; objFilter.FilterValue = FilterValue; objFilter.IsDeleted = false; objFilter.ModifyDate = DateTime.Now; objFilter.Save(); } catch (Exception) { } }