예제 #1
0
 public void Inserir(EstruturaEntregaControle estruturaEntregaControle)
 {
     this.AtribuirEstrutura(estruturaEntregaControle);
     this.Inserir();
     foreach (int dia in estruturaEntregaControle.ListaDiasDaSemana)
     {
         DiasSemana dS = new DiasSemana();
         dS.DiaDaSemana.Valor       = dia;
         dS.ControleEntregaID.Valor = this.Control.ID;
         dS.Inserir();
     }
 }
예제 #2
0
        /// <summary>
        /// Inseri novo(a) DiasSemana na lista
        /// </summary>
        /// <returns></returns>
        public override bool Inserir()
        {
            try
            {
                bool ok = diasSemana.Inserir();
                if (ok)
                {
                    lista.Add(diasSemana.Control.ID);
                    Indice = lista.Count - 1;
                }

                return(ok);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }