예제 #1
0
            protected override void Antes()
            {
                int Id = ObtenerID();
                foreach(vGD_DOC_ACTAS item in oDto){

                    GD_DOCUMENTOS gd = ctx.GD_DOCUMENTOS.Find(item.ID_DOC);
                    if (gd != null)
                    {
                        gd.ESTADO = "AS";
                    }

                    ctx.Entry(gd).State = EntityState.Modified;

                    e = new GD_DOC_ACTAS();
                    e.COD_CON = item.COD_CON;
                    e.EST_REL = "AC";
                    e.ID_DOC = item.ID_DOC;
                    e.ID_INF = item.ID_INF;
                    e.TIP_DOC = item.TIP_DOC;
                    e.USAP = item.USAP;
                    e.FEC_REG = DateTime.Now;
                    e.ID = Id;
                    ctx.GD_DOC_ACTAS.Add(e);
                    Id++;
                }

                byaRpt.id = e.ID.ToString();
                byaRpt.Error = false;
            }
예제 #2
0
            protected override void Antes()
            {
                GD_DOCUMENTOS gd = ctx.GD_DOCUMENTOS.Find(oDto.ID_DOC);
                if (gd != null) {
                    gd.ESTADO = "AS";
                }
                ctx.Entry(gd).State = EntityState.Modified;

                e = new GD_DOC_ACTAS();
                e.COD_CON = oDto.COD_CON;
                e.EST_REL = "AC";
                e.ID_DOC = oDto.ID_DOC;
                e.ID_INF = oDto.ID_INF;
                e.TIP_DOC = oDto.TIP_DOC;
                e.USAP = oDto.USAP;
                e.FEC_REG = DateTime.Now;
                e.ID = ObtenerID();
                ctx.GD_DOC_ACTAS.Add(e);
                byaRpt.id = e.ID.ToString();
                byaRpt.Error = false;
            }