Example #1
0
        protected override void PrepareAppBarMap()
        {
            AppBarModelList = new List <ApplicationBarModel>();

            ApplicationBarModel appBarModel;

            if (LineItemSummaryDetails.Permissions.Reject || LineItemSummaryDetails.Permissions.Adjust)
            {
                appBarModel            = new ApplicationBarModel();
                appBarModel.IconPath   = Constants.ActionItemIconPath;
                appBarModel.IsEnabled  = true;
                appBarModel.ButtonText = Constants.ActionItemTitle;
                AppBarModelList.Add(appBarModel);
            }

            appBarModel            = new ApplicationBarModel();
            appBarModel.IconPath   = Constants.LeftArrowIconPath;
            appBarModel.IsEnabled  = !IsFirstItem();
            appBarModel.ButtonText = Constants.LeftArrowTitle;
            AppBarModelList.Add(appBarModel);

            appBarModel            = new ApplicationBarModel();
            appBarModel.IconPath   = Constants.RightArrowIconPath;
            appBarModel.IsEnabled  = !IsLastItem();
            appBarModel.ButtonText = Constants.RightArrowTitle;
            AppBarModelList.Add(appBarModel);
        }
Example #2
0
        protected override void OnAppBarButtonClick(ApplicationBarModel appBarModel)
        {
            if (PageInProgress)
            {
                return;
            }

            switch (appBarModel.IconPath)
            {
            case Constants.ActionItemIconPath:
                OnActionItem();
                break;

            case Constants.LeftArrowIconPath:
                OnLeftArrow();
                break;

            case Constants.RightArrowIconPath:
                OnRightArrow();
                break;

            case Constants.RejectIconPath:
                OnLineItemReject();
                break;

            case Constants.AdjustIconPath:
                OnLineItemAdjust();
                break;

            default: break;
            }
        }
Example #3
0
        protected override void OnAppBarButtonClick(ApplicationBarModel appBarModel)
        {
            if (PageInProgress)
            {
                return;
            }

            switch (appBarModel.IconPath)
            {
            case Constants.MultiSelectIconPath:
                OnMultiSelect();
                break;

            case Constants.SearchIconPath:
                OnSearch();
                break;

            case Constants.ApproveIconPath:
                OnApprove();
                break;

            case Constants.RejectIconPath:
                OnReject();
                break;

            default: break;
            }
        }
Example #4
0
        private ApplicationBarModel CreateAppBarIcon(string path, string title)
        {
            ApplicationBarModel appBarModel = new ApplicationBarModel();

            appBarModel.IconPath   = path;
            appBarModel.IsEnabled  = false;
            appBarModel.ButtonText = title;
            return(appBarModel);
        }
Example #5
0
        private ApplicationBarIconButton CreateAppBarButton(ApplicationBarModel model)
        {
            ApplicationBarIconButton appButton = new ApplicationBarIconButton(new Uri(model.IconPath, UriKind.Relative));

            appButton.Text      = model.ButtonText;
            appButton.IsEnabled = model.IsEnabled;
            appButton.Click    += appButton_Click;

            AppBarButtonMap.Add(model.IconPath, appButton);
            return(appButton);
        }
Example #6
0
        public void InsertAppBarButton(ApplicationBarModel model, int position)
        {
            ApplicationBarIconButton appButton;

            if (!AppBarButtonMap.ContainsKey(model.IconPath))
            {
                appButton = CreateAppBarButton(model);
                AppBarModelList.Add(model);
            }
            else
            {
                appButton           = AppBarButtonMap[model.IconPath];
                appButton.IsEnabled = model.IsEnabled;
            }
            ApplicationBar.Buttons.Insert(position, appButton);
        }
Example #7
0
        protected override void PrepareAppBarMap()
        {
            AppBarModelList = new List <ApplicationBarModel>();

            ApplicationBarModel appBarModel;

            if (UserData.Instance.InvoiceQuickActionsAccess)
            {
                appBarModel            = new ApplicationBarModel();
                appBarModel.IconPath   = Constants.MultiSelectIconPath;
                appBarModel.IsEnabled  = true;
                appBarModel.ButtonText = Constants.MultiSelectTitle;
                AppBarModelList.Add(appBarModel);
            }

            appBarModel            = new ApplicationBarModel();
            appBarModel.IconPath   = Constants.SearchIconPath;
            appBarModel.IsEnabled  = true;
            appBarModel.ButtonText = Constants.SearchTitle;
            AppBarModelList.Add(appBarModel);
        }
Example #8
0
 public void AddAppBarButton(ApplicationBarModel model)
 {
     InsertAppBarButton(model, ApplicationBar.Buttons.Count);
 }
Example #9
0
 protected virtual void OnAppBarButtonClick(ApplicationBarModel appBarModel)
 {
 }