Beispiel #1
0
        public CWAddBankImportMapping(CrudAPI api, Uniconta.DataModel.BankStatement master, BankStatementLineClient bankStatement)
        {
            this.api         = api;
            this.DataContext = this;
            InitializeComponent();
            this.Title = Uniconta.ClientTools.Localization.lookup("AutomaticAccountSelection");
#if SILVERLIGHT
            Utility.SetThemeBehaviorOnChildWindow(this);
#else
            if (string.IsNullOrWhiteSpace(cmdBankFormats.Text))
            {
                FocusManager.SetFocusedElement(cmdBankFormats, cmdBankFormats);
            }
#endif
            this.Loaded += CW_Loaded;

            if (master != null && master._BankImportId != 0) // last import
            {
                this.master = master;
                cmdBankFormats.Visibility = Visibility.Collapsed;
            }
            else
            {
                SetBankFormats(true);
            }

            txtAccountType.Text = bankStatement.AccountType;
            txtAccount.Text     = bankStatement._Account;
            txtText.Text        = bankStatement._Text;
        }
        public LedgerPostingPage(UnicontaBaseEntity sourceData)
            : base(sourceData)
        {
            master = sourceData as Uniconta.DataModel.BankStatement;
            DateTime date            = DateTime.Today;
            var      firstDayOfMonth = new DateTime(date.Year, date.Month, 1);

            toDate   = firstDayOfMonth.AddMonths(1).AddDays(-1);
            fromDate = firstDayOfMonth.AddMonths(-2);
            InitializeComponent();
            dgBankStatementLine.api = api;
            bankTransApi            = new BankStatementAPI(api);
            SetRibbonControl(localMenu, dgBankStatementLine);
            dgBankStatementLine.BusyIndicator = busyIndicator;
            localMenu.OnItemClicked          += localMenu_OnItemClicked;
            dgBankStatementLine.View.DataControl.CurrentItemChanged += DataControl_CurrentItemChanged;
            State.Header = Uniconta.ClientTools.Localization.lookup("Status");
            SetStatusText();
            Mark.Visible = false;
            GetShowHideGreenMenuItem();
            this.showAmountType = Uniconta.ClientTools.Localization.lookup("All");
        }