Ejemplo n.º 1
0
        public LabelListVM()
        {
            ViewTitle = "لیست برچسب ها";

            GetAllCommand       = new RelayCommand <List <KeyValuePair <string, string> > >(GetAllExecute);
            CreateEditCommand   = new RelayCommand <Label>(CreateEditExecute);
            ChangeStatusCommand = new RelayCommand <Label>(ChangeStatusExecute);
            LoadedEventCommand  = new RelayCommand(LoadedEventExecute);

            accountingUow = new AccountingUow();
            businessSet   = new LabelBusinessSet(accountingUow.LabelRepository, accountingUow.Logger);
        }
Ejemplo n.º 2
0
        public LabelCreateVM(AccountingUow uow, Label model = null)
        {
            SubmitCommand = new RelayCommand(SubmitExecute);

            if (model == null)
            {
                ViewTitle = "افزودن برچسب";
                Model     = new Label();
            }
            else
            {
                ViewTitle = "ویرایش برچسب";
                isEdit    = true;
                Model     = model;
                Messenger.Default.Send(Model.LabelId, "LabelListView_SaveItemId");
            }

            accountingUow = uow;
            businessSet   = new LabelBusinessSet(accountingUow.LabelRepository, accountingUow.Logger);

            Model.Exclude(new string[] { "UserId", "RecordStatusId", "CreateDate" });
        }