Esempio n. 1
0
 private void cmdThem_Click(object sender, RoutedEventArgs e)
 {
     if (txtten.Text.Trim() != "")
     {
         ma_duong xa = new ma_duong
         {
             ten_duong = txtten.Text.Trim(),
             ma_huyen = App.ma_huyen
         };
         dstb.ma_duongs.Add(xa);
         dstb.SubmitChanges(OnSubmitCompleted, true);
         txtten.Text = "";
     }
     else
         MessageBox.Show("Chưa nhập tên đường !");
 }        
Esempio n. 2
0
 /// <summary>
 /// Create a new ma_duong object.
 /// </summary>
 /// <param name="ten_duong">Initial value of the ten_duong property.</param>
 /// <param name="ma_huyen">Initial value of the ma_huyen property.</param>
 /// <param name="id">Initial value of the id property.</param>
 public static ma_duong Createma_duong(global::System.String ten_duong, global::System.String ma_huyen, global::System.Decimal id)
 {
     ma_duong ma_duong = new ma_duong();
     ma_duong.ten_duong = ten_duong;
     ma_duong.ma_huyen = ma_huyen;
     ma_duong.id = id;
     return ma_duong;
 }
Esempio n. 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ma_duong EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToma_duong(ma_duong ma_duong)
 {
     base.AddObject("ma_duong", ma_duong);
 }