Ejemplo n.º 1
0
        public Cocktail(DateTime cre, DateTime en, string cli,
                        DateTime st, DateTime fin, int ass, int add, string obs, bool amb,
                        bool mus, bool clim, string mod, int ambId)
        {
            //this.Number = this.SetID();
            this.Creation    = cre;
            this.End         = en;
            this.Client      = cli;
            this.Start       = st;
            this.Finish      = fin;
            this.Assist      = ass;
            this.Additional  = add;
            this.Observation = obs;
            this.HasAmbient  = amb;
            if (amb)
            {
                this.AmbientMusic = mus;
                this.ClientMusic  = clim;
            }
            else
            {
                this.AmbientMusic = false;
                this.ClientMusic  = false;
            }
            Ambientacion ambient = (Ambientacion)ambId;

            this.Ambient = ambient;
            Enum.TryParse(mod, out TipoCock modo);
            this.Mode     = modo;
            this.Mod      = mod;
            this.EvType   = 20;
            this.Realized = false;
            this.Total    = this.CalcMonto();
        }
Ejemplo n.º 2
0
        public bool Read()
        {
            try
            {
                ReadContract();

                Datos.Cocktail c**k = (from auxpaa in Conexion.OnBreakBD.Cocktail
                                       where auxpaa.Numero == this.Number
                                       select auxpaa).First();

                Ambientacion ambient = (Ambientacion)c**k.IdTipoAmbientacion;
                this.Ambient      = ambient;
                this.HasAmbient   = c**k.Ambientacion;
                this.AmbientMusic = c**k.MusicaAmbiental;
                this.ClientMusic  = c**k.MusicaCliente;

                return(true);
            }

            catch
            {
                return(false);
            }
        }