Example #1
0
        public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
        {
            if (value is string)
            {
                // find the one having selected name
                BasicProcedure newVal = m_list.Where(x => x.ID.Equals(value.ToString())).FirstOrDefault();
                return(newVal);
            }

            return(base.ConvertFrom(context, culture, value));
        }
        public BasicProcedure GetObject(DBTable t)
        {
            var obj = new BasicProcedure {
                ID = ID, Name = Name, Table = t
            };

            foreach (var s in Statements)
            {
                obj.Statements.Add(s.GetObject(t));
            }

            return(obj);
        }