This is my view model. I would like to decorate my properties in it. where regionLists is a drop down list and UnAssignedStatesLists, AssignedStatesLists are list boxes. RegionLists ddl should be selected and atleast one item should be moved from UnAssignedStatesLists to AssignedStatesLists. how to I decorate them?
public class RegionOrStateAssignmentModel : IRegionOrStateAssignmentModel
{
#region Constructor / Destructor
public RegionOrStateAssignmentModel()
{
RegionLists = new List<IRegion>();
UnAssignedStatesLists = new List<ICode>();
AssignedStatesLists = new List<ICode>();
}
~RegionOrStateAssignmentModel()
{
RegionLists = null;
UnAssignedStatesLists = null;
AssignedStatesLists = null;
}
#endregion
#region Properties
public List<IRegion> RegionLists { get; set; }
public IRegion Re开发者_运维技巧gionSelected { get; set; }
public List<ICode> UnAssignedStatesLists { get; set; }
public List<ICode> AssignedStatesLists { get; set; }
#endregion
}
where IRegion is as below
public interface IRegion
{
int RegionId { get; set; }
string Name { get; set; }
string Description { get; set; }
ICode Status { get; set; }
string CreatedBy { get; set; }
DateTime CreateDate { get; set; }
string ModifiedBy { get; set; }
DateTime ModifiedDate { get; set; }
List<ICode> States { get; set; }
}
精彩评论