I have read these
https://volkanceylan.gitbooks.io/serenity-guide/content/tutorials/movies/allowing_multiple_genre_selection.html
https://github.com/volkanceylan/Serenity/wiki/LinkingSetRelation-Explanation-by-jsbUSMC
These both seem to apply to Many to Many. I would like a Many to One relationship.
I have a Job and a Quote relationship.
On the Jobs form I would like to be able to select multiple Quotes (if they are not already used) and on the Quotes form I would like to be able to select only one Job.
Is this possible? If so could I have a modified explanation on how to achieve this?
[DisplayName("Quotes")]
[LookupEditor(typeof(QuoteRow), Multiple = true), NotMapped]
//[LinkingSetRelation(typeof(MovieGenresRow), "Id", "Id")] // This seems to be many to many
public List<Int32> QuoteList
{
get { return Fields.QuoteList[this]; }
set { Fields.QuoteList[this] = value; }
}
public class RowFields : RowFieldsBase
{
public Int32Field Id;
public Int32Field CustomerId;
public Int32Field JobId;
public StringField Name;
public Int32Field JobCustomerId;
public StringField JobJobName;
public Int32Field JobJobNumber;
public Int32Field JobStatus;
public RowFields()
: base()
{
LocalTextPrefix = "Betz.Quote";
}
}
public class RowFields : RowFieldsBase
{
public Int32Field Id;
public Int32Field CustomerId;
public StringField JobName;
public Int32Field JobNumber;
public Int32Field Status;
public StringField NameNumber;
public ListField<Int32> QuoteList;
public RowFields()
: base()
{
LocalTextPrefix = "Betz.Jobs";
}
}
So linking set relation + dropdown in other form.
I want to be able to handle this in the Jobs form, not the Quotes form. This is a for an easier user experience.