git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C24
This commit is contained in:
parent
07382ac485
commit
22a037d2dd
1 changed files with 3 additions and 0 deletions
|
|
@ -77,6 +77,8 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
int? Next_id = Conn.Emisor.Max(t => (int?)t.IdEmisor);
|
int? Next_id = Conn.Emisor.Max(t => (int?)t.IdEmisor);
|
||||||
model.IdEmisor = (Next_id == null) ? 1 : Next_id.Value + 1;
|
model.IdEmisor = (Next_id == null) ? 1 : Next_id.Value + 1;
|
||||||
model.FechaCreacion = DateTime.Now;
|
model.FechaCreacion = DateTime.Now;
|
||||||
|
model.IdTipoEmisor = 1;
|
||||||
|
model.Estado = true;
|
||||||
Conn.Emisor.Add(model);
|
Conn.Emisor.Add(model);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -90,6 +92,7 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
Conn.Entry(model).State = System.Data.Entity.EntityState.Modified;
|
Conn.Entry(model).State = System.Data.Entity.EntityState.Modified;
|
||||||
}
|
}
|
||||||
Conn.SaveChanges();
|
Conn.SaveChanges();
|
||||||
|
Conn.Commit();
|
||||||
Respuesta.CodigoRespuesta = Constantes.TipoCodigoRespuesta.EXITOSO.ToString();
|
Respuesta.CodigoRespuesta = Constantes.TipoCodigoRespuesta.EXITOSO.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue