示例#1
0
 private void CreateBank()
 {
     DataAccess da = new DataAccess();
     bank item = new bank();
     item.mfo = edtMFO.Text;
     item.fax = edtFax.Text;
     item.address = edtAddress.Text;
     item.name = edtName.Text;
     item.phone = edtPhone.Text;
     da.BankCreate(item);
 }
示例#2
0
 private void EditBank()
 {
     DataAccess da = new DataAccess();
     bank item = new bank();
     item.id = this._ID;
     item.mfo = edtMFO.Text;
     item.fax = edtFax.Text;
     item.address = edtAddress.Text;
     item.name = edtName.Text;
     item.phone = edtPhone.Text;
     da.BankEdit(item);
 }
示例#3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the banks EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTobanks(bank bank)
 {
     base.AddObject("banks", bank);
 }
示例#4
0
 /// <summary>
 /// Create a new bank object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 /// <param name="name">Initial value of the name property.</param>
 /// <param name="created_on">Initial value of the created_on property.</param>
 public static bank Createbank(global::System.Int32 id, global::System.String name, global::System.DateTime created_on)
 {
     bank bank = new bank();
     bank.id = id;
     bank.name = name;
     bank.created_on = created_on;
     return bank;
 }
示例#5
0
 public void BankEdit(bank item)
 {
     bank original = objDataContext.banks.FirstOrDefault(b => b.id == item.id);
     original.name = item.name;
     original.address = item.address;
     original.fax = item.fax;
     original.mfo = item.mfo;
     original.phone = item.phone;
     if (original.created_on == null)
         original.created_on = DateTime.Now;
     objDataContext.SaveChanges();
 }
示例#6
0
 public void BankCreate(bank _obj)
 {
     _obj.created_on = DateTime.Now;
     objDataContext.AddTobanks(_obj);
     objDataContext.SaveChanges();
 }