public void insertClusteringSettingDetail(Cluster_Setting_Value csv) { Dictionary <string, object> parameters = new Dictionary <string, object>(); parameters.Add("@Key", csv.Key); parameters.Add("@Value", csv.Value); parameters.Add("@isDefault", csv.isDedault); executeNonQuery("INSERT INTO [RS].[CLUSTER_SETTING_VALUE_TBL]([Key] ,[Value],[isDefault])VALUES(@Key,@Value,@isDefault)", parameters); }
public void updateClusteringSettingDetail(Cluster_Setting_Value csv) { Dictionary <string, object> parameters = new Dictionary <string, object>(); parameters.Add("@Key", csv.Key); parameters.Add("@Value", csv.Value); parameters.Add("@isDefault", csv.isDedault); parameters.Add("@ValueID", csv.ValueID); executeNonQuery("UPDATE [RS].[CLUSTER_SETTING_VALUE_TBL] SET [Key] = @Key ,[Value] = @Value ,[isDefault] = @isDefault WHERE ValueID = @ValueID", parameters); }
public List <Cluster_Setting_Value> getListClusteringSettingValue(string Key) { Dictionary <string, object> parameters = new Dictionary <string, object>(); parameters.Add("@Key", Key); SqlDataReader reader = executeReader("SELECT ValueID,Value,isDefault FROM RS.CLUSTER_SETTING_VALUE_TBL WHERE [Keys] = @Key ORDER BY isDefault DESC", parameters); List <Cluster_Setting_Value> lstClusteringSettingValue = new List <Cluster_Setting_Value>(); while (reader.Read()) { Cluster_Setting_Value csv = new Cluster_Setting_Value(); csv.ValueID = reader.GetInt32(reader.GetOrdinal("ValueID")); csv.Value = reader.GetString(reader.GetOrdinal("Value")); csv.isDedault = reader.GetBoolean(reader.GetOrdinal("isDefault")); csv.Key = Key; lstClusteringSettingValue.Add(csv); } reader.Close(); return(lstClusteringSettingValue); }