Esempio n. 1
0
        public ProfileBankAccount CreateNew(string name)
        {
            var profileAddress = new ProfileBankAccount()
            {
                Id = Guid.NewGuid()
            };

            erpNodeDBContext.ProfileBankAccounts.Add(profileAddress);
            erpNodeDBContext.SaveChanges();
            return(profileAddress);
        }
Esempio n. 2
0
        public ProfileBankAccount CreateNew(Guid profileId)
        {
            var bankAccount = new ProfileBankAccount()
            {
                ProfileGuid = profileId,
                Id          = Guid.NewGuid()
            };


            erpNodeDBContext.ProfileBankAccounts.Add(bankAccount);
            erpNodeDBContext.SaveChanges();

            return(bankAccount);
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            //try
            {
                if (Item == null)
                {
                    ProfileBankAccount ba = new ProfileBankAccount();

                    //ba.account = da.GetAccount(AccountID);
                    int BankID = (edtBank.SelectedItem as bank).id;
                    ba.bank        = da.BankGet(BankID);
                    ba.BankAccount = edtBankAccount.Text;
                    ba.Description = edtDescription.Text;
                    ba.IsMain      = edtIsMain.IsChecked.Value ? 1 : 0;

                    //AccountID = da.BankAccountCreate(ba).id;
                    da.ProfileBankAccountCreate(ba);
                }
                else
                {
                    int BankID = (edtBank.SelectedItem as bank).id;
                    Item.bank        = da.BankGet(BankID);
                    Item.BankAccount = edtBankAccount.Text;
                    Item.Description = edtDescription.Text;
                    Item.IsMain      = 0;
                    if (edtIsMain.IsChecked.HasValue)
                    {
                        if (edtIsMain.IsChecked.Value)
                        {
                            Item.IsMain = 1;
                        }
                    }

                    //AccountID = da.BankAccountCreate(ba).id;
                    da.ProfileBankAccountEdit(Item);
                }
            }

            //catch (Exception)
            {
            }
            Close();
        }
Esempio n. 4
0
 public ProfileBankAccount CreateNew(ProfileBankAccount profileAddress)
 {
     profileAddress.Id = Guid.NewGuid();
     erpNodeDBContext.ProfileBankAccounts.Add(profileAddress);
     return(profileAddress);
 }
 public ProfileBankAccountDialog(int BankAccountID)
 {
     InitializeComponent();
     Item = da.ProfileBankAccountGet(BankAccountID);
 }