Example #1
0
        public int New_(int p_producto, string p_sexo, System.Collections.Generic.IList <string> p_talla, int p_modelo, string p_color)
        {
            PrendaEN prendaEN = null;
            int      oid;

            //Initialized PrendaEN
            prendaEN = new PrendaEN();

            if (p_producto != -1)
            {
                prendaEN.Producto    = new AppEstadioGenNHibernate.EN.AppEstadio.ProductoEN();
                prendaEN.Producto.Id = p_producto;
            }

            prendaEN.Sexo = p_sexo;


            prendaEN.Talla = new System.Collections.Generic.List <AppEstadioGenNHibernate.EN.AppEstadio.TallaPrendaEN>();
            if (p_talla != null)
            {
                foreach (string item in p_talla)
                {
                    AppEstadioGenNHibernate.EN.AppEstadio.TallaPrendaEN en = new AppEstadioGenNHibernate.EN.AppEstadio.TallaPrendaEN();
                    en.Talla = item;
                    prendaEN.Talla.Add(en);
                }
            }

            else
            {
                prendaEN.Talla = new System.Collections.Generic.List <AppEstadioGenNHibernate.EN.AppEstadio.TallaPrendaEN>();
            }

            prendaEN.Modelo = p_modelo;

            prendaEN.Color = p_color;

            //Call to PrendaCAD

            oid = _IPrendaCAD.New_(prendaEN);
            return(oid);
        }
Example #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            TallaPrendaEN t = obj as TallaPrendaEN;

            if (t == null)
            {
                return(false);
            }
            if (Talla.Equals(t.Talla))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #3
0
 public TallaPrendaEN(TallaPrendaEN tallaPrenda)
 {
     this.init(tallaPrenda.Talla, tallaPrenda.Prenda);
 }