Exemplo n.º 1
0
 private bool esValidoProceso()
 {
     Ddel = ctx.DEPENDENCIA.Where(t => t.COD_DEP == oDto.DEP_PCON).FirstOrDefault();
     if (Ddel.INT_PRO == "S")
     {
         pc = ctx.PCONTRATOS.Where(t => t.PRO_SEL_NRO == oDto.PRO_SEL_NRO).FirstOrDefault();
         if (pc == null)
         {
             byaRpt.Mensaje = "El proceso no existe en el sistema";
             byaRpt.Error = true;
             return false;
         }
         else
         {
             if (pc.COD_TPRO != oDto.COD_TPRO)
             {
                 byaRpt.Mensaje = "No coincide con la Modalidad del Proceso, por Favor Verificar";
                 byaRpt.Error = true;
                 return false;
             }
             if (!(pc.EST_CON == "AD") || (pc.EST_CON == "CE"))
             {
                 byaRpt.Mensaje = "El sistema esta Integrado con el Módulo de Procesos/Cronograma, el proceso debe estar en estado Adjudicado " + oDto.PRO_SEL_NRO;
                 byaRpt.Error = true;
                 return false;
             }
             else
             {
                 return true;
             }
         }
     }
     else
     {
         return true;
     }
 }
Exemplo n.º 2
0
 private void CrearProceso()
 {
     //crear numeo de consecutivo
     pc = new PCONTRATOS();
     if (hayProceso)
     {
         pc.COD_TPRO = ps.COD_TPRO;
         pc.PRO_SEL_NRO = numero;
         pc.OBJ_CON = ps.OBJ_SOL;
         pc.DEP_CON = ps.DEP_SOL;
         pc.DEP_PCON = ps.DEP_PSOL;
         pc.VIG_CON = ps.VIG_SOL;
         pc.TIP_CON = ps.TIP_CON;
         pc.ESTADO = "TR";//estado de tramita, de diligenciamiento de datos
         pc.STIP_CON = ps.STIP_CON;
         pc.FECHARECIBIDO = ps.FEC_RECIBIDO;
         pc.NUM_SOL = ps.COD_SOL;
         pc.EST_CON = "SI"; //estado del cronograma de contratación.
         pc.VAL_CON = (decimal)ps.VAL_CON;
         pc.VAL_APO_GOB = (decimal)ps.VAL_CON;
         pc.USUENCARGADO = found.NIT_ABOG_RECIBE;
         pc.NRO_CON = (int)(cp.SIGUIENTE - 1);
         cp.SIGUIENTE = cp.SIGUIENTE + 1;
         pc.USUARIO = hr.NIT_ABOG_RECIBE;
         pc.IDE_CON = ps.IDE_CON;
         pc.NUMGRUPOS = 1;
         ctx.PCONTRATOS.Add(pc);//se crea proceso
     }
 }
Exemplo n.º 3
0
 private int GetACT_VENCIDAS(PCONTRATOS pc)
 {
     return pc.PCRONOGRAMAS.Where(t => t.ANULADO == "N" && t.EST_ACT != "0003" && t.EST_ACT != "0000"
         && Convert.ToDateTime(t.FECHAI.Value.ToShortDateString()) < Convert.ToDateTime(DateTime.Now.ToShortDateString())).Count();
 }
Exemplo n.º 4
0
 private DateTime? GetFechaAsig(PCONTRATOS pc)
 {
     try {
         return ctx.HREVISADO.Where(t => t.COD_SOL == pc.NUM_SOL).FirstOrDefault().FEC_ASIGNADO;
     }catch
     {
         return null;
     }
 }
Exemplo n.º 5
0
 private int GetACT_HOY(PCONTRATOS pc)
 {
     return pc.PCRONOGRAMAS.Where(t => t.ANULADO == "N" && t.EST_ACT != "0003" && t.EST_ACT != "0000" && t.FECHAI.Value.ToShortDateString() == DateTime.Now.ToShortDateString()).Count();
 }
Exemplo n.º 6
0
 private int GetACT_POR_VENCER(PCONTRATOS pc)
 {
     return pc.PCRONOGRAMAS.Where(t => t.ANULADO == "N" && t.EST_ACT != "0003" && t.EST_ACT != "0000"
         && (Convert.ToDateTime(t.FECHAI.Value.ToShortDateString()) > Convert.ToDateTime(DateTime.Now.AddDays(GetDiasIni()).ToShortDateString())
         && Convert.ToDateTime(t.FECHAI.Value.ToShortDateString()) <  Convert.ToDateTime(DateTime.Now.AddDays(GetDiasFin()).ToShortDateString()) )).Count();
 }
Exemplo n.º 7
0
 private int GetACT_EN_ESPERA(PCONTRATOS pc)
 {
     return pc.PCRONOGRAMAS.Where(t => t.ANULADO == "N" && t.EST_ACT == "0005").Count();
 }
Exemplo n.º 8
0
 private int GetACT_COMPLETADAS(PCONTRATOS pc)
 {
     return pc.PCRONOGRAMAS.Where(t => t.ANULADO == "N" && t.EST_ACT == "0003" ).Count();
 }
Exemplo n.º 9
0
        protected override void Antes()
        {
            oPC = ctx.PCONTRATOS.Where(t => t.PRO_SEL_NRO == Num_Pro).FirstOrDefault();
            decimal id = ObtenerID();
            if (oPC != null)
            {
                foreach (vPCRONOGRAMAS item in lst)
                {
                    //Si no es nuevo
                    if (!item.IS_NUEVO)
                    {
                        UpdActividades(item);
                    }
                    else
                    {
                        AddActividades(item, id);
                        id++;
                    }

                }
                byaRpt.Mensaje = "Se Realizó la operación";
                //byaRpt.id = oEnt.ID.ToString();
                byaRpt.Error = false;
            }
        }
Exemplo n.º 10
0
 protected override void Antes()
 {
     oPC = ctx.PCONTRATOS.Where(t => t.PRO_SEL_NRO == Num_Pro).FirstOrDefault();
     if (oPC != null)
     {
         lst.ForEach(item=> UpdActividades(item));
         byaRpt.Mensaje = "Se Realizó la operación";
         byaRpt.Error = false;
     }
 }
Exemplo n.º 11
0
 protected override bool esValido()
 {
     oPC = ctx.PCONTRATOS.Where(t => t.PRO_SEL_NRO == Num_Pro).FirstOrDefault();
     if (oPC != null)
     {
         byaRpt.Mensaje = "Se Realizó la operación";
         byaRpt.id = Num_Pro;
         byaRpt.Error = false;
         return !byaRpt.Error;
     }
     else
     {
         byaRpt.Mensaje = "No se encontró el Proceso";
         byaRpt.id = Num_Pro;
         byaRpt.Error = true;
         return !byaRpt.Error;
     }
 }