using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MvcCheckBoxListApp.DataClasses;

namespace MvcCheckBoxListApp.Models
{
    public class MvcCheckBoxListModel
    {
        //All the Items to be displayed in check Box List
        public List<CheckboxListItems> AvailableItems { get; set; }

        //All the Selected Items to be marked as checked
        public List<CheckboxListItems> SelectedItems { get; set; }

        //all The Items which get  checked on view
        public PostedItems PostedItem { get; set; }
        public MvcCheckBoxListModel()
        {
            AvailableItems = new List<CheckboxListItems>();
            AvailableItems.Add(
                new CheckboxListItems() { CheckBoxText = "Item Fruit", CheckBoxValue = "1" });
            AvailableItems.Add(
                            new CheckboxListItems() { CheckBoxText = "Item Cloth", CheckBoxValue = "2" });
            AvailableItems.Add(
                            new CheckboxListItems() { CheckBoxText = "Item Vegetable", CheckBoxValue = "3" });
            AvailableItems.Add(
                            new CheckboxListItems() { CheckBoxText = "Item Grain", CheckBoxValue = "4" });

        }
    }
    public class PostedItems
    {
        public string[] ItemIds { get; set; }
    }

   
}