public string InsertSeguimiento(CCSeguimientoCab oCCSeguimientoCab, CCSEguimientoDetalle oCCSEguimientoDetalle) { string result = ""; using (var SeguimientoDal = new SeguimientoDAl()) { SeguimientoDal.BeginTransaction(System.Data.IsolationLevel.ReadCommitted); try { oCCSEguimientoDetalle.idseguimiento = SeguimientoDal.InsertSeguimiento(oCCSeguimientoCab); //Registrar Condiciones Basicas SeguimientoDal.InsertSeguimientoDetalle(oCCSEguimientoDetalle); SeguimientoDal.Commit(); result = "ok"; } catch (Exception ex) { SeguimientoDal.Rollback(); result = ex.Message; } } return(result); }
public Guid InsertSeguimiento(CCSeguimientoCab oCCSeguimientoCab) { var objCommand = GetSqlCommand("pNLI_GCCSeguimiento"); InputParameterAdd.Int(objCommand, "idEstablecimiento", oCCSeguimientoCab.idEstablecimiento); InputParameterAdd.Int(objCommand, "idEnfermedad", oCCSeguimientoCab.idEnfermedad); InputParameterAdd.Guid(objCommand, "idExamen", oCCSeguimientoCab.idExamen); InputParameterAdd.Int(objCommand, "ejecutadx", oCCSeguimientoCab.ejecutadx); InputParameterAdd.Int(objCommand, "ejecutacc", oCCSeguimientoCab.ejecutacc); InputParameterAdd.Int(objCommand, "cumpliocc", oCCSeguimientoCab.cumpliocc); InputParameterAdd.Int(objCommand, "estado", oCCSeguimientoCab.mca_inh); InputParameterAdd.Int(objCommand, "idusuarioregistro", oCCSeguimientoCab.idusuarioregistro); OutputParameterAdd.UniqueIdentifier(objCommand, "newIdSeguimiento"); ExecuteNonQuery(objCommand); return((Guid)objCommand.Parameters["@newIdSeguimiento"].Value); }