text:
#pragma warning disable 0472
using System;
using System.Text;
using System.IO;
using System.Collections;
using System.ComponentModel;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Xml.Serialization;
using BLToolkit.Aspects;
using BLToolkit.DataAccess;
using BLToolkit.EditableObjects;
using BLToolkit.Data;
using BLToolkit.Data.DataProvider;
using BLToolkit.Mapping;
using BLToolkit.Reflection;
using bv.common.Configuration;
using bv.common.Enums;
using bv.common.Core;
using bv.model.BLToolkit;
using bv.model.Model;
using bv.model.Helpers;
using bv.model.Model.Extenders;
using bv.model.Model.Core;
using bv.model.Model.Handlers;
using bv.model.Model.Validators;
using eidss.model.Core;
using eidss.model.Enums;

namespace eidss.model.Schema
{

    [XmlType(AnonymousType = true)]
    public abstract partial class RootFarmTree :
        EditableObject<RootFarmTree>
        , IObject
        , IDisposable
        , ILookupUsage
        {

        [MapField(_str_idfParty), NonUpdatable, PrimaryKey]
        public abstract Int64 idfParty { get; set; }

        [LocalizedDisplayName(_str_idfsPartyType)]
        [MapField(_str_idfsPartyType)]
        public abstract Int32 idfsPartyType { get; set; }
        #if MONO
        protected Int32 idfsPartyType_Original { get { return idfsPartyType; } }
        protected Int32 idfsPartyType_Previous { get { return idfsPartyType; } }
        #else
        protected Int32 idfsPartyType_Original { get { return ((EditableValue<Int32>)((dynamic)this)._idfsPartyType).OriginalValue; } }
        protected Int32 idfsPartyType_Previous { get { return ((EditableValue<Int32>)((dynamic)this)._idfsPartyType).PreviousValue; } }
        #endif

        [LocalizedDisplayName(_str_strName)]
        [MapField(_str_strName)]
        public abstract String strName { get; set; }
        #if MONO
        protected String strName_Original { get { return strName; } }
        protected String strName_Previous { get { return strName; } }
        #else
        protected String strName_Original { get { return ((EditableValue<String>)((dynamic)this)._strName).OriginalValue; } }
        protected String strName_Previous { get { return ((EditableValue<String>)((dynamic)this)._strName).PreviousValue; } }
        #endif

        [LocalizedDisplayName(_str_idfParentParty)]
        [MapField(_str_idfParentParty)]
        public abstract Int64? idfParentParty { get; set; }
        #if MONO
        protected Int64? idfParentParty_Original { get { return idfParentParty; } }
        protected Int64? idfParentParty_Previous { get { return idfParentParty; } }
        #else
        protected Int64? idfParentParty_Original { get { return ((EditableValue<Int64?>)((dynamic)this)._idfParentParty).OriginalValue; } }
        protected Int64? idfParentParty_Previous { get { return ((EditableValue<Int64?>)((dynamic)this)._idfParentParty).PreviousValue; } }
        #endif

        [LocalizedDisplayName(_str_intTotalAnimalQty)]
        [MapField(_str_intTotalAnimalQty)]
        public abstract Int32? intTotalAnimalQty { get; set; }
        #if MONO
        protected Int32? intTotalAnimalQty_Original { get { return intTotalAnimalQty; } }
        protected Int32? intTotalAnimalQty_Previous { get { return intTotalAnimalQty; } }
        #else
        protected Int32? intTotalAnimalQty_Original { get { return ((EditableValue<Int32?>)((dynamic)this)._intTotalAnimalQty).OriginalValue; } }
        protected Int32? intTotalAnimalQty_Previous { get { return ((EditableValue<Int32?>)((dynamic)this)._intTotalAnimalQty).PreviousValue; } }
        #endif

        [LocalizedDisplayName(_str_intSickAnimalQty)]
        [MapField(_str_intSickAnimalQty)]
        public abstract Int32? intSickAnimalQty { get; set; }
        #if MONO
        protected Int32? intSickAnimalQty_Original { get { return intSickAnimalQty; } }
        protected Int32? intSickAnimalQty_Previous { get { return intSickAnimalQty; } }
        #else
        protected Int32? intSickAnimalQty_Original { get { return ((EditableValue<Int32?>)((dynamic)this)._intSickAnimalQty).OriginalValue; } }
        protected Int32? intSickAnimalQty_Previous { get { return ((EditableValue<Int32?>)((dynamic)this)._intSickAnimalQty).PreviousValue; } }
        #endif

        [LocalizedDisplayName(_str_intDeadAnimalQty)]
        [MapField(_str_intDeadAnimalQty)]
        public abstract Int32? intDeadAnimalQty { get; set; }
        #if MONO
        protected Int32? intDeadAnimalQty_Original { get { return intDeadAnimalQty; } }
        protected Int32? intDeadAnimalQty_Previous { get { return intDeadAnimalQty; } }
        #else
        protected Int32? intDeadAnimalQty_Original { get { return ((EditableValue<Int32?>)((dynamic)this)._intDeadAnimalQty).OriginalValue; } }
        protected Int32? intDeadAnimalQty_Previous { get { return ((EditableValue<Int32?>)((dynamic)this)._intDeadAnimalQty).PreviousValue; } }
        #endif

        [LocalizedDisplayName(_str_strAverageAge)]
        [MapField(_str_strAverageAge)]
        public abstract Int32? strAverageAge { get; set; }
        #if MONO
        protected Int32? strAverageAge_Original { get { return strAverageAge; } }
        protected Int32? strAverageAge_Previous { get { return strAverageAge; } }
        #else
        protected Int32? strAverageAge_Original { get { return ((EditableValue<Int32?>)((dynamic)this)._strAverageAge).OriginalValue; } }
        protected Int32? strAverageAge_Previous { get { return ((EditableValue<Int32?>)((dynamic)this)._strAverageAge).PreviousValue; } }
        #endif

        [LocalizedDisplayName(_str_datStartOfSignsDate)]
        [MapField(_str_datStartOfSignsDate)]
        public abstract DateTime? datStartOfSignsDate { get; set; }
        #if MONO
        protected DateTime? datStartOfSignsDate_Original { get { return datStartOfSignsDate; } }
        protected DateTime? datStartOfSignsDate_Previous { get { return datStartOfSignsDate; } }
        #else
        protected DateTime? datStartOfSignsDate_Original { get { return ((EditableValue<DateTime?>)((dynamic)this)._datStartOfSignsDate).OriginalValue; } }
        protected DateTime? datStartOfSignsDate_Previous { get { return ((EditableValue<DateTime?>)((dynamic)this)._datStartOfSignsDate).PreviousValue; } }
        #endif

        [LocalizedDisplayName("VetFarmTree.strNote")]
        [MapField(_str_strNote)]
        public abstract String strNote { get; set; }
        #if MONO
        protected String strNote_Original { get { return strNote; } }
        protected String strNote_Previous { get { return strNote; } }
        #else
        protected String strNote_Original { get { return ((EditableValue<String>)((dynamic)this)._strNote).OriginalValue; } }
        protected String strNote_Previous { get { return ((EditableValue<String>)((dynamic)this)._strNote).PreviousValue; } }
        #endif

        [LocalizedDisplayName(_str_HACode)]
        [MapField(_str_HACode)]
        public abstract Int32? HACode { get; set; }
        #if MONO
        protected Int32? HACode_Original { get { return HACode; } }
        protected Int32? HACode_Previous { get { return HACode; } }
        #else
        protected Int32? HACode_Original { get { return ((EditableValue<Int32?>)((dynamic)this)._hACode).OriginalValue; } }
        protected Int32? HACode_Previous { get { return ((EditableValue<Int32?>)((dynamic)this)._hACode).PreviousValue; } }
        #endif

        [LocalizedDisplayName(_str_intOrder)]
        [MapField(_str_intOrder)]
        public abstract Int32 intOrder { get; set; }
        #if MONO
        protected Int32 intOrder_Original { get { return intOrder; } }
        protected Int32 intOrder_Previous { get { return intOrder; } }
        #else
        protected Int32 intOrder_Original { get { return ((EditableValue<Int32>)((dynamic)this)._intOrder).OriginalValue; } }
        protected Int32 intOrder_Previous { get { return ((EditableValue<Int32>)((dynamic)this)._intOrder).PreviousValue; } }
        #endif

        #region Set/Get values
        #region filed_info definifion
        protected class field_info
        {
            internal string _name;
            internal string _type;
            internal Func<RootFarmTree, object> _get_func;
            internal Action<RootFarmTree, string> _set_func;
            internal Action<RootFarmTree, RootFarmTree, CompareModel> _compare_func;
        }
        internal const string _str_Parent = "Parent";
        internal const string _str_IsNew = "IsNew";

        internal const string _str_idfParty = "idfParty";
        internal const string _str_idfsPartyType = "idfsPartyType";
        internal const string _str_strName = "strName";
        internal const string _str_idfParentParty = "idfParentParty";
        internal const string _str_intTotalAnimalQty = "intTotalAnimalQty";
        internal const string _str_intSickAnimalQty = "intSickAnimalQty";
        internal const string _str_intDeadAnimalQty = "intDeadAnimalQty";
        internal const string _str_strAverageAge = "strAverageAge";
        internal const string _str_datStartOfSignsDate = "datStartOfSignsDate";
        internal const string _str_strNote = "strNote";
        internal const string _str_HACode = "HACode";
        internal const string _str_intOrder = "intOrder";
        internal const string _str_idfsSpeciesTypeReference = "idfsSpeciesTypeReference";
        internal const string _str_lOrderingSequence = "lOrderingSequence";
        internal const string _str_strSpeciesName = "strSpeciesName";
        internal const string _str_strHerdName = "strHerdName";
        internal const string _str_SpeciesType = "SpeciesType";
        private static readonly field_info[] _field_infos =
        {

            new field_info {
              _name = _str_idfParty, _type = "Int64",
              _get_func = o => o.idfParty,
              _set_func = (o, val) => { o.idfParty = ParsingHelper.ParseInt64(val); },
              _compare_func = (o, c, m) => {
                if (o.idfParty != c.idfParty || o.IsRIRPropChanged(_str_idfParty, c))
                  m.Add(_str_idfParty, o.ObjectIdent + _str_idfParty, "Int64", o.idfParty == null ? "" : o.idfParty.ToString(), o.IsReadOnly(_str_idfParty), o.IsInvisible(_str_idfParty), o.IsRequired(_str_idfParty)); }
              },

            new field_info {
              _name = _str_idfsPartyType, _type = "Int32",
              _get_func = o => o.idfsPartyType,
              _set_func = (o, val) => { o.idfsPartyType = ParsingHelper.ParseInt32(val); },
              _compare_func = (o, c, m) => {
                if (o.idfsPartyType != c.idfsPartyType || o.IsRIRPropChanged(_str_idfsPartyType, c))
                  m.Add(_str_idfsPartyType, o.ObjectIdent + _str_idfsPartyType, "Int32", o.idfsPartyType == null ? "" : o.idfsPartyType.ToString(), o.IsReadOnly(_str_idfsPartyType), o.IsInvisible(_str_idfsPartyType), o.IsRequired(_str_idfsPartyType)); }
              },

            new field_info {
              _name = _str_strName, _type = "String",
              _get_func = o => o.strName,
              _set_func = (o, val) => { o.strName = ParsingHelper.ParseString(val); },
              _compare_func = (o, c, m) => {
                if (o.strName != c.strName || o.IsRIRPropChanged(_str_strName, c))
                  m.Add(_str_strName, o.ObjectIdent + _str_strName, "String", o.strName == null ? "" : o.strName.ToString(), o.IsReadOnly(_str_strName), o.IsInvisible(_str_strName), o.IsRequired(_str_strName)); }
              },

            new field_info {
              _name = _str_idfParentParty, _type = "Int64?",
              _get_func = o => o.idfParentParty,
              _set_func = (o, val) => { o.idfParentParty = ParsingHelper.ParseInt64Nullable(val); },
              _compare_func = (o, c, m) => {
                if (o.idfParentParty != c.idfParentParty || o.IsRIRPropChanged(_str_idfParentParty, c))
                  m.Add(_str_idfParentParty, o.ObjectIdent + _str_idfParentParty, "Int64?", o.idfParentParty == null ? "" : o.idfParentParty.ToString(), o.IsReadOnly(_str_idfParentParty), o.IsInvisible(_str_idfParentParty), o.IsRequired(_str_idfParentParty)); }
              },

            new field_info {
              _name = _str_intTotalAnimalQty, _type = "Int32?",
              _get_func = o => o.intTotalAnimalQty,
              _set_func = (o, val) => { o.intTotalAnimalQty = ParsingHelper.ParseInt32Nullable(val); },
              _compare_func = (o, c, m) => {
                if (o.intTotalAnimalQty != c.intTotalAnimalQty || o.IsRIRPropChanged(_str_intTotalAnimalQty, c))
                  m.Add(_str_intTotalAnimalQty, o.ObjectIdent + _str_intTotalAnimalQty, "Int32?", o.intTotalAnimalQty == null ? "" : o.intTotalAnimalQty.ToString(), o.IsReadOnly(_str_intTotalAnimalQty), o.IsInvisible(_str_intTotalAnimalQty), o.IsRequired(_str_intTotalAnimalQty)); }
              },

            new field_info {
              _name = _str_intSickAnimalQty, _type = "Int32?",
              _get_func = o => o.intSickAnimalQty,
              _set_func = (o, val) => { o.intSickAnimalQty = ParsingHelper.ParseInt32Nullable(val); },
              _compare_func = (o, c, m) => {
                if (o.intSickAnimalQty != c.intSickAnimalQty || o.IsRIRPropChanged(_str_intSickAnimalQty, c))
                  m.Add(_str_intSickAnimalQty, o.ObjectIdent + _str_intSickAnimalQty, "Int32?", o.intSickAnimalQty == null ? "" : o.intSickAnimalQty.ToString(), o.IsReadOnly(_str_intSickAnimalQty), o.IsInvisible(_str_intSickAnimalQty), o.IsRequired(_str_intSickAnimalQty)); }
              },

            new field_info {
              _name = _str_intDeadAnimalQty, _type = "Int32?",
              _get_func = o => o.intDeadAnimalQty,
              _set_func = (o, val) => { o.intDeadAnimalQty = ParsingHelper.ParseInt32Nullable(val); },
              _compare_func = (o, c, m) => {
                if (o.intDeadAnimalQty != c.intDeadAnimalQty || o.IsRIRPropChanged(_str_intDeadAnimalQty, c))
                  m.Add(_str_intDeadAnimalQty, o.ObjectIdent + _str_intDeadAnimalQty, "Int32?", o.intDeadAnimalQty == null ? "" : o.intDeadAnimalQty.ToString(), o.IsReadOnly(_str_intDeadAnimalQty), o.IsInvisible(_str_intDeadAnimalQty), o.IsRequired(_str_intDeadAnimalQty)); }
              },

            new field_info {
              _name = _str_strAverageAge, _type = "Int32?",
              _get_func = o => o.strAverageAge,
              _set_func = (o, val) => { o.strAverageAge = ParsingHelper.ParseInt32Nullable(val); },
              _compare_func = (o, c, m) => {
                if (o.strAverageAge != c.strAverageAge || o.IsRIRPropChanged(_str_strAverageAge, c))
                  m.Add(_str_strAverageAge, o.ObjectIdent + _str_strAverageAge, "Int32?", o.strAverageAge == null ? "" : o.strAverageAge.ToString(), o.IsReadOnly(_str_strAverageAge), o.IsInvisible(_str_strAverageAge), o.IsRequired(_str_strAverageAge)); }
              },

            new field_info {
              _name = _str_datStartOfSignsDate, _type = "DateTime?",
              _get_func = o => o.datStartOfSignsDate,
              _set_func = (o, val) => { o.datStartOfSignsDate = ParsingHelper.ParseDateTimeNullable(val); },
              _compare_func = (o, c, m) => {
                if (o.datStartOfSignsDate != c.datStartOfSignsDate || o.IsRIRPropChanged(_str_datStartOfSignsDate, c))
                  m.Add(_str_datStartOfSignsDate, o.ObjectIdent + _str_datStartOfSignsDate, "DateTime?", o.datStartOfSignsDate == null ? "" : o.datStartOfSignsDate.ToString(), o.IsReadOnly(_str_datStartOfSignsDate), o.IsInvisible(_str_datStartOfSignsDate), o.IsRequired(_str_datStartOfSignsDate)); }
              },

            new field_info {
              _name = _str_strNote, _type = "String",
              _get_func = o => o.strNote,
              _set_func = (o, val) => { o.strNote = ParsingHelper.ParseString(val); },
              _compare_func = (o, c, m) => {
                if (o.strNote != c.strNote || o.IsRIRPropChanged(_str_strNote, c))
                  m.Add(_str_strNote, o.ObjectIdent + _str_strNote, "String", o.strNote == null ? "" : o.strNote.ToString(), o.IsReadOnly(_str_strNote), o.IsInvisible(_str_strNote), o.IsRequired(_str_strNote)); }
              },

            new field_info {
              _name = _str_HACode, _type = "Int32?",
              _get_func = o => o.HACode,
              _set_func = (o, val) => { o.HACode = ParsingHelper.ParseInt32Nullable(val); },
              _compare_func = (o, c, m) => {
                if (o.HACode != c.HACode || o.IsRIRPropChanged(_str_HACode, c))
                  m.Add(_str_HACode, o.ObjectIdent + _str_HACode, "Int32?", o.HACode == null ? "" : o.HACode.ToString(), o.IsReadOnly(_str_HACode), o.IsInvisible(_str_HACode), o.IsRequired(_str_HACode)); }
              },

            new field_info {
              _name = _str_intOrder, _type = "Int32",
              _get_func = o => o.intOrder,
              _set_func = (o, val) => { o.intOrder = ParsingHelper.ParseInt32(val); },
              _compare_func = (o, c, m) => {
                if (o.intOrder != c.intOrder || o.IsRIRPropChanged(_str_intOrder, c))
                  m.Add(_str_intOrder, o.ObjectIdent + _str_intOrder, "Int32", o.intOrder == null ? "" : o.intOrder.ToString(), o.IsReadOnly(_str_intOrder), o.IsInvisible(_str_intOrder), o.IsRequired(_str_intOrder)); }
              },

            new field_info {
              _name = _str_strHerdName, _type = "string",
              _get_func = o => o.strHerdName,
              _set_func = (o, val) => { o.strHerdName = ParsingHelper.ParseString(val); },
              _compare_func = (o, c, m) => {

                if (o.strHerdName != c.strHerdName || o.IsRIRPropChanged(_str_strHerdName, c))
                  m.Add(_str_strHerdName, o.ObjectIdent + _str_strHerdName, "string", o.strHerdName == null ? "" : o.strHerdName.ToString(), o.IsReadOnly(_str_strHerdName), o.IsInvisible(_str_strHerdName), o.IsRequired(_str_strHerdName));
                 }
              },

            new field_info {
              _name = _str_idfsSpeciesTypeReference, _type = "long?",
              _get_func = o => o.idfsSpeciesTypeReference,
              _set_func = (o, val) => {},
              _compare_func = (o, c, m) => {

                if (o.idfsSpeciesTypeReference != c.idfsSpeciesTypeReference || o.IsRIRPropChanged(_str_idfsSpeciesTypeReference, c))
                  m.Add(_str_idfsSpeciesTypeReference, o.ObjectIdent + _str_idfsSpeciesTypeReference, "long?", o.idfsSpeciesTypeReference == null ? "" : o.idfsSpeciesTypeReference.ToString(), o.IsReadOnly(_str_idfsSpeciesTypeReference), o.IsInvisible(_str_idfsSpeciesTypeReference), o.IsRequired(_str_idfsSpeciesTypeReference));
                 }
              },

            new field_info {
              _name = _str_lOrderingSequence, _type = "long?",
              _get_func = o => o.lOrderingSequence,
              _set_func = (o, val) => {},
              _compare_func = (o, c, m) => {

                if (o.lOrderingSequence != c.lOrderingSequence || o.IsRIRPropChanged(_str_lOrderingSequence, c))
                  m.Add(_str_lOrderingSequence, o.ObjectIdent + _str_lOrderingSequence, "long?", o.lOrderingSequence == null ? "" : o.lOrderingSequence.ToString(), o.IsReadOnly(_str_lOrderingSequence), o.IsInvisible(_str_lOrderingSequence), o.IsRequired(_str_lOrderingSequence));
                 }
              },

            new field_info {
              _name = _str_strSpeciesName, _type = "string",
              _get_func = o => o.strSpeciesName,
              _set_func = (o, val) => {},
              _compare_func = (o, c, m) => {

                if (o.strSpeciesName != c.strSpeciesName || o.IsRIRPropChanged(_str_strSpeciesName, c))
                  m.Add(_str_strSpeciesName, o.ObjectIdent + _str_strSpeciesName, "string", o.strSpeciesName == null ? "" : o.strSpeciesName.ToString(), o.IsReadOnly(_str_strSpeciesName), o.IsInvisible(_str_strSpeciesName), o.IsRequired(_str_strSpeciesName));
                 }
              },

            new field_info {
              _name = _str_SpeciesType, _type = "Lookup",
              _get_func = o => { if (o.SpeciesType == null) return null; return o.SpeciesType.idfsBaseReference; },
              _set_func = (o, val) => { o.SpeciesType = o.SpeciesTypeLookup.Where(c => c.idfsBaseReference.ToString() == val).SingleOrDefault(); },
              _compare_func = (o, c, m) => {
                if (o.idfsSpeciesTypeReference != c.idfsSpeciesTypeReference || o.IsRIRPropChanged(_str_SpeciesType, c))
                  m.Add(_str_SpeciesType, o.ObjectIdent + _str_SpeciesType, "Lookup", o.idfsSpeciesTypeReference == null ? "" : o.idfsSpeciesTypeReference.ToString(), o.IsReadOnly(_str_SpeciesType), o.IsInvisible(_str_SpeciesType), o.IsRequired(_str_SpeciesType)); }
              },

            new field_info()
        };
        #endregion

        private string _getType(string name)
        {
            var i = _field_infos.FirstOrDefault(n => n._name == name);
            return i == null ? "" : i._type;
        }
        private object _getValue(string name)
        {
            var i = _field_infos.FirstOrDefault(n => n._name == name);
            return i == null ? null : i._get_func(this);
        }
        private void _setValue(string name, string val)
        {
            var i = _field_infos.FirstOrDefault(n => n._name == name);
            if (i != null) i._set_func(this, val);
        }
        internal CompareModel _compare(IObject o, CompareModel ret)
        {
            if (ret == null) ret = new CompareModel();
            if (o == null) return ret;
            RootFarmTree obj = (RootFarmTree)o;
            foreach (var i in _field_infos)
                if (i != null && i._compare_func != null) i._compare_func(this, obj, ret);
            return ret;
        }
        #endregion

        [Relation(typeof(BaseReference), eidss.model.Schema.BaseReference._str_idfsBaseReference, _str_idfsSpeciesTypeReference)]
        public BaseReference SpeciesType
        {
            get { return _SpeciesType == null ? null : ((long)_SpeciesType.Key == 0 ? null : _SpeciesType); }
            set
            {
                _SpeciesType = value == null ? null : ((long) value.Key == 0 ? null : value);
                idfsSpeciesTypeReference = _SpeciesType == null
                    ? new long?()
                    : _SpeciesType.idfsBaseReference;
                OnPropertyChanged(_str_SpeciesType);
            }
        }
        private BaseReference _SpeciesType;

        public BaseReferenceList SpeciesTypeLookup
        {
            get { return _SpeciesTypeLookup; }
        }
        private BaseReferenceList _SpeciesTypeLookup = new BaseReferenceList("rftSpeciesList");

        private BvSelectList _getList(string name)
        {

            switch(name)
            {

                case _str_SpeciesType:
                    return new BvSelectList(SpeciesTypeLookup, eidss.model.Schema.BaseReference._str_idfsBaseReference, null, SpeciesType, _str_idfsSpeciesTypeReference);

            }

            return null;
        }

          [XmlIgnore]
          [LocalizedDisplayName(_str_idfsSpeciesTypeReference)]
        public long? idfsSpeciesTypeReference
        {
            get { return new Func<RootFarmTree, long?>(c => ExprUtils.LongFromString(c.strName))(this); }

            set { strName = ExprUtils.StringFromObject(value); OnPropertyChanged(_str_idfsSpeciesTypeReference); }

        }

          [XmlIgnore]
          [LocalizedDisplayName(_str_lOrderingSequence)]
        public long? lOrderingSequence
        {
            get { return new Func<RootFarmTree, long?>(c=>c.idfsPartyType == (long)PartyTypeEnum.Species ? c.idfParentParty : c.idfParty)(this); }

        }

          [XmlIgnore]
          [LocalizedDisplayName(_str_strSpeciesName)]
        public string strSpeciesName
        {
            get { return new Func<RootFarmTree, string>(c=>c.idfsPartyType == (long)PartyTypeEnum.Species ? SpeciesType.name : "")(this); }

        }

          [LocalizedDisplayName(_str_strHerdName)]
        public string strHerdName
        {
            get { return m_strHerdName; }
            set { if (m_strHerdName != value) { m_strHerdName = value; OnPropertyChanged(_str_strHerdName); } }
        }
        private string m_strHerdName;

        protected CacheScope m_CS;
        protected Accessor _getAccessor() { return Accessor.Instance(m_CS); }
        private IObjectPermissions m_permissions = null;
        internal IObjectPermissions _permissions { get { return m_permissions; } set { m_permissions = value; } }
        internal string m_ObjectName = "RootFarmTree";

        #region Parent and Clone supporting
        [XmlIgnore]
        public IObject Parent
        {
            get { return m_Parent; }
            set { m_Parent = value; /*OnPropertyChanged(_str_Parent);*/ }
        }
        private IObject m_Parent;
        internal void _setParent()
        {

        }
        public override object Clone()
        {
            var ret = base.Clone() as RootFarmTree;
            ret.m_Parent = this.Parent;
            ret._setParent();
            if (this.IsDirty && !ret.IsDirty)
                ret.SetChange();
            else if (!this.IsDirty && ret.IsDirty)
                ret.RejectChanges();
            return ret;
        }
        public IObject CloneWithSetup(DbManagerProxy manager)
        {
            var ret = base.Clone() as RootFarmTree;
            ret.m_Parent = this.Parent;
            ret.m_IsNew = this.IsNew;
            ret.m_ObjectName = this.m_ObjectName;

            Accessor acc = Accessor.Instance(null);
            acc._SetupLoad(manager, ret);
            ret._setParent();
            ret._permissions = _permissions;
            return ret;
        }
        public RootFarmTree CloneWithSetup()
        {
            using (DbManagerProxy manager = DbManagerFactory.Factory.Create(ModelUserContext.Instance))
            {
                return CloneWithSetup(manager) as RootFarmTree;
            }
        }
        #endregion

        #region IObject implementation
        public object Key { get { return idfParty; } }
        public string KeyName { get { return "idfParty"; } }
        public string ToStringProp { get { return ToString(); } }
        private bool m_IsNew;
        public bool IsNew { get { return m_IsNew; } }
        public bool HasChanges
        {
            get
            {
                return IsDirty

                ;
            }
        }
        public new void RejectChanges()
        {

            var _prev_idfsSpeciesTypeReference_SpeciesType = idfsSpeciesTypeReference;
            base.RejectChanges();

            if (_prev_idfsSpeciesTypeReference_SpeciesType != idfsSpeciesTypeReference)
            {
                _SpeciesType = _SpeciesTypeLookup.FirstOrDefault(c => c.idfsBaseReference == idfsSpeciesTypeReference);
            }
        }
        public void DeepRejectChanges()
        {
            RejectChanges();

        }
        public void DeepAcceptChanges()
        {
            AcceptChanges();

        }
        private bool m_bForceDirty;
        public override void AcceptChanges()
        {
            m_bForceDirty = false;
            base.AcceptChanges();
        }
        public override bool IsDirty
        {
            get { return m_bForceDirty || base.IsDirty; }
        }
        public void SetChange()
        {
            m_bForceDirty = true;
        }
        public void DeepSetChange()
        {
            SetChange();

        }
        public bool MarkToDelete() { return _Delete(false); }
        public string ObjectName { get { return m_ObjectName; } }
        public string ObjectIdent { get { return ObjectName + "_" + Key.ToString() + "_"; } }
      public IObjectAccessor GetAccessor() { return _getAccessor(); }
      public IObjectPermissions GetPermissions() { return _permissions; }
      public bool ReadOnly { get { return _readOnly; } set { _readOnly = value; } }
      public bool IsReadOnly(string name) { return _isReadOnly(name); }
      public bool IsInvisible(string name) { return _isInvisible(name); }
      public bool IsRequired(string name) { return _isRequired(name); }
      public bool IsHiddenPersonalData(string name) { return _isHiddenPersonalData(name); }
      public string GetType(string name) { return _getType(name); }
      public object GetValue(string name) { return _getValue(name); }
      public void SetValue(string name, string val) { _setValue(name, val); }
      public CompareModel Compare(IObject o) { return _compare(o, null); }
      public BvSelectList GetList(string name) { return _getList(name); }
      public event ValidationEvent Validation;
      public event ValidationEvent ValidationEnd;
      public event AfterPostEvent AfterPost;

        public Dictionary<string, string> GetFieldTags(string name)
        {
          return null;
        }
      #endregion

      private bool IsRIRPropChanged(string fld, RootFarmTree c)
        {
            return IsReadOnly(fld) != c.IsReadOnly(fld) || IsInvisible(fld) != c.IsInvisible(fld) || IsRequired(fld) != c.IsRequired(fld);
        }

        public override string ToString()
        {
            return new Func<RootFarmTree, string>(c => c.strSpeciesName)(this);
        }

        public RootFarmTree()
        {

        }

        partial void Changed(string fieldName);
        partial void Created(DbManagerProxy manager);
        partial void Loaded(DbManagerProxy manager);
        partial void Deleted();

        private int? m_HACode;
        public int? _HACode { get { return m_HACode; } set { m_HACode = value; } }

        private bool m_IsForcedToDelete;
        public bool IsForcedToDelete { get { return m_IsForcedToDelete; } }

        private bool m_IsMarkedToDelete;
        public bool IsMarkedToDelete { get { return m_IsMarkedToDelete; } }

        public void _SetupMainHandler()
        {
            PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(RootFarmTree_PropertyChanged);
        }
        public void _RevokeMainHandler()
        {
            PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler(RootFarmTree_PropertyChanged);
        }
        private void RootFarmTree_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            (sender as RootFarmTree).Changed(e.PropertyName);

            if (e.PropertyName == _str_strName)
                OnPropertyChanged(_str_idfsSpeciesTypeReference);

            if (e.PropertyName == _str_idfParentParty)
                OnPropertyChanged(_str_lOrderingSequence);

            if (e.PropertyName == _str_idfsPartyType)
                OnPropertyChanged(_str_strSpeciesName);

        }

        public bool ForceToDelete() { return _Delete(true); }
        internal bool _Delete(bool isForceDelete)
        {
            if (!_ValidateOnDelete()) return false;
            _DeletingExtenders();
            m_IsMarkedToDelete = true;
            m_IsForcedToDelete = m_IsForcedToDelete ? m_IsForcedToDelete : isForceDelete;
            OnPropertyChanged("IsMarkedToDelete");
            _DeletedExtenders();
            Deleted();
            return true;
        }
        private bool _ValidateOnDelete(bool bReport = true)
        {

            return true;

        }
        private void _DeletingExtenders()
        {
            RootFarmTree obj = this;

        }
        private void _DeletedExtenders()
        {
            RootFarmTree obj = this;

        }

        public bool OnValidation(string msgId, string fldName, string prpName, object[] pars, Type type, bool shouldAsk)
        {
            if (Validation != null)
            {
                var args = new ValidationEventArgs(msgId, fldName, prpName, pars, type, this, shouldAsk);
                Validation(this, args);
                return args.Continue;
            }
            return false;
        }
        public bool OnValidationEnd(string msgId, string fldName, string prpName, object[] pars, Type type, bool shouldAsk)
        {
            if (ValidationEnd != null)
            {
                var args = new ValidationEventArgs(msgId, fldName, prpName, pars, type, this, shouldAsk);
                ValidationEnd(this, args);
                return args.Continue;
            }
            return false;
        }

        public void OnAfterPost()
        {
            if (AfterPost != null)
            {
                AfterPost(this, EventArgs.Empty);
            }
        }

        public FormSize FormSize
        {
            get { return FormSize.Undefined; }
        }

        private bool _isInvisible(string name)
        {

            return false;

        }

        private bool _isReadOnly(string name)
        {

            return ReadOnly;

        }

        private bool m_readOnly;
        private bool _readOnly
        {
            get { return m_readOnly; }
            set
            {
                m_readOnly = value;

            }
        }

        public Dictionary<string, Func<RootFarmTree, bool>> m_isRequired;
        private bool _isRequired(string name)
        {
            if (m_isRequired != null && m_isRequired.ContainsKey(name))
                return m_isRequired[name](this);
            return false;
        }

        public void AddRequired(string name, Func<RootFarmTree, bool> func)
        {
            if (m_isRequired == null)
                m_isRequired = new Dictionary<string, Func<RootFarmTree, bool>>();
            if (!m_isRequired.ContainsKey(name))
                m_isRequired.Add(name, func);
        }

    public Dictionary<string, Func<RootFarmTree, bool>> m_isHiddenPersonalData;
    private bool _isHiddenPersonalData(string name)
    {
    if (m_isHiddenPersonalData != null && m_isHiddenPersonalData.ContainsKey(name))
    return m_isHiddenPersonalData[name](this);
    return false;
    }

    public void AddHiddenPersonalData(string name, Func<RootFarmTree, bool> func)
    {
    if (m_isHiddenPersonalData == null)
    m_isHiddenPersonalData = new Dictionary<string, Func<RootFarmTree, bool>>();
    if (!m_isHiddenPersonalData.ContainsKey(name))
    m_isHiddenPersonalData.Add(name, func);
    }

        #region IDisposable Members
        private bool bIsDisposed;
        ~RootFarmTree()
        {
            Dispose();
        }
        public void Dispose()
        {
            if (!bIsDisposed)
            {
                bIsDisposed = true;

                LookupManager.RemoveObject("rftSpeciesList", this);

            }
        }
        #endregion

        #region ILookupUsage Members
        public void ReloadLookupItem(DbManagerProxy manager, string lookup_object)
        {

            if (lookup_object == "rftSpeciesList")
                _getAccessor().LoadLookup_SpeciesType(manager, this);

        }
        #endregion

        public void ParseFormCollection(NameValueCollection form, bool bParseLookups = true, bool bParseRelations = true)
        {
            if (bParseLookups)
            {
                _field_infos.Where(i => i._type == "Lookup").ToList().ForEach(a => { if (form[ObjectIdent + a._name] != null) a._set_func(this, form[ObjectIdent + a._name]);} );
            }

            _field_infos.Where(i => i._type != "Lookup" && i._type != "Child" && i._type != "Relation" && i._type != null)
                .ToList().ForEach(a => { if (form.AllKeys.Contains(ObjectIdent + a._name)) a._set_func(this, form[ObjectIdent + a._name]);} );

            if (bParseRelations)
            {

            }
        }

        #region Class for web grid
        public class RootFarmTreeGridModel : IGridModelItem
        {
            public string ErrorMessage { get; set; }
            public long ItemKey { get; set; }

            public Int64 idfParty { get; set; }

            public string strHerdName { get; set; }

            public string strSpeciesName { get; set; }

            public int? intTotalAnimalQty { get; set; }

            public int? intSickAnimalQty { get; set; }

            public int? intDeadAnimalQty { get; set; }

            public string strNote { get; set; }

            public DateTime? datStartOfSignsDate { get; set; }

            public long? idfsPartyType { get; set; }

        }
        public partial class RootFarmTreeGridModelList : List<RootFarmTreeGridModel>, IGridModelList
        {
            public long ListKey { get; protected set; }
            public List<string> Columns { get; protected set; }
            public List<string> Hiddens { get; protected set; }
            public Dictionary<string, string> Labels { get; protected set; }
            public Dictionary<string, ActionMetaItem> Actions { get; protected set; }
            public List<string> Keys { get; protected set; }
            public RootFarmTreeGridModelList(long key, IEnumerable items, string errMes)
            {
                LoadGridModelList(key, items as IEnumerable<RootFarmTree>, errMes);
            }
            public RootFarmTreeGridModelList(long key, IEnumerable<RootFarmTree> items)
            {
                LoadGridModelList(key, items, null);
            }
            partial void filter(List<RootFarmTree> items);
            private void LoadGridModelList(long key, IEnumerable<RootFarmTree> items, string errMes)
            {
                ListKey = key;

                Columns = new List<string> {_str_strHerdName,_str_strSpeciesName,_str_intTotalAnimalQty,_str_intSickAnimalQty,_str_intDeadAnimalQty,_str_strNote,_str_datStartOfSignsDate};

                Hiddens = new List<string> {_str_idfParty,_str_idfsPartyType};
                Keys = new List<string> {_str_idfParty};
                Labels = new Dictionary<string, string> {{_str_strHerdName, _str_strHerdName},{_str_strSpeciesName, _str_strSpeciesName},{_str_intTotalAnimalQty, _str_intTotalAnimalQty},{_str_intSickAnimalQty, _str_intSickAnimalQty},{_str_intDeadAnimalQty, _str_intDeadAnimalQty},{_str_strNote, "VetFarmTree.strNote"},{_str_datStartOfSignsDate, _str_datStartOfSignsDate}};
                Actions = new Dictionary<string, ActionMetaItem> {};
                var list = new List<RootFarmTree>(items);
                filter(list);
                AddRange(list.Where(c => !c.IsMarkedToDelete).Select(c => new RootFarmTreeGridModel()
                {
                    ItemKey=c.idfParty,strHerdName=c.strHerdName,strSpeciesName=c.strSpeciesName,intTotalAnimalQty=c.intTotalAnimalQty,intSickAnimalQty=c.intSickAnimalQty,intDeadAnimalQty=c.intDeadAnimalQty,strNote=c.strNote,datStartOfSignsDate=c.datStartOfSignsDate,idfsPartyType=c.idfsPartyType
                }));
                if (Count > 0)
                {
                    this.Last().ErrorMessage = errMes;
                }
            }
        }
        #endregion

        #region Accessor
        public abstract partial class Accessor
        : DataAccessor<RootFarmTree>
            , IObjectAccessor
            , IObjectMeta
            , IObjectValidator

            , IObjectCreator

            , IObjectSelectDetailList
            , IObjectPost

        {
            private delegate void on_action(RootFarmTree obj);
            private static Accessor g_Instance = CreateInstance<Accessor>();
            private CacheScope m_CS;
            public static Accessor Instance(CacheScope cs)
            {
                if (cs == null)
                    return g_Instance;
                lock(cs)
                {
                    object acc = cs.Get(typeof (Accessor));
                    if (acc != null)
                    {
                        return acc as Accessor;
                    }
                    Accessor ret = CreateInstance<Accessor>();
                    ret.m_CS = cs;
                    cs.Add(typeof(Accessor), ret);
                    return ret;
                }
            }
            private BaseReference.Accessor SpeciesTypeAccessor { get { return eidss.model.Schema.BaseReference.Accessor.Instance(m_CS); } }

            public virtual List<IObject> SelectDetailList(DbManagerProxy manager, object ident, int? HACode = null)
            {
                return _SelectList(manager
                    , (Int64?)ident

                    , HACode

                    , null
                    , null
                    ).Cast<IObject>().ToList();
            }

            public virtual List<RootFarmTree> SelectList(DbManagerProxy manager
                , Int64? idfFarm
                , int? HACode

                )
            {
                return _SelectList(manager
                    , idfFarm
                    , HACode

                    , delegate(RootFarmTree obj)
                        {
                        }
                    , delegate(RootFarmTree obj)
                        {
                        }
                    );
            }

            private List<RootFarmTree> _SelectList(DbManagerProxy manager
                , Int64? idfFarm
                , int? HACode

                , on_action loading, on_action loaded
                )
            {
                try
                {
                    MapResultSet[] sets = new MapResultSet[1];
                    List<RootFarmTree> objs = new List<RootFarmTree>();
                    sets[0] = new MapResultSet(typeof(RootFarmTree), objs);

                    manager
                        .SetSpCommand("spRootFarmTree_SelectDetail"
                            , manager.Parameter("@idfFarm", idfFarm)
                            , manager.Parameter("@HACode", HACode)
                            )
                        .ExecuteResultSet(sets);
                    foreach(var obj in objs)
                    {
                        obj.m_CS = m_CS;

                        obj._HACode = HACode;

                        if (loading != null)
                            loading(obj);
                        _SetupLoad(manager, obj);

                        if (loaded != null)
                            loaded(obj);
                    }

                    return objs;
                }
                catch(DataException e)
                {
                    throw DbModelException.Create(e);
                }
            }

            internal void _SetupLoad(DbManagerProxy manager, RootFarmTree obj)
            {
                if (obj == null) return;

                // loading extenters - begin
                // loading extenters - end

                _LoadLookups(manager, obj);
                obj._setParent();

                // loaded extenters - begin
                obj.strHerdName = new Func<RootFarmTree, string>(c => c.GetHerdName())(obj);
                // loaded extenters - end

                _SetupHandlers(obj);
                _SetupChildHandlers(obj, null);

                _SetPermitions(obj._permissions, obj);
                _SetupRequired(obj);
                _SetupPersonalDataRestrictions(obj);
                obj._SetupMainHandler();
                obj.AcceptChanges();
            }

            internal void _SetPermitions(IObjectPermissions permissions, RootFarmTree obj)
            {
                if (obj != null)
                {
                    obj._permissions = permissions;
                    if (obj._permissions != null)
                    {

                    }
                }
            }

            private RootFarmTree _CreateNew(DbManagerProxy manager, IObject Parent, int? HACode, on_action creating, on_action created)
            {
                try
                {
                    RootFarmTree obj = RootFarmTree.CreateInstance();
                    obj.m_CS = m_CS;
                    obj.m_IsNew = true;
                    obj.Parent = Parent;

                    obj._HACode = HACode;

                    if (creating != null)
                        creating(obj);

                    // creating extenters - begin
                obj.strName = new Func<RootFarmTree, DbManagerProxy, string>((c,m) =>
                        c.strName != "(new herd)"
                        ? c.strName
                        : m.SetSpCommand("dbo.spGetNextNumber", (long)NumberingObjectEnum.AnimalGroup, DBNull.Value, DBNull.Value)
                        .ExecuteScalar<string>(ScalarSourceType.OutputParameter, "NextNumberValue"))(obj, manager);
                obj.strHerdName = new Func<RootFarmTree, string>(c => c.GetHerdName())(obj);
                    // creating extenters - end

                    _LoadLookups(manager, obj);
                    _SetupHandlers(obj);
                    _SetupChildHandlers(obj, null);

                    obj._SetupMainHandler();
                    obj._setParent();

                    // created extenters - begin
                    // created extenters - end

                    if (created != null)
                        created(obj);
                    obj.Created(manager);
                    _SetPermitions(obj._permissions, obj);
                    _SetupRequired(obj);
                    _SetupPersonalDataRestrictions(obj);
                    return obj;
                }
                catch(DataException e)
                {
                    throw DbModelException.Create(e);
                }
            }

            public RootFarmTree CreateNewT(DbManagerProxy manager, IObject Parent, int? HACode = null)
            {
                return _CreateNew(manager, Parent, HACode, null, null);
            }
            public IObject CreateNew(DbManagerProxy manager, IObject Parent, int? HACode = null)
            {
                return _CreateNew(manager, Parent, HACode, null, null);
            }

            public RootFarmTree CreateWithParamsT(DbManagerProxy manager, IObject Parent, List<object> pars)
            {
                return _CreateNew(manager, Parent, null, null, null);
            }
            public IObject CreateWithParams(DbManagerProxy manager, IObject Parent, List<object> pars)
            {
                return _CreateNew(manager, Parent, null, null, null);
            }

            public RootFarmTree CreateFarmT(DbManagerProxy manager, IObject Parent, List<object> pars)
            {

                if (pars == null) throw new ParamsCountException();
                if (pars.Count != 2)
                    throw new ParamsCountException();
                if (pars[0] != null && !(pars[0] is FarmRootPanel))
                    throw new TypeMismatchException("farm", typeof(FarmRootPanel));
                if (pars[1] != null && !(pars[1] is int?))
                    throw new TypeMismatchException("hacode", typeof(int?));

                return CreateFarm(manager, Parent
                    , (FarmRootPanel)pars[0]
                    , (int?)pars[1]
                    );
            }
            public IObject CreateFarm(DbManagerProxy manager, IObject Parent, List<object> pars)
            {
                return CreateFarmT(manager, Parent, pars);
            }
            public RootFarmTree CreateFarm(DbManagerProxy manager, IObject Parent
                , FarmRootPanel farm
                , int? hacode
                )
            {
                return _CreateNew(manager, Parent

                    , null

                    , obj =>
                {
                obj._HACode = new Func<RootFarmTree, int?>(c => hacode)(obj);
                obj.idfParty = new Func<RootFarmTree, long>(c => farm.idfFarm)(obj);
                obj.strName = new Func<RootFarmTree, string>(c => farm.strFarmCode)(obj);
                obj.idfsPartyType = (int)PartyTypeEnum.Farm;
                }
                    , obj =>
                {
                }
                );
            }

            public RootFarmTree CreateHerdT(DbManagerProxy manager, IObject Parent, List<object> pars)
            {

                if (pars == null) throw new ParamsCountException();
                if (pars.Count != 1)
                    throw new ParamsCountException();
                if (pars[0] != null && !(pars[0] is RootFarmTree))
                    throw new TypeMismatchException("parent", typeof(RootFarmTree));

                return CreateHerd(manager, Parent
                    , (RootFarmTree)pars[0]
                    );
            }
            public IObject CreateHerd(DbManagerProxy manager, IObject Parent, List<object> pars)
            {
                return CreateHerdT(manager, Parent, pars);
            }
            public RootFarmTree CreateHerd(DbManagerProxy manager, IObject Parent
                , RootFarmTree parent
                )
            {
                return _CreateNew(manager, Parent

                    , null

                    , obj =>
                {
                obj._HACode = new Func<RootFarmTree, int?>(c => parent._HACode)(obj);
                obj.idfParty = (new GetNewIDExtender<RootFarmTree>()).GetScalar(manager, obj);
                obj.idfParentParty = new Func<RootFarmTree, long?>(c => parent.idfParty)(obj);
                obj.idfsPartyType = (int)PartyTypeEnum.Herd;
                obj.strName = new Func<RootFarmTree, string>(c => "(new herd)")(obj);
                }
                    , obj =>
                {
                }
                );
            }

            public RootFarmTree CreateSpeciesT(DbManagerProxy manager, IObject Parent, List<object> pars)
            {

                if (pars == null) throw new ParamsCountException();
                if (pars.Count != 1)
                    throw new ParamsCountException();
                if (pars[0] != null && !(pars[0] is RootFarmTree))
                    throw new TypeMismatchException("parent", typeof(RootFarmTree));

                return CreateSpecies(manager, Parent
                    , (RootFarmTree)pars[0]
                    );
            }
            public IObject CreateSpecies(DbManagerProxy manager, IObject Parent, List<object> pars)
            {
                return CreateSpeciesT(manager, Parent, pars);
            }
            public RootFarmTree CreateSpecies(DbManagerProxy manager, IObject Parent
                , RootFarmTree parent
                )
            {
                return _CreateNew(manager, Parent

                    , null

                    , obj =>
                {
                obj._HACode = new Func<RootFarmTree, int?>(c => parent._HACode)(obj);
                obj.idfParty = (new GetNewIDExtender<RootFarmTree>()).GetScalar(manager, obj);
                obj.idfParentParty = new Func<RootFarmTree, long?>(c => parent.idfParty)(obj);
                obj.idfsPartyType = (int)PartyTypeEnum.Species;
                obj.strName = new Func<RootFarmTree, string>(c => "947220000000")(obj);
                }
                    , obj =>
                {
                }
                );
            }

            private void _SetupChildHandlers(RootFarmTree obj, object newobj)
            {

            }

            private void _SetupHandlers(RootFarmTree obj)
            {

                obj.PropertyChanged += delegate(object sender, PropertyChangedEventArgs e)
                    {

                        if (e.PropertyName == _str_intDeadAnimalQty)
                        {
                            try
                            {

                TotalQuantityRule(obj);

                            }
                            catch(ValidationModelException ex)
                            {
                                if (!obj.OnValidation(ex.MessageId, ex.FieldName, ex.PropertyName, ex.Pars, ex.ValidatorType, ex.ShouldAsk))
                                {
                                    obj.LockNotifyChanges();
                                    obj.CancelMemberLastChanges(_str_intDeadAnimalQty);
                                    obj.OnValidationEnd(ex.MessageId, ex.FieldName, ex.PropertyName, ex.Pars, ex.ValidatorType, ex.ShouldAsk);
                                    obj.UnlockNotifyChanges();
                                }
                            }
                        }

                        if (e.PropertyName == _str_intSickAnimalQty)
                        {
                            try
                            {

                TotalQuantityRule(obj);

                            }
                            catch(ValidationModelException ex)
                            {
                                if (!obj.OnValidation(ex.MessageId, ex.FieldName, ex.PropertyName, ex.Pars, ex.ValidatorType, ex.ShouldAsk))
                                {
                                    obj.LockNotifyChanges();
                                    obj.CancelMemberLastChanges(_str_intSickAnimalQty);
                                    obj.OnValidationEnd(ex.MessageId, ex.FieldName, ex.PropertyName, ex.Pars, ex.ValidatorType, ex.ShouldAsk);
                                    obj.UnlockNotifyChanges();
                                }
                            }
                        }

                        if (e.PropertyName == _str_intTotalAnimalQty)
                        {
                            try
                            {

                TotalQuantityRule(obj);

                            }
                            catch(ValidationModelException ex)
                            {
                                if (!obj.OnValidation(ex.MessageId, ex.FieldName, ex.PropertyName, ex.Pars, ex.ValidatorType, ex.ShouldAsk))
                                {
                                    obj.LockNotifyChanges();
                                    obj.CancelMemberLastChanges(_str_intTotalAnimalQty);
                                    obj.OnValidationEnd(ex.MessageId, ex.FieldName, ex.PropertyName, ex.Pars, ex.ValidatorType, ex.ShouldAsk);
                                    obj.UnlockNotifyChanges();
                                }
                            }
                        }

                    };

            }

            public void LoadLookup_SpeciesType(DbManagerProxy manager, RootFarmTree obj)
            {

                obj.SpeciesTypeLookup.Clear();

                obj.SpeciesTypeLookup.Add(SpeciesTypeAccessor.CreateNewT(manager, null));

                obj.SpeciesTypeLookup.AddRange(SpeciesTypeAccessor.rftSpeciesList_SelectList(manager

                    )
                    .Where(c => (c.intHACode.GetValueOrDefault() & obj._HACode.GetValueOrDefault()) != 0 || c.idfsBaseReference == obj.idfsSpeciesTypeReference)

                    .Where(c => obj.idfsPartyType == (long)PartyTypeEnum.Species)

                    .Where(c => (c.intRowStatus == 0) || (c.idfsBaseReference == obj.idfsSpeciesTypeReference))

                    .ToList());

                if (obj.idfsSpeciesTypeReference != null && obj.idfsSpeciesTypeReference != 0)
                {
                    obj.SpeciesType = obj.SpeciesTypeLookup
                        .Where(c => c.idfsBaseReference == obj.idfsSpeciesTypeReference)
                        .SingleOrDefault();
                }

                LookupManager.AddObject("rftSpeciesList", obj, SpeciesTypeAccessor.GetType(), "rftSpeciesList_SelectList"
                  , "SelectLookupList");
            }

            private void _LoadLookups(DbManagerProxy manager, RootFarmTree obj)
            {

                LoadLookup_SpeciesType(manager, obj);

            }

            [SprocName("spRootFarmTree_Post")]
            protected abstract void _post(DbManagerProxy manager, int Action,
                [Direction.InputOutput("strName")] RootFarmTree obj);
            protected void _postPredicate(DbManagerProxy manager, int Action,
                [Direction.InputOutput("strName")] RootFarmTree obj)
            {

                _post(manager, Action, obj);

            }

            public bool Post(DbManagerProxy manager, IObject obj, bool bChildObject = false)
            {
                bool bTransactionStarted = false;
                bool bSuccess;
                try
                {
                    RootFarmTree bo = obj as RootFarmTree;

                    if (!manager.IsTransactionStarted)
                    {

                        bTransactionStarted = true;
                        manager.BeginTransaction();
                    }
                    bSuccess = _PostNonTransaction(manager, obj as RootFarmTree, bChildObject);
                    if (bTransactionStarted)
                    {
                        if (bSuccess)
                        {
                            manager.CommitTransaction();

                        }
                        else
                        {
                            manager.RollbackTransaction();
                        }

                    }
                    if (bSuccess && bo.IsNew && !bo.IsMarkedToDelete) // insert
                    {
                        bo.m_IsNew = false;
                    }
                    if (bSuccess && bTransactionStarted)
                    {
                        bo.OnAfterPost();
                    }
                }
                catch(Exception e)
                {
                    if (bTransactionStarted)
                    {
                        manager.RollbackTransaction();

                    }

                    if (e is DataException)
                    {
                        throw DbModelException.Create(e as DataException);
                    }
                    else
                        throw;
                }
                return bSuccess;
            }
            private bool _PostNonTransaction(DbManagerProxy manager, RootFarmTree obj, bool bChildObject)
            {
                bool bHasChanges = obj.HasChanges;
                if (!obj.IsNew && obj.IsMarkedToDelete) // delete
                {

                    if (!ValidateCanDelete(manager, obj)) return false;

                    _postPredicate(manager, 8, obj);

                }
                else if (!obj.IsMarkedToDelete) // insert/update
                {
                    if (!bChildObject)
                        if (!Validate(manager, obj, true, true, true))
                            return false;

                    // posting extenters - begin
                    // posting extenters - end

                    if (obj.IsNew && !obj.IsMarkedToDelete && obj.HasChanges)
                        _postPredicate(manager, 4, obj);
                    else if (!obj.IsNew && !obj.IsMarkedToDelete && obj.HasChanges)
                        _postPredicate(manager, 16, obj);

                    // posted extenters - begin
                    // posted extenters - end

                }
                obj.AcceptChanges();

                return true;
            }

            public bool ValidateCanDelete(RootFarmTree obj)
            {
                using (DbManagerProxy manager = DbManagerFactory.Factory.Create(ModelUserContext.Instance))
                {
                    return ValidateCanDelete(manager, obj);
                }
            }
            public bool ValidateCanDelete(DbManagerProxy manager, RootFarmTree obj)
            {

                return true;
            }

            public bool Validate(DbManagerProxy manager, IObject obj, bool bPostValidation, bool bChangeValidation, bool bDeepValidation, bool bRethrowException = false)
            {
                return Validate(manager, obj as RootFarmTree, bPostValidation, bChangeValidation, bDeepValidation, bRethrowException);
            }
            public bool Validate(DbManagerProxy manager, RootFarmTree obj, bool bPostValidation, bool bChangeValidation, bool bDeepValidation, bool bRethrowException = false)
            {

                try
                {
                    if (bPostValidation)
                    {

                    }

                    if (bChangeValidation)
                    {

                TotalQuantityRule(obj);

                TotalQuantityRule(obj);

                TotalQuantityRule(obj);

                    }

                    if (bDeepValidation)
                    {

                    }
                }
                catch(ValidationModelException ex)
                {
                    if (bRethrowException)
                        throw;
                    if (!obj.OnValidation(ex.MessageId, ex.FieldName, ex.PropertyName, ex.Pars, ex.ValidatorType, ex.ShouldAsk))
                    {
                        obj.OnValidationEnd(ex.MessageId, ex.FieldName, ex.PropertyName, ex.Pars, ex.ValidatorType, ex.ShouldAsk);
                        return false;
                    }
                }

                return true;
            }

            private void _SetupRequired(RootFarmTree obj)
            {

            }

    private void _SetupPersonalDataRestrictions(RootFarmTree obj)
    {

    }

            #region IObjectMeta
            public int? MaxSize(string name) { return Meta.Sizes.ContainsKey(name) ? (int?)Meta.Sizes[name] : null; }
            public bool RequiredByField(string name, IObject obj) { return Meta.RequiredByField.ContainsKey(name) ? Meta.RequiredByField[name](obj as RootFarmTree) : false; }
            public bool RequiredByProperty(string name, IObject obj) { return Meta.RequiredByProperty.ContainsKey(name) ? Meta.RequiredByProperty[name](obj as RootFarmTree) : false; }
            public List<SearchPanelMetaItem> SearchPanelMeta { get { return Meta.SearchPanelMeta; } }
            public List<GridMetaItem> GridMeta { get { return Meta.GridMeta; } }
            public List<ActionMetaItem> Actions { get { return Meta.Actions; } }
            public string DetailPanel { get { return "RootFarmTreeDetail"; } }
            public string HelpIdWin { get { return ""; } }
            public string HelpIdWeb { get { return ""; } }
            public string HelpIdHh { get { return ""; } }
            #endregion

        }

        #region Meta
        public static class Meta
        {
            public static string spSelect = "spRootFarmTree_SelectDetail";
            public static string spCount = "";
            public static string spPost = "spRootFarmTree_Post";
            public static string spInsert = "";
            public static string spUpdate = "";
            public static string spDelete = "";
            public static string spCanDelete = "";

            public static Dictionary<string, int> Sizes = new Dictionary<string, int>();
            public static Dictionary<string, Func<RootFarmTree, bool>> RequiredByField = new Dictionary<string, Func<RootFarmTree, bool>>();
            public static Dictionary<string, Func<RootFarmTree, bool>> RequiredByProperty = new Dictionary<string, Func<RootFarmTree, bool>>();
            public static List<SearchPanelMetaItem> SearchPanelMeta = new List<SearchPanelMetaItem>();
            public static List<GridMetaItem> GridMeta = new List<GridMetaItem>();
            public static List<ActionMetaItem> Actions = new List<ActionMetaItem>();
            static Meta()
            {

                Sizes.Add(_str_strName, 200);
                Sizes.Add(_str_strNote, 2000);
                GridMeta.Add(new GridMetaItem(
                    _str_idfParty,
                    _str_idfParty, null, false, true, null
                    ));
                GridMeta.Add(new GridMetaItem(
                    _str_strHerdName,
                    _str_strHerdName, null, true, true, null
                    ));
                GridMeta.Add(new GridMetaItem(
                    _str_strSpeciesName,
                    _str_strSpeciesName, null, true, true, null
                    ));
                GridMeta.Add(new GridMetaItem(
                    _str_intTotalAnimalQty,
                    _str_intTotalAnimalQty, null, true, true, null
                    ));
                GridMeta.Add(new GridMetaItem(
                    _str_intSickAnimalQty,
                    _str_intSickAnimalQty, null, true, true, null
                    ));
                GridMeta.Add(new GridMetaItem(
                    _str_intDeadAnimalQty,
                    _str_intDeadAnimalQty, null, true, true, null
                    ));
                GridMeta.Add(new GridMetaItem(
                    _str_strNote,
                    "VetFarmTree.strNote", null, true, true, null
                    ));
                GridMeta.Add(new GridMetaItem(
                    _str_datStartOfSignsDate,
                    _str_datStartOfSignsDate, null, true, true, null
                    ));
                GridMeta.Add(new GridMetaItem(
                    _str_idfsPartyType,
                    _str_idfsPartyType, null, false, true, null
                    ));
                Actions.Add(new ActionMetaItem(
                    "CreateFarm",
                    ActionTypes.Create,
                    true,
                    "",
                    "",

                    (manager, c, pars) => new ActResult(true, Accessor.Instance(null).CreateFarm(manager, c, pars)),

                    null,

                    null,
                      false,
                    null,
                    null,
                    null,
                    null,
                    null,
                    false
                    ));

                Actions.Add(new ActionMetaItem(
                    "CreateHerd",
                    ActionTypes.Create,
                    true,
                    "",
                    "",

                    (manager, c, pars) => new ActResult(true, Accessor.Instance(null).CreateHerd(manager, c, pars)),

                    null,

                    null,
                      false,
                    null,
                    null,
                    null,
                    null,
                    null,
                    false
                    ));

                Actions.Add(new ActionMetaItem(
                    "CreateSpecies",
                    ActionTypes.Create,
                    true,
                    "",
                    "",

                    (manager, c, pars) => new ActResult(true, Accessor.Instance(null).CreateSpecies(manager, c, pars)),

                    null,

                    null,
                      false,
                    null,
                    null,
                    null,
                    null,
                    null,
                    false
                    ));

                Actions.Add(new ActionMetaItem(
                    "Create",
                    ActionTypes.Create,
                    false,
                    String.Empty,
                    String.Empty,
                    (manager, c, pars) => new ActResult(true, Accessor.Instance(null).CreateWithParams(manager, null, pars)),
                    null,
                    new ActionMetaItem.VisualItem(
                        /*from BvMessages*/"strCreate_Id",
                        "add",
                        /*from BvMessages*/"tooltipCreate_Id",
                        /*from BvMessages*/"",
                        "",
                        /*from BvMessages*/"tooltipCreate_Id",
                        ActionsAlignment.Right,
                        ActionsPanelType.Group,
                        ActionsAppType.All
                      ),
                      false,
                      null,
                      null,
                      null,
                      null,
                      null,
                      false
                      ));

                Actions.Add(new ActionMetaItem(
                    "Edit",
                    ActionTypes.Edit,
                    false,
                    String.Empty,
                    String.Empty,
                    (manager, c, pars) => new ActResult(true, c),
                    null,
                    new ActionMetaItem.VisualItem(
                        /*from BvMessages*/"strEdit_Id",
                        "edit",
                        /*from BvMessages*/"tooltipEdit_Id",
                        /*from BvMessages*/"strView_Id",
                        "View1",
                        /*from BvMessages*/"tooltipEdit_Id",
                        ActionsAlignment.Right,
                        ActionsPanelType.Group,
                        ActionsAppType.All
                      ),
                      false,
                      null,
                      null,
                      null,
                      null,
                      null,
                      false
                      ));

                Actions.Add(new ActionMetaItem(
                    "Delete",
                    ActionTypes.Delete,
                    false,
                    String.Empty,
                    String.Empty,
                    (manager, c, pars) => ((RootFarmTree)c).MarkToDelete(),
                    null,
                    new ActionMetaItem.VisualItem(
                        /*from BvMessages*/"strDelete_Id",
                        "Delete_Remove",
                        /*from BvMessages*/"tooltipDelete_Id",
                        /*from BvMessages*/"",
                        "",
                        /*from BvMessages*/"tooltipDelete_Id",
                        ActionsAlignment.Right,
                        ActionsPanelType.Group,
                        ActionsAppType.All
                      ),
                      false,
                      null,
                      null,
                      null,
                      null,
                      null,
                      false
                      ));

                Actions.Add(new ActionMetaItem(
                    "Ok",
                    ActionTypes.Ok,
                    false,
                    String.Empty,
                    String.Empty,
                    (manager, c, pars) => new ActResult(true, c),
                    null,
                    new ActionMetaItem.VisualItem(
                        /*from BvMessages*/"strOK_Id",
                        "",
                        /*from BvMessages*/"tooltipOK_Id",
                        /*from BvMessages*/"",
                        "",
                        /*from BvMessages*/"tooltipOK_Id",
                        ActionsAlignment.Right,
                        ActionsPanelType.Main,
                        ActionsAppType.All
                      ),
                      false,
                      null,
                      null,
                      null,
                      null,
                      null,
                      false
                      ));

                Actions.Add(new ActionMetaItem(
                    "Cancel",
                    ActionTypes.Cancel,
                    false,
                    String.Empty,
                    String.Empty,
                    (manager, c, pars) => new ActResult(true, c),
                    null,
                    new ActionMetaItem.VisualItem(
                        /*from BvMessages*/"strCancel_Id",
                        "",
                        /*from BvMessages*/"tooltipCancel_Id",
                        /*from BvMessages*/"strOK_Id",
                        "",
                        /*from BvMessages*/"tooltipCancel_Id",
                        ActionsAlignment.Right,
                        ActionsPanelType.Main,
                        ActionsAppType.All
                      ),
                      false,
                      null,
                      null,
                      null,
                      null,
                      null,
                      false
                      ));

            }
        }
        #endregion

        #endregion
        }

}

redpajama_set_name: RedPajamaGithub


text:
David Koepp Net Worth
in Richest Celebrities › Directors
David Koepp Net Worth:
David Koepp net worth: David Koepp is an American screenwriter and director who has a net worth of $35 million. David Koepp was born in Pewaukee, Wisconsin. His films have grossed more than $2.3 billion at the box office, which makes him the 5th most successful screenwriter of all-time. Koepp wrote and produced the film Apartment Zero in 1988.
He wrote for the movies Bad Influence, Why Me?, and I Come in Peace in 1990. Koepp wrote for the films Toy Soldiers in 1991, Death Becomes Her in 1992, Jurassic Park in 1993, and Carlito's Way in 1993. He wrote and co-produced the movie The Paper in 1994 and wrote the film The Shadow the same year. Koepp wrote for the film Mission: Impossible in 1996 and wrote and directed The Trigger Effect in 1996. Koepp wrote for the films The Lost World: Jurassic Park in 1997 and Snake Eyes in 1998. He wrote and directed Stir of Echoes in 1999 and wrote and produced Panic Room in 2002. He wrote for the film Spider-Man in 2002. Koepp wrote and directed the movie Secret Window in 2004. He co-wrote the films War of the Worlds and Zathura in 2005 and Indiana Jones and the Kingdom of the Crystal Skull in 2008. He wrote for the films Angels & Demons in 2009 and The Little Engine That Could in 2011. Koepp wrote and directed Premium Rush in 2012 and wrote for Jack Ryan: Shadow Recruit in 2014. He directed the film Mortdecai in 2015 and wrote the movie Inferno in 2016.
David Zucker Net Worth
Scott Derrickson Net Worth
Alexandre Rockwell Net Worth
Date of Birth: Jun 9, 1963 (58 years old)
Profession: Screenwriter, Actor, Television Producer, Film Producer, Film Director
Steve McQueen Net Worth
James Vanderbilt Net Worth
Ariana Richards Net Worth
Jim Jarmusch Net Worth
Vidhu Vinod Chopra Net Worth
David E. Talbert Net Worth

redpajama_set_name: RedPajamaCommonCrawl


Deadline: June 2nd, 2014 at 11:59 p.m.
The EIT ICT Labs Outreach Programme aims at sharing EIT ICT Labs' best practices across Europe and contributing to the creation of start-ups by building strong ties to on-going EIT ICT Labs action lines and other related innovation programs and contests.
In the context of this program, EIT ICT Labs supports start-ups based in the Outreach Programme countries to get in contact with EIT ICT Labs innovation activities by organizing training sessions in Trento on lean start-up, business model canvas, customer validation and development, starting from June 23rd, 2014 to June 26th, 2014.
These training activities will take place in conjunction with TechPeaks, a people accelerator program organized by Trento RISE, an EIT ICT Labs Partner. In particular, selected start-ups will have the opportunity to participate in the mentoring sessions organized at TechPeaks during the time of their visit and featuring Andy Parsons, Vitaly Golomb, and Vito Lomele.
The EIT ICT Labs offers travel support to and from Trento in favor of up to fifteen start-ups that are in an early stage of growth, looking for coaching opportunities and connection with EIT ICT Labs activities.
Countries considered for this call are the ones under the geographical scope of the Outreach Programme.
by June 2nd, 2014 at 11:59 p.m.
For more information please consult the Terms & Conditions of the call.
Should you have any questions, please feel free to contact Aleksandra Parcinska at aleksandra.parcinska@trentorise.eu.


Patrick Suskind's Perfume is a classic novel of death and sensuality in Paris, published as a Penguin Essential for the first time. 'In eighteenth-century France there lived a man who was one of the most gifted and abominable personages in an era that knew no lack of gifted and abominable personages. His name was Jean-Baptiste Grenouille, and if his name has been forgotten today, it is certainly not because Grenouille fell short of those more famous blackguards when it came to arrogance, misanthropy, immorality, or, more succinctly, wickedness, but because his gifts and his sole ambition were restricted to a domain that leaves no traces in history: to the fleeting realm of scent ...' "An astonishing tour de force both in concept and execution." (Guardian).
"A fantastic tale of murder and twisted eroticism controlled by a disgusted loathing of humanity...Clever, stylish, absorbing and well worth reading." (Literary Review). "A meditation on the nature of death, desire and decay...a remarkable debut." (Peter Ackroyd, The New York Times Book Review). "Unlike anything else one has read. A phenomenon...Everyone seems to want to get a whiff of this strange perfume, which will remain unique in contemporary literature. " (Figaro). "An ingenious and totally absorbing fantasy." (Daily Telegraph).
"Witty, stylish and ferociously absorbing." (Observer).


ORANGE — An Orange elementary school teacher has been suspended for having her third-grade students write "get well" letters to an inmate convicted of killing a cop, school officials announced today.
In a statement provided by Orange Superintendent Ronald Lee, district officials sharply criticized the assignment given by teacher Marylin Zuniga to write letters to former death row inmate Mumia Abu-Jamal.
School officials said they "vehemently deny" having prior knowledge of the assignment, and said Zuniga neither sought prior approval nor notified parents about this "unauthorized activity."
"The Orange Public Schools was surprised to learn through recent news reports that one of its teachers, Ms. Marilyn Zuniga, a third grade teacher at Forest Street Elementary School, involved her students in a 'get well' letter writing assignment to convicted cop killer Mumia Abu-Jamal," the statement reads.
"The school's principal and district administrators vehemently deny that it had any knowledge of the assignment and preliminary inquiries find that no approval was ever sought nor were parents notified about this unauthorized activity.
"The incident reported is in no way condoned nor does it reflect curriculum, program or activities approved by the district."
The district is closed for spring break this week, but school officials said they will commence a full investigation into the matter when staff and students return on Monday.
"Ms. Zuniga will be immediately suspended with pay until such time the investigation is completed and based upon the results of the investigation additional action may be taken by the Board of Education," the statement reads.
District officials declined further comment on the matter, "because it has now become a personnel issue."
Zuniga did not respond to messages seeking comment.
Abu-Jamal, 60, is serving a life sentence for killing Philadelphia police officer Daniel Faulkner in 1981. He has been suffering from complications related to diabetes, according to reports.
A federal appeals court upheld Abu-Jamal's conviction in 2008 but ordered that he receive a new sentence. He was later removed from death row, and is serving life without the possibility of parole.
Her Twitter account has since been deactivated.
The woman mentioned in Zuniga's tweet is Johanna Fernandez, a professor in the Departments of History and of Black and Latino Studies at Baruch College in New York City.
Fernandez also is part of an organization called "Educators for Mumia Abu-Jamal," a group that advocates for Abu-Jamal's innocence in the killing. Fernandez also is one of the coordinators of the "Campaign to Bring Mumia Home."
On her Facebook page, Fernandez wrote on Monday about how she had visited Abu-Jamal and delivered the letters from Zuniga's students and from a group of Philadelphia high school students.
"We shared a touching moment with Mumia in an effort to raise his spirits," Fernandez wrote in the Facebook post.
"Two teachers delivered letters to us that their students had written to Mumia. One batch came from a 3rd grade class taught by Ms. Marylin Zuniga in Orange, New Jersey. The other batch was from a group of high school students in the Philadelphia Student Union, which fights for school reform and is led by Mr. Hiram Rivera.
"It had been a long time since we had seen Mumia smile. He chuckled as he read excerpts from these touching letters."
Fernandez did not respond to messages seeking comment.
According to Zuniga's page on the school website, she holds "a Bachelors of Arts in Family and Child Studies and a NJ certification of eligibility with advanced standing (grades K-5) from Montclair State University." She also graduated from "Teachers College, Columbia University with a Masters in Curriculum and Teaching," according to the page.
"Marylin is fluent in Spanish and has over 6 years experience working with children as a student teacher, after-school teacher and curriculum designer, and community organizer," the page reads.
"During her spare time she enjoys yoga, reading and DJing. Ms. Zuniga is passionate about her students and always keeps them first!"


Kylie Jenner Autograph Signing Gets Crazy, Paparazzi Attacks and Grandpa Fights Back…and Wins! (VIDEO) - T.V.S.T.
If you haven't noticed, Kylie Jenner is a big deal. And if you also haven't noticed parents will do just about anything for their kids; even if that means leaving your farm to travel into 'these here city parts' to get an autograph and a possible selfie with their favorite celebrity.
The video starts with a quick interview of three adorable Kardashian/Jenner seedlings. These are the seeds that Kris Jenner plants and nourishes so that when they grow up they spend their hard earned paychecks to buy products that she has all her children creating and distributing to millions every day. That woman is a genius! These seedlings should probably be in bed, but somehow they found out that Kylie was in the area and they were determined to get a selfie. Don't worry about their safety – Grandpa is there, and little did the paparazzi know, Grandpa can throw hands.
Who is Colin Tilley? Tilly is a 27 year old video director who has worked with the likes of Chris Brown, Nicki Minaj, Zenday, Tyga, Jason Derulo, Diddy, and the list goes on. He was also the man behind Niki Minaj's Anaconda video but I won't hold that against him.


text:
Newcastle Writing Conference 2019
Making Connections, Unlocking Talent
Live Theatre, Newcastle
New Writing North and Northumbria University have been joining forces to help writers achieve their creative ambitions since 2008. For our 2019 conference we're bringing together some of the most inspiring people we know to help you ignite your writing career.
We know that the road to publication can be exhausting, but this is not a sit-back-and-listen conference. We're looking to make change. The conference is aimed at everyone who has a desire to be published or to further their writing career, including those who feel they are not currently represented by the publishing industry.
Meet your industry
We're opening the door to the publishing industry, with representatives from some of the major publishers as well as literary agents. You'll find out exactly what they look for in a manuscript, learn how to polish and pitch your work, and how to build a professional profile.
Map your journey
You'll leave the day bursting with ideas, better equipped and more confident to take the next steps in your writing journey. From the art of keeping a journal to the business of planning your writing career, we'll show you the way.
Build your network
Having a peer support network makes us all stronger. At Newcastle Writing Conference, we keep the capacity low (at 150 writers), to make sure you can meet with your writing peers and gain as much as possible out of each session.
One-to-one meetings
In addition to the full day programme, delegates at Newcastle Writing Conference can apply for a free one-to-one meeting with an industry expert. A variety of agents, publishers and other literary specialists will be available for ten-minute appointments to discuss your work. The link to apply for a one-to-tone will be available to you after purchase, in the confirmation email.
The deadline for applying for a one-to-one session is 29 April 2019 at 5pm. Applications made after this deadline will not be considered. We will notify successful applicants no later than 7 May 2019.
Please note that spaces are limited and we cannot guarantee an appointment.
10am Registration for a 10.30am start
10.30am Introduction
With Claire Malcolm, Chief Executive of New Writing North, and Michael Green, Professor in English and Creative Writing at Northumbria University
10.45am Keynote speech: Tony Walsh
Poet, writer and all-round inspiration Tony Walsh (aka Longfella) overcame childhood poverty and illness to work everyday jobs in the communities of his beloved home city of Manchester. Tony is a contributor to the new Unbound anthology Common People.
In recent years he has become one of the UK's most widely recognised and most in-demand professional poets. His work was brought to an international audience after the poem 'This Is The Place' was broadcast globally from the vigil for victims of the Manchester Arena bombing.
Tony will talk about his own journey to becoming a writer, as well as offering advice to writers of all genres who are at the start of their careers.
11.15am Break-out Sessions 1 (see below, choose one)
12.15pm Tea and coffee break
12.30pm Breakout Sessions 2 (see below, choose one)
1.30-2.30pm Lunch break
Please bring your own packed lunch or visit one of the several cafes in the nearby area.
2.30-3.30pm Break out sessions 3 (see below, choose one)
3.30pm Tea and coffee break
3.45pm Closing panel: The publication story
In our final panel, the authors of two of 2019's hottest debuts discuss their journeys to publication. The Familiars by Stacey Halls and The Confessions of Frannie Langton by Sara Collins are both set to be huge fiction releases this year; join them as they talk about how their books came into being. Chaired by Orion editor Katie Brown, this inspiring panel is not to be missed!
4.45pm Closing remarks
from Claire Malcolm, chief executive of New Writing North
Break-out Session One (please choose one)
Breakout 1a: Perfect Your Elevator Pitch
with Ian Fenton
If you get tongue-tied when trying to describe your work, then you're not alone. Writer and director Ian Fenton works closely with our Northern Writers' Awards winners each year to prepare their pitches ahead of meeting agents and editors.
In this interactive session, Ian will guide you through the dos and don'ts of pitching your work, before (gently) putting you through your paces.
Participants in this session will have the opportunity to pitch to our publishing industry panel in Breakout 3a.
Breakout 1b: The Mighty Power of the Small Press
with Debbie Taylor, editor of Mslexia, and Sophie O'Neill, managing director of Inpress
Literary magazines and independent book publishers can help you to take the first steps in your writing career. In this session, Debbie Taylor and Sophie O'Neill will discuss the opportunities available, what editors are looking for, and how best to pitch to this thriving independent market.
Breakout 1c: Writing Reflectively
with Professor Michael Green and Dr Tony Williams, Northumbria University
Are you ready to improve the literary quality of your writing and gain a better understanding of the writing process?
Professor Michael Green and Dr Tony Williams, both of Northumbria University, are looking for a group of writers to take through a programme of critical self-reflection.
This will be the first session, with another session taking place (free of charge to participants) in central Newcastle on Saturday 8 June.
Breakout 1d: So, You've Been Rejected?
with writer Degna Stone, children's books editor Ruth Alltimes (Hachette) and literary agents including Niki Chang (The Good Agency) and Rachel Conway (Georgina Capel Associates)
Rejection is a tough part of the writing game, but it's something every writer has to face at some point.
In this session, Degna Stone will explore how to become more resilient as a writer, while industry insiders Ruth Alltimes and Niki Chang will talk through exactly what they are looking for, what you need to do to make your work stand out, and how to build success from rejection.
Break-out Session Two (please choose one)
Breakout 2a: The Novel Inside You
with author Paul Magrs
Paul Magrs has been a writing teacher since the early 1990s and a writer for much longer, writing in most genres and for every age group. He has also been a serious diarist all his life.
Paul says: "Journals are the books that we never have to show another person, unless we decide to do so. Our journals are where we have complete freedom – and that is the place true writing begins."
In this workshop Paul will reveal the real writing practice of journals, the storytelling involved in teaching, and how putting stories together can seem like the most fantastic activity ever invented.
This session is repeated in Breakout 3c
Breakout 2b: Develop Your Professional Profile
with Indira Birnie and Rose Poole, Penguin Random House
It has never been more important to have an online profile as a writer, but where do you draw the line? From blogging to social media, we can all be more creative, savvy and strategic about building our professional profile, while protecting our own private lives.
Indira Birnie is a senior manager for Penguin Audiences, while Rose Poole is Senior Campaigns Manager. Together they will offer expert advice from the front-line of marketing, publicity and promotion.
Breakout 2c: Find Your Peer Support Network
with facilitator and writer Sophie Hall-Luke
Writing is often a solitary business, but a group of peers with similar goals can provide both support and motivation. With facilitator Sophie Hall-Luke of writing group The Table, we'll look at how to find and form your own group, as well as providing peer networking within the session.
Breakout 2d: Where are all the working class writers?
with Lisa Blower and Anita Sethi, chaired by Dr Katy Shaw
Inspired by a shared concern that working class voices are increasingly absent from the pages of books and newspapers, author Kit de Waal came together with publishers Unbound and the regional writing development organisations, including New Writing North, to launch Common People, a collection of essays, poems and pieces of personal memoir. The anthology brings together sixteen well-known writers from working class backgrounds including Lisa Blower, Anita Sethi and Tony Walsh, with an equal number of brand new as-yet-unpublished writers from all over the UK.
In this session, Lisa and Anita will discuss their own careers and what it means to be a working class writer today.
Break-out Session Three (please choose one)
Breakout 3a: Pitching in Practice
with industry representatives including Ian Fenton; Sonny Marr crime editor at Penguin Random House; and Katie Brown, Orion editor
A chance to pitch your work to the publishing industry. Each participant will deliver a 2-minute pitch on their proposed book or writing project, and receive feedback from a small panel.
This session is ideally suited to those who took part in Breakout 1a.
Breakout 3b: The Writer's Plan
with Carmen Marcus
The Writer's Plan is a route map through the woods of the industry for underrepresented writers: from personal barriers like being afraid to ask for help, to practical barriers like finding our champions.
The plan is a hybrid of Carmen Marcus's experience as a writer and in business development but it isn't simply a goal-setting exercise, it's about enabling you to ask yourself what you really want to make your writing happen, and how to get it.
Breakout 3c: The Novel Inside You
THIS SESSION IS FULLY BOOKED
Please note, this is a repeat of Breakout 2a
Breakout 3d: How to Edit Your Work: Live
with Joe Sedgwick of The Literary Consultancy and literary agent Davinia Andrews-Lynch
Learn the art of editing your own work, as we take you through a live edit of a real draft manuscript. You'll find out how literary agents and organisations like The Literary Consultancy assess, edit and polish a draft manuscript before submitting work to publishers, and what you can do to make your own work ready for submission.
Newcastle Writing Conference is intended for anyone who has a desire to be published or to further their writing career, regardless of their income or background. If you are unable to book a ticket for the conference without financial help, we encourage you to apply for one of our ten free bursary places.
Bursary places are based on financial need and will be selected at random from valid applicants.
Please note there is also a concessionary ticket price available for those who meet bursary requirements.
You are eligible for a bursary ticket if you are in receipt of Jobseekers' Allowance, Disability Living Allowance, Personal Independence Payment, Income Support, Working Tax Credit, Child Tax Credit, Housing Benefit, Employment and Support Allowance, Asylum Support, or Universal Credit.
Full time students are not eligible but can purchase concessionary tickets.
If none of the above applies but you feel that you are still eligible, please get in touch.
To apply for a bursary please email office@newwritingnorth.com with the subject line Newcastle Writing Conference Bursary, and briefly outline the way in which you are eligible for a free ticket. The deadline to apply for a bursary place is Monday 8 April, so please apply as soon as you can. Those successful will be contact by Tuesday 9 April.
Bursary places are competitive so please know that you may be asked to provide proof of your circumstances.
Alison Boyle
Anita Sethi
Carmen Marcus
Claire Malcolm
Davinia Andrew-Lynch
Degna Stone
Debbie Taylor
Rose Poole
Ian Fenton
Indira Birnie
Joe Sedgwick
Katy Shaw
Lisa Blower
Paul Magrs
Ruth Alltimes
Sara Collins
Sonny Marr
Sophie O'Neill
Stacey Halls
Rachel Conway
Niki Chang


Larger living spaces demand a bolder lighting and decorating approach. We create beautifully proportioned, made-to-order chandeliers that serve as a dramatic focal point in today's large kitchens, dining rooms, foyers, and commercial spaces. These grand wrought-iron chandeliers embody the essence of Hubbardton Forge and represent the highest standard of American craftsmanship.
Note: Fluorescent versions available, please contact us to place order.


As part of our player jersey collection you can purchase a Fatima "TNT" Maddox jersey with "TNT" on the back and her number 18 on the front and back of the jersey.
© 2017 Harlem Globetrotters. All Rights Reserved.


text:
Nhu Nguyen
Seller Spotlight
@abitchforbrandy
@jepthreads
@mstyld.co
Today we interviewed MaryClaire, owner of @mstyld.co (https://mstyld.co). She's a popular Instagram seller who is changing the way she does business with the help of Thryft. Read on to learn about her store & story.
When did you start your business?
"I started this business at 15 (I am currently 16), and almost 2 years ago, sometime in august 2019. At first it was just a way to make a little money since I was unable to get a job at the time. I originally planned to do it for a short period but I met some amazing people and fell in love with the community.
What type of product do you sell on your website?
"I resell thrifted clothing."
How do you sell using Thryft and Instagram?
"I use Thryft's platform whenever I have a drop. I try to make listings before the drop and schedule it to whatever time the drop is gonna be. If I'm making a listing a little late, I just use the Instagram link feature to create the drop quickly. I love that we can make a listing using just a product link from Instagram. Sometimes if I haven't been able to make the listings beforehand, this feature allows to do it quickly and very easily."
How has scaling your business been?
"Before I started using Thryft I was very reluctant to have bigger drops. Even with just a few items, packaging and getting things ready to be shipped would usually take a long time especially since I don't have anyone to help out. Thryft significantly cut down my packaging time so I've become willing to sell more items. It has also changed the way I take orders. Since people can now just order through the website and put in their information, the process goes by a lot quicker for both me and the customers, and I don't have to worry too much about having to respond to everyone at once.
How has your experience as a reseller been?
"I'd say it's been pretty good. They're some times where it's really fun and enjoyable , and other times where it's hard to keep myself motivated. But it's nice to have a supportive community. And despite the rare cases when there are problems with customers, people are usually understanding which makes things a lot better. Though sometimes it gets hard to balance my time between the business and other aspects of my life, I've enjoyed it a lot and it has been a learning experience."
Shop MaryClaire's items on her Thryft site: https://mstyld.co
Interested in Thryft?
Turn your Instagram Page into a website in one minute.
© Copyright Thryft Corp. 2021


Bragg, Georgia. (Author). O'Malley, Kevin, 1961- (Illustrator).
Formatted Contents Note: King Tut : back up the U-haul -- Julius Caesar : I as in Ides -- Cleopatra : #1 across -- Christopher Columbus : death by dirt -- Henry VIII : who not to marry -- Elizabeth I : she kept her head about her -- Pocahontas : royal hostage -- Galileo Galilei : staying alive -- Wolfgang Amadeus Mozart : every good boy does fine -- Marie Antoinette : I did not do it on purpose -- George Washington : little mouth of horrors -- Napoleon Bonaparte : I hate islands -- Ludwig van Beethoven : between those ears -- Edgar Allan Poe : Oh woe is Poe -- Charles Dickens : the tale of two brains -- James A. Garfield : James who? -- Charles Darwin : what me worry? -- Marie Curie : you glow, girl -- Albert Einstein : Einstein = massive cranium? -- One more thing.


Yes folks! The Resoluxe™ has arrived. Not your average electric guitar. The body is solid mahogany. The neck is hand carved Mahogany with an Ebony fretboard. The Resoluxe™ comes standard with a Beard 9.5" hand spun biscuit cone and Fishman Nashville bridge pickup, coupled with a Lollar magnetic pickup at the neck. A Fishman Powerchip pre amp allows balance between the neck and bridge pickups. The combination of these two pickups provides endless possibilities for unique sound and tone for both live and recording situations. We are now taking orders. Get yours now!