protected internal override bool esValido() { ep = ctx.PL_PLANTILLA.Where(t => t.ID == oDto.ID).FirstOrDefault(); if (ep == null) return false; else return true; }
protected internal override void Antes() { CargarEstilos(); ep = new PL_PLANTILLA(); decimal ultId = 0; PL_PLANTILLA oldPlantilla = ctx.PL_PLANTILLA.OrderByDescending(t => t.ID).FirstOrDefault(); if (oldPlantilla != null) ultId = oldPlantilla.ID; ultId++; oDto.ID = ultId; Mapper.Map(oDto, ep); ctx.PL_PLANTILLA.Add(ep); InsertSecciones(); byaRpt.id = ep.ID.ToString(); }