Ejemplo n.º 1
0
        protected async Task HandleValidSubmit()
        {
            var glAccount = GLAccounts.Where(a => a.accountId.ToString()
                                             .Equals(this.JournalEntryDtl.accountId))
                            .FirstOrDefault();

            this.JournalEntryDtl.accountCode = glAccount.accountCode;
            this.JournalEntryDtl.accountName = glAccount.accountDesc;

            await SaveEventCallback.InvokeAsync(true);

            StateHasChanged();
        }
Ejemplo n.º 2
0
        public void SetChartOfAccount(ChartOfAccount chartOfAccount)
        {
            if (chartOfAccount == null)
            {
                throw new ArgumentNullException(nameof(chartOfAccount));
            }
            var existingAccount = GLAccounts.FirstOrDefault(a => a.AccountNo == chartOfAccount.AccountNo);

            if (existingAccount != null)
            {
                GLAccounts.Remove(existingAccount);
            }
            GLAccounts.Add(chartOfAccount);
        }
Ejemplo n.º 3
0
        private void SetChartOfAccount(ChartOfAccountViewModel chartOfAccountData)
        {
            if (chartOfAccountData == null)
            {
                throw new ArgumentNullException(nameof(chartOfAccountData));
            }
            var existingAccount = GLAccounts.FirstOrDefault(a => a.AccountNo == chartOfAccountData.AccountNo);

            if (existingAccount != null)
            {
                GLAccounts.Remove(existingAccount);
            }
            GLAccounts.Add(chartOfAccountData);
        }
Ejemplo n.º 4
0
        private void FillLookups(ITenantDBsDir dir)
        {
            GLAccounts.Clear();
            foreach (var gl in dir.MarketState.GLAccounts.GetAll())
            {
                GLAccounts.Add(gl.Id, gl.Name);
            }

            Sections.Clear();
            foreach (var sec in dir.MarketState.Sections.GetAll())
            {
                Sections.Add(sec.Id, sec.Name);
            }

            Sections.Add(0, "Office");
        }
Ejemplo n.º 5
0
        private void FillPurchaseOrderLineTab()
        {
            vendorList.ItemsSource       = Vendors.ToDictionary(x => x.AdministrationCode, y => $"{y.AdministrationCode} - {y.Name}");
            vendorList.DisplayMemberPath = "Value";
            vendorList.SelectedValuePath = "Key";
            var fVendorSelected = Vendors.First(x => x.AdministrationCode == PO.VendorCode);

            vendorList.SelectedIndex = Vendors.IndexOf(fVendorSelected);

            //PODescription.SetBinding(PO, "Description");

            GLAccountList.ItemsSource            = GLAccounts.ToDictionary(x => x.AdministrationCode, y => $"{y.AdministrationCode} - {y.Name}");
            ArticleList.ItemsSource              = Articles.ToDictionary(x => x.AdministrationCode, y => $"{y.AdministrationCode} - {y.Name}");
            WarehouseList.ItemsSource            = Warehouses.ToDictionary(x => x.AdministrationCode, y => $"{y.AdministrationCode} - {y.Name}");
            VatCodeList.ItemsSource              = VatCodes.ToDictionary(x => x.AdministrationCode, y => $"{y.AdministrationCode} - {y.Name}");
            CostCenterList.ItemsSource           = CostCenters.ToDictionary(x => x.AdministrationCode, y => $"{y.AdministrationCode} - {y.Name}");
            CostUnitList.ItemsSource             = CostUnits.ToDictionary(x => x.AdministrationCode, y => $"{y.AdministrationCode} - {y.Name}");
            ProjectList.ItemsSource              = Projects.ToDictionary(x => x.AdministrationCode, y => $"{y.AdministrationCode} - {y.Name}");
            purchaseOrderLineGrid.ItemsSource    = PO.OrderLines;
            purchaseOrderLineGrid.CanUserAddRows = true;
        }
Ejemplo n.º 6
0
 public OtherColxnCrudVM(IOtherColxnsRepo repository, ITenantDBsDir appArguments) : base(repository, appArguments)
 {
     Collectors.SetItems(AppArgs.MarketState.Collectors?.GetAll());
     GLAccounts.SetItems(AppArgs.MarketState.GLAccounts?.GetAll());
 }