コード例 #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the detalhes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTodetalhes(detalhe detalhe)
 {
     base.AddObject("detalhes", detalhe);
 }
コード例 #2
0
 /// <summary>
 /// Create a new detalhe object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 /// <param name="id_sessao">Initial value of the id_sessao property.</param>
 /// <param name="runningtime">Initial value of the runningtime property.</param>
 public static detalhe Createdetalhe(global::System.Decimal id, global::System.Decimal id_sessao, global::System.Decimal runningtime)
 {
     detalhe detalhe = new detalhe();
     detalhe.id = id;
     detalhe.id_sessao = id_sessao;
     detalhe.runningtime = runningtime;
     return detalhe;
 }
コード例 #3
0
        public void IncluirDetalhe(estSessao s, estDetalhe d, string key)
        {
            if (key != "3kl4j3lk5n3lk3j43kl4j34n3,m4n34k34hj3l4h34nm3,.n43")
            {
                throw new Exception("Chave inválida");
            }

            BotWoWEntities b = EntityContextBot.GetContext;
            detalhe d1 = new detalhe();

            d1.bglost = Convert.ToDecimal(d.bglost);
            d1.bgwin = Convert.ToDecimal(d.bgwin);
            d1.gold = Convert.ToDecimal(d.gold);
            d1.honor = Convert.ToDecimal(d.honor);
            d1.honorh = Convert.ToDecimal(d.honorh);
            d1.id_sessao = s.id;
            d1.kills = Convert.ToDecimal(d.kills);
            d1.killsh = Convert.ToDecimal(d.killsh);
            //d1.nodeh = Convert.ToDecimal(d.nodeh);
            d1.runningtime = Convert.ToDecimal(d.runningtime);
            d1.timetolevel = Convert.ToDecimal(d.timetolevel);
            d1.xp_needed = Convert.ToDecimal(d.xp_needed);
            d1.xp = Convert.ToDecimal(d.xp);
            d1.xph = Convert.ToDecimal(d.xph);
            d1.lvl = Convert.ToDecimal(d.lvl);
            d1.RealZoneText = d.RealZoneText;
            d1.SubZoneText = d.SubZoneText;

            b.detalhes.AddObject(d1);
            b.SaveChanges();
        }