示例#1
0
 /// <summary>
 /// Create a new DefaultProperty object.
 /// </summary>
 /// <param name="defaultPropertyID">Initial value of the DefaultPropertyID property.</param>
 /// <param name="defaultPropertyName">Initial value of the DefaultPropertyName property.</param>
 /// <param name="defaultPropertyDesc">Initial value of the DefaultPropertyDesc property.</param>
 /// <param name="defaultPropertyValue">Initial value of the DefaultPropertyValue property.</param>
 public static DefaultProperty CreateDefaultProperty(global::System.Int32 defaultPropertyID, global::System.String defaultPropertyName, global::System.String defaultPropertyDesc, global::System.Int32 defaultPropertyValue)
 {
     DefaultProperty defaultProperty = new DefaultProperty();
     defaultProperty.DefaultPropertyID = defaultPropertyID;
     defaultProperty.DefaultPropertyName = defaultPropertyName;
     defaultProperty.DefaultPropertyDesc = defaultPropertyDesc;
     defaultProperty.DefaultPropertyValue = defaultPropertyValue;
     return defaultProperty;
 }
示例#2
0
 public int GetDefaultValueByName(string str)
 {
     DefaultProperty obj = new DefaultProperty();
     obj = db.DefaultProperties.Where(o => o.DefaultPropertyName == str).SingleOrDefault();
     return obj.DefaultPropertyValue;
 }
示例#3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the DefaultProperties EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToDefaultProperties(DefaultProperty defaultProperty)
 {
     base.AddObject("DefaultProperties", defaultProperty);
 }