示例#1
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     String name = TextBox1.Text.Trim();
     using (LiBoClothesShopEntities context = new LiBoClothesShopEntities())
     {
         SizeInfo newObj = new SizeInfo()
         {
             Name = name
         };
         context.AddToSizeInfoes(newObj);
         context.SaveChanges();
         Response.Redirect("~/Default.aspx");
     }
 }
示例#2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the SizeInfoes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSizeInfoes(SizeInfo sizeInfo)
 {
     base.AddObject("SizeInfoes", sizeInfo);
 }
示例#3
0
 /// <summary>
 /// Create a new SizeInfo object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 public static SizeInfo CreateSizeInfo(global::System.Int32 id, global::System.String name)
 {
     SizeInfo sizeInfo = new SizeInfo();
     sizeInfo.Id = id;
     sizeInfo.Name = name;
     return sizeInfo;
 }