1

I'm working on an MVC application in DevExpress, I have a table that has members I would like to changes the orders or add orders by year but the members would stay the same, so I don't have to re-enter all the members every year just update prices for each member and if the member doesn't have ordered it would show 0

What I have tried so far is I have a master-detail grid and I have the model created

    public class AppYear
{

    public int AppYearId { get; set; }
    public DateTime AppDateTime { get; set; }

    public ICollection<MemberBenefit> MemberBenefits { get; set; }

}

    public class Dependent
{

    public int DependentId { get; set; }
    [Required]
    public string FirstName { get; set; }
    [Required]
    public string LastName { get; set; }
    public DateTime? DateOfBirth { get; set; }

    public int MemberId { get; set; }
    public Member Member { get; set; }

    public int MemberBenefitId { get; set; }
    public MemberBenefit MemberBenefit { get; set; }

}

public class MemberBenefit{
 public int MemberBenefitId { get; set; }

    [Column(TypeName = "Money")]
    public decimal Tmhhea { get; set; }

    [Column(TypeName = "Money")]
    public decimal Tmna { get; set; }


    public int AppYearId { get; set; }
    public AppYear AppYear { get; set; }
    public ICollection<Dependent> Dependents { get; set; }

}

I don't know if the relation is correct in database models, but I need an idea on how to change only the member benefits and keeping the dependent the same when you change the year a new the member benefit would default to 0

Morkg
  • 11
  • 3

0 Answers0