Пример #1
0
        private void SaveData(LoadOperation<nv_thuethu> lo)
        {

            if (lo.Entities.Count() > 0)
            {
                MessageBox.Show("Tuyến thu " + this.txttuyen.Text.Trim().ToUpper() + " đã tồn tại");
            }
            else
            {               

                if (txttuyen.Text.Trim() != "" || txtten.Text.Trim() != "")
                {
                    nv_thuethu nv = new nv_thuethu
                    {
                        ten = txttuyen.Text.Trim().ToUpper(),
                        ten_nv = txtten.Text.Trim(),
                        ghi_chu=txtghichu.Text.Trim(),
                        ma_huyen=App.ma_huyen
                    };
                    dstb.nv_thuethus.Add(nv);
                    dstb.SubmitChanges(OnSubmitCompleted, true);                             
                }
                else
                    MessageBox.Show("Nhập chưa đủ thông tin");
            }
        }
Пример #2
0
 /// <summary>
 /// Create a new nv_thuethu object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 public static nv_thuethu Createnv_thuethu(global::System.Decimal id)
 {
     nv_thuethu nv_thuethu = new nv_thuethu();
     nv_thuethu.id = id;
     return nv_thuethu;
 }
Пример #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the nv_thuethu EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTonv_thuethu(nv_thuethu nv_thuethu)
 {
     base.AddObject("nv_thuethu", nv_thuethu);
 }