コード例 #1
0
        private void SaveData(LoadOperation<ma_ap> lo)
        {

            if (lo.Entities.Count() > 0)
            {
                MessageBox.Show("Mã xã phường " + this.txtmaap.Text.Trim().ToUpper() + " đã tồn tại");
            }
            else
            {

                if (txtmaap.Text.Trim() != "" || txtten.Text.Trim() != "")
                {
                    ma_ap ap = new ma_ap
                    {
                       maxa = m_maxa,
                       maap = this.txtmaap.Text.Trim().ToUpper(),
                       ten_ap = txtten.Text.Trim()            
                    };
                    dstb.ma_aps.Add(ap);
                    dstb.SubmitChanges(OnSubmitCompleted, true);
                }
                else
                    MessageBox.Show("Nhập chưa đủ thông tin");
            }
        }
コード例 #2
0
 /// <summary>
 /// Create a new ma_ap object.
 /// </summary>
 /// <param name="maxa">Initial value of the maxa property.</param>
 /// <param name="maap">Initial value of the maap property.</param>
 /// <param name="id">Initial value of the id property.</param>
 public static ma_ap Createma_ap(global::System.String maxa, global::System.String maap, global::System.Decimal id)
 {
     ma_ap ma_ap = new ma_ap();
     ma_ap.maxa = maxa;
     ma_ap.maap = maap;
     ma_ap.id = id;
     return ma_ap;
 }
コード例 #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ma_ap EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToma_ap(ma_ap ma_ap)
 {
     base.AddObject("ma_ap", ma_ap);
 }