Exemple #1
0
    public async Task <bool> RequestChangeNoteType(Guid?oldSelectedId)
    {
        var noteTypesSelector  = new NoteTypesSelectorComponent(Store);
        var resCanLoadEntities = await noteTypesSelector.LoadEntities(Service, false);

        if (resCanLoadEntities)
        {
            var res = noteTypesSelector.RunModal();
            if (res.Entity == EComponentResult.Executed)
            {
                if (oldSelectedId == noteTypesSelector.SelectedEntity.NoteTypeId)
                {
                    return(false);
                }
                else
                {
                    return(await AplyChangeNoteType(noteTypesSelector.SelectedEntity));
                }
            }
        }
        else
        {
            View.ShowInfo("Cannot load the list of note types");
        }

        return(false);
    }
Exemple #2
0
 public ISelectorView <NoteTypeDto> View(NoteTypesSelectorComponent component)
 {
     return(new NoteTypesSelectorForm(component));
 }
Exemple #3
0
 public NoteTypesSelectorForm(NoteTypesSelectorComponent com)
 {
     InitializeComponent();
     _com = com;
 }