protected void SelectRole(Control sender, Aircraft.PilotRole role)
    {
        Aircraft ac = RowFromControl(sender);

        ac.RoleForPilot = role;
        UserAircraft ua = new UserAircraft(Page.User.Identity.Name);

        ua.FAddAircraftForUser(ac);
        AircraftPrefChanged?.Invoke(this, new EventArgs());
    }
    protected void ckAddNameAsPIC_CheckedChanged(object sender, EventArgs e)
    {
        if (sender == null)
        {
            throw new ArgumentNullException(nameof(sender));
        }
        CheckBox ck = (CheckBox)sender;
        Aircraft ac = RowFromControl(ck);

        ac.CopyPICNameWithCrossfill = ck.Checked;
        UserAircraft ua = new UserAircraft(Page.User.Identity.Name);

        ua.FAddAircraftForUser(ac);
        AircraftPrefChanged?.Invoke(this, e);
    }
    protected void mfbSelectTemplates_TemplateUnselected(object sender, PropertyTemplateEventArgs e)
    {
        if (sender == null)
        {
            throw new ArgumentNullException(nameof(sender));
        }
        if (e == null)
        {
            throw new ArgumentNullException(nameof(e));
        }

        Aircraft ac = RowFromControl(sender as Control);

        ac.DefaultTemplates.Remove(e.TemplateID);
        UserAircraft ua = new UserAircraft(Page.User.Identity.Name);

        ua.FAddAircraftForUser(ac);
        AircraftPrefChanged?.Invoke(this, e);
    }