private void Edit()
        {
            ProposalItemManager mgr = new ProposalItemManager();

            Entity = mgr.Get(Convert.ToInt32(EventArgument));

            EditMode();
        }
        private void Delete()
        {
            ProposalItemManager mgr = new ProposalItemManager();

            Entity    = new ProposalItem();
            Entity.Id = Convert.ToInt32(EventArgument);

            mgr.Delete(Entity);

            Get();

            ListMode();
        }
        private void Save()
        {
            ProposalItemManager mgr = new ProposalItemManager();

            //RequestMode temp;
            //switch (temp)
            //{
            //    case RequestMode.Add:
            //        break;
            //    case RequestMode.Delete:
            //        break;
            //    default:
            //        throw new ArgumentOutOfRangeException();
            //}

            if (Mode == "Add")
            {
                //Add data to database here
                mgr.Insert(Entity);
            }
            else
            {
                mgr.Update(Entity);
            }

            ValidationErrors = mgr.ValidationErrors;
            if (ValidationErrors.Count > 0)
            {
                IsValid = false;
            }


            if (!IsValid)
            {
                if (Mode == "Add")
                {
                    AddMode();
                }
                else
                {
                    EditMode();
                }
            }
        }
        private void Get()
        {
            ProposalItemManager mgr = new ProposalItemManager();

            Items = mgr.Get(SearchEntity);
        }