/// <summary>
 /// Deprecated Method for adding a new object to the Sessaos EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSessaos(Sessao sessao)
 {
     base.AddObject("Sessaos", sessao);
 }
Exemplo n.º 2
0
        protected Dictionary<Int32, Int32> Loot(Sessao s, int[] itens)
        {
            var lt = NovoDicionario();

            var loot = (from p in b.loots where p.id_sessao == s.id && itens.Contains((Int32)p.id_Item) select p);

                foreach (loot iloot in loot)
                {

                    lt[(Int32)iloot.id_Item] = lt[(Int32)iloot.id_Item] + (Int32)iloot.qtd;

                }

            return lt;
        }
 /// <summary>
 /// Create a new Sessao object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 /// <param name="dt_inicio">Initial value of the dt_inicio property.</param>
 /// <param name="nome">Initial value of the nome property.</param>
 /// <param name="server">Initial value of the server property.</param>
 /// <param name="lvl">Initial value of the lvl property.</param>
 /// <param name="versao">Initial value of the versao property.</param>
 /// <param name="dirWoW">Initial value of the dirWoW property.</param>
 public static Sessao CreateSessao(global::System.Decimal id, global::System.DateTime dt_inicio, global::System.String nome, global::System.String server, global::System.String lvl, global::System.String versao, global::System.String dirWoW)
 {
     Sessao sessao = new Sessao();
     sessao.id = id;
     sessao.dt_inicio = dt_inicio;
     sessao.nome = nome;
     sessao.server = server;
     sessao.lvl = lvl;
     sessao.versao = versao;
     sessao.dirWoW = dirWoW;
     return sessao;
 }
Exemplo n.º 4
0
        public decimal IniciaSessao(estSessao s, string key)
        {
            if (key != "3kl4j3lk5n3lk3j43kl4j34n3,m4n34k34hj3l4h34nm3,.n43")
            {
                throw new Exception("Chave inválida");
            }
            BotWoWEntities b = EntityContextBot.GetContext;
            Sessao s1 = new Sessao();
            s1.bot = s.bot;
            s1.dt_inicio = s.dtInicio;
            s1.nome = s.nome;
            s1.profile = s.profile;
            s1.dirWoW = s.dirWoW;
            s1.lvl = s.lvl;
            s1.versao = s.versao;
            s1.server = s.server;

            b.Sessaos.AddObject(s1);
            b.SaveChanges();

            return s1.id;
        }