Ejemplo n.º 1
0
        void Update_Buttons_List()
        {
            List <BOL.Terminal.objTerminal> List = DAL.Terminal.Terminal_Repository.GetTerminalToTransfer(this.Terminal);

            Buttons.Clear();

            foreach (var obj in List)
            {
                Views.ucButton      Buttonv  = new Views.ucButton();
                ViewModels.ucButton Buttonvm = new ucButton(obj, this.Queue);
                Buttonv.DataContext  = Buttonvm;
                Buttonvm.CloseAction = new Action(() =>
                {
                    CloseAction();
                });
                Buttons.Add(Buttonv);
            }

            Views.ucButton ButtonCancelV = new Views.ucButton()
            {
                Content = "CANCEL"
            };
            ButtonCancelV.Click += ButtonCancelV_Click;
            Buttons.Add(ButtonCancelV);
        }
Ejemplo n.º 2
0
        void Fill_Buttons()
        {
            Buttons.Clear();
            List <BOL.Transaction.objTransaction> Transactions = DAL.Transaction.Transaction_Repository.GetActiveTransaction();

            foreach (var obj in Transactions)
            {
                Views.ucButton      butn  = new Views.ucButton();
                ViewModels.ucButton btmvm = new ucButton(obj);
                butn.DataContext = btmvm;
                Buttons.Add(butn);
            }
        }