private string CrearNumero() { //ERROR AL NO EXISTIR CONSECUTIVOS PARA ESE cp = ctx.CONS_PROC.Where(t => t.VIGENCIA == ps.VIG_SOL && t.TIP_PROC == ps.COD_TPRO && t.DEP_DEL == ps.DEP_PSOL).FirstOrDefault(); numero = ""; if (cp != null) { numero = String.Format("{0}-{1}-{2}-{3}", cp.TIPOSPROC.ABRE_TPROC, cp.DEPENDENCIA.DEP_ABR, cp.SIGUIENTE.ToString().PadLeft(4, '0'), cp.VIGENCIA); } return numero; }
protected internal override void Antes() { ep = new CONS_PROC(); Mapper.Map(oDto, ep); ctx.CONS_PROC.Add(ep); byaRpt.id = ep.TIP_PROC.ToString(); }