protected override void Antes()
 {
     e = new INT_PAGOSST();
     Mapper.CreateMap<vINT_PAGOSST, INT_PAGOSST>();
     Mapper.Map(oDto, e);
     e.FEC_REG = DateTime.Now;
     e.ID = ObtenerID();
     e.ESTADO = "AC";
     ctx.INT_PAGOSST.Add(e);
     byaRpt.id = e.ID.ToString();
     byaRpt.Error = false;
 }
 protected override bool esValido()
 {
     e = ctx.INT_PAGOSST.Find(oDto.ID);
     if (!Existe(e))
     {
         byaRpt.Mensaje = "No se encuentra el Registro de Seguridad Social ";
         byaRpt.Error = false;
         return byaRpt.Error;
     }
     else
     {
         if (!(e.INT_INFOCONT.EST_INF == "AC" || e.INT_INFOCONT.EST_INF == "BO"))
         {
             byaRpt.Mensaje = "El estado se encuentra " + e.INT_INFOCONT.EST_INF + " No se puede anular el documento";
             byaRpt.Error = false;
             return byaRpt.Error;
         }
         return true;
     }
 }
            protected override bool esValido()
            {
                e = ctx.INT_PAGOSST.Find(oDto.ID);
                if (!Existe(e))
                {
                    byaRpt.Mensaje = "No se encuentra el Registro de Seguridad Social ";
                    byaRpt.Error = false;
                    return byaRpt.Error;
                }
                else
                {
                    if ( !(e.INT_INFOCONT.EST_INF == "AC" || e.INT_INFOCONT.EST_INF == "BO"))
                    {

                        byaRpt.Mensaje = "No se puede anular porque el Informe asociado ya fue revisado y aceptado por el supervisor";
                        byaRpt.Error = false;
                        return byaRpt.Error;
                    }
                    return true;
                }
            }