예제 #1
0
        public int NewPost(TimeSpan p_created_at, TimeSpan p_modified_at, double p_stake, string p_description, bool p_private, System.Collections.Generic.IList <int> p_pick, int p_tipster, double p_totalOdd, PickadosGenNHibernate.Enumerated.Pickados.PickResultEnum p_postResult)
        {
            PostEN postEN = null;
            int    oid;

            //Initialized PostEN
            postEN            = new PostEN();
            postEN.Created_at = p_created_at;

            postEN.Modified_at = p_modified_at;

            postEN.Stake = p_stake;

            postEN.Description = p_description;

            postEN.Private_ = p_private;


            postEN.Pick = new System.Collections.Generic.List <PickadosGenNHibernate.EN.Pickados.PickEN>();
            if (p_pick != null)
            {
                foreach (int item in p_pick)
                {
                    PickadosGenNHibernate.EN.Pickados.PickEN en = new PickadosGenNHibernate.EN.Pickados.PickEN();
                    en.Id = item;
                    postEN.Pick.Add(en);
                }
            }

            else
            {
                postEN.Pick = new System.Collections.Generic.List <PickadosGenNHibernate.EN.Pickados.PickEN>();
            }


            if (p_tipster != -1)
            {
                // El argumento p_tipster -> Property tipster es oid = false
                // Lista de oids id
                postEN.Tipster    = new PickadosGenNHibernate.EN.Pickados.TipsterEN();
                postEN.Tipster.Id = p_tipster;
            }

            postEN.TotalOdd = p_totalOdd;

            postEN.PostResult = p_postResult;

            //Call to PostCAD

            oid = _IPostCAD.NewPost(postEN);
            return(oid);
        }
예제 #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            PickEN t = obj as PickEN;

            if (t == null)
            {
                return(false);
            }
            if (Id.Equals(t.Id))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #3
0
 public PickEN(PickEN pick)
 {
     this.init(Id, pick.Odd, pick.Description, pick.PickResult, pick.Bookie, pick.Post, pick.Event_rel);
 }