Пример #1
0
        protected override void Get()
        {
            var mgr = new PickListDAL();

            Entries = mgr.Get(SearchEntity);

            base.Get();
        }
Пример #2
0
        protected override void Edit()
        {
            var mgr = new PickListDAL();

            //PickList = mgr.Get(Convert.ToInt32(EventArgument));
            // Need an ID to edit
            LineItem = mgr.Get(EventArgument); // RowID?
            base.Edit();
        }
Пример #3
0
        protected override void Delete()
        {
            var mgr = new PickListDAL();

            LineItem = new PickListModel();
            //PickList.ID = Convert.ToInt32(EventArgument);
            LineItem.Title = EventArgument;

            mgr.Delete(LineItem);

            Get(); // may or may not want to get all the products again

            base.Delete();
        }
Пример #4
0
        protected override void Save()
        {
            var mgr = new PickListDAL();

            // add/update DB
            if (Mode == "Add")
            {
                mgr.Insert(LineItem);
            }
            else
            {
                LineItem.SKU      = EventArgument;
                LineItem.Location = EventArgLocation;
                mgr.Update(LineItem);
            }

            ValidationErrors = mgr.ValidationErrors;

            base.Save();
        }