Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Employment.Web.Mvc.Infrastructure.DataAnnotations.GroupAttribute" /> class.
 /// </summary>
 /// <param name="name">Name of group.</param>
 /// <param name="rowName">Name of the row.</param>
 /// <param name="groupRowType">Type of the Row.</param>
 public GroupAttribute(string name, string rowName, GroupRowType groupRowType)
 {
     Name      = name;
     GroupType = GroupType.Default;
     RowName   = rowName;
     RowType   = groupRowType;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Employment.Web.Mvc.Infrastructure.DataAnnotations.GroupAttribute" /> class.
 /// </summary>
 /// <param name="name">Name of group.</param>
 /// <param name="rowName"></param>
 /// <param name="groupRowType">Group Row type.</param>
 /// <param name="dependencyType">The type of action to take if the dependency condition is met.</param>
 /// <param name="dependentProperty">The dependent property in the model that this object is dependent on.</param>
 /// <param name="comparisonType">The comparison type to use.</param>
 /// <param name="dependentValue">The value to compare against.</param>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="name"/> is <c>null</c> or empty.</exception>
 public GroupAttribute(string name, string rowName, GroupRowType groupRowType, ActionForDependencyType dependencyType, string dependentProperty, ComparisonType comparisonType, object dependentValue)
     : this(name, dependencyType, dependentProperty, comparisonType, dependentValue)
 {
     Name      = name;
     RowName   = rowName;
     GroupType = GroupType.Default;
     RowType   = groupRowType;
 }
Exemplo n.º 3
0
 public WidgetViewModel(string uniqueName, string area, string controller, string action, GroupRowType groupType)
 {
     UniqueName       = uniqueName;
     Area             = area;
     Controller       = controller;
     Action           = action;
     PreferredRowType = groupType;
     if (uniqueName.IndexOf(',') >= 0)
     {
         throw new ArgumentException("A widget name cannot contain a comma: ','", "uniqueName");
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Employment.Web.Mvc.Infrastructure.DataAnnotations.GroupAttribute" /> class.
 /// </summary>
 /// <param name="name">Name of group.</param>
 /// <param name="rowName">Name of the row.</param>
 /// <param name="groupRowType">Type of the Row.</param>
 /// <param name="groupType">Type for the group.</param>
 public GroupAttribute(string name, string rowName, GroupRowType groupRowType, GroupType groupType) : this(name, rowName, groupRowType)
 {
     GroupType = groupType;
 }
Exemplo n.º 5
0
 public WidgetViewModel(string uniqueName, string controller, string action, GroupRowType groupType) : this(uniqueName, null, controller, action, groupType)
 {
 }