ParaPanel

1. XAML

  • Drag an xParaPanel, set GroupName property to the desired para grp

  • Drag texboxitems inside the panel, set BindingPath like BindingPath="[UserId][wert]"

    • In this case UserId is the para.id name

    • Wert means that it binds to para.wert column

2. WHO

public override void Opened()
{
    base.Opened();
    this.ReturnValue = false;
}

public override void ButtonClicked(xButton sourceControl)
{
    base.ButtonClicked(sourceControl);

    if (sourceControl == bOk)
    {
        if (Save())
            Close();
    }
    else if (sourceControl == bCancel)
    {
        CancelChanges();
    }
}

public override int OnSave()
{
    int retval = xParaGebinde.ParaGroup.Save();
    
    if (retval > 0)
    {
        this.ReturnValue = true;
    }
    return retval;
}

protected override bool BusObjChanged
{
    get
    {
        return (xParaGebinde.ParaGroup.HasChanges());
    }
}

public override bool Closing()
{
    bool retVal = OkToContinue(); // = base.Closing();
    if (!retVal) this.ReturnValue = false;
    
    if (retVal && !this.ReturnValue.ToBoolean())
        CancelChanges();
    
    return retVal;
}

public void CancelChanges()
{
    xParaGebinde.ParaGroup.CancelChanges();
}

Last updated