public override void Event_ModifyIndexItem(IndexListVM indexListVM, IndexItemVM indexItem, InterfacesLibrary.SharedNS.ICommonWithId icommonWithId)
        {
            base.Event_ModifyIndexItem(indexListVM, indexItem, icommonWithId);
            MenuPath3 mp3 = icommonWithId as MenuPath3;

            mp3.IsNullThrowException("Unable to unbox");
            //send in a MenuPathMain that is a part of this MenuPath3
            MenuPathMain mpm = mp3.MenuPathMains.FirstOrDefault();

            indexItem.MenuManager = new MenuManager(mpm, null, null, MenuENUM.EditMenuPath3, BreadCrumbManager, null, UserId, indexListVM.MenuManager.ReturnUrl, UserName);


            indexItem.MenuManager.PictureAddresses = GetCurrItemsPictureList(mp3);
        }
Exemple #2
0
 public override void Event_ModifyIndexItem(IndexListVM indexListVM, IndexItemVM indexItem, InterfacesLibrary.SharedNS.ICommonWithId icommonWithId)
 {
     base.Event_ModifyIndexItem(indexListVM, indexItem, icommonWithId);
 }
        //public override void Event_ModifyIndexList(IndexListVM indexListVM, ControllerIndexParams parameters)
        //{
        //    base.Event_ModifyIndexList(indexListVM, parameters);

        //    indexListVM.Heading.Column = "All Addresses for User";
        //    indexListVM.Show.EditDeleteAndCreate = true;
        //    indexListVM.Show.VerificationIcon = true;
        //    indexListVM.Show.MakeDefaultIcon = true;

        //}

        public override void Event_ModifyIndexItem(IndexListVM indexListVM, IndexItemVM indexItem, InterfacesLibrary.SharedNS.ICommonWithId icommonWithId)
        {
            UserId.IsNullOrWhiteSpaceThrowException("You are not logged in.");
            base.Event_ModifyIndexItem(indexListVM, indexItem, icommonWithId);

            //get the current Person from user
            Person person = UserBiz.GetPersonFor(UserId);

            person.IsNullThrowException("Person");

            if (indexItem.Id == person.DefaultBillAddressId)
            {
                indexItem.IsDefault = true;
            }
        }
Exemple #4
0
 public override void InitializeMenuManagerForEntity(ControllerIndexParams parm, InterfacesLibrary.SharedNS.ICommonWithId entity)
 {
     base.InitializeMenuManagerForEntity(parm, entity);
     if (!UserId.IsNullOrWhiteSpace())
     {
         Person person = UserBiz.GetPersonFor(UserId);
         person.IsNullThrowException("person");
         entity.MenuManager.UserPersonId = person.Id;
     }
 }