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

namespace TestKendoMenu.Models
{
    [Serializable]
    public class InterfaceModel
    {
        public int InterfaceId { get; set; }
        public string InterfaceName { get; set; }
        public int CommandType { get; set; }
        public string CommandName { get; set; }
        public string ViewName { get; set; }
        public List<InterfaceParamsModel> InterfaceParams { set; get; }
        public bool HasFile { get; set; }

        public string GetParamValueByName(string name)
        {
            var value = this.InterfaceParams.FirstOrDefault(n => n.ParamName.Equals(name));
            if (value == null) return "kukkuku"; else return value.ParamDefaultValue;
        }
    }
}