コード例 #1
0
ファイル: ObservacionesDb.cs プロジェクト: Avaruz/Artemisa
 public static int Insert(ObservacionesInfo _ObservacionesInfo)
 {
     //Execute the query and return the new Guid
     object retval= _AdoHelper.ExecuteScalar(ConnectionString,"ObservacionesInsert",
         new SqlParameter("@Cod_Medico", _ObservacionesInfo.Cod_Medico),
         new SqlParameter("@Observacion", _ObservacionesInfo.Observacion),
         new SqlParameter("@Fecha_Alta", _ObservacionesInfo.Fecha_Alta),
         new SqlParameter("@Download", _ObservacionesInfo.Download),
         new SqlParameter("@Action", _ObservacionesInfo.Action),
         new SqlParameter("@SyncID", _ObservacionesInfo.SyncID)
     );
     return Int32.Parse(retval.ToString());
 }
コード例 #2
0
ファイル: ObservacionesDb.cs プロジェクト: Avaruz/Artemisa
        /// <summary>
        /// Creates a new instance of the Observaciones class and populates it with data from the specified SqlDataReader.
        /// </summary>
        private static ObservacionesInfo MakeObservaciones(SqlDataReader dataReader)
        {
            ObservacionesInfo observaciones = new ObservacionesInfo();

            if (dataReader.IsDBNull(Cod_Obs) == false)
                observaciones.Cod_Obs = dataReader.GetInt32(Cod_Obs);
            if (dataReader.IsDBNull(Cod_Medico) == false)
                observaciones.Cod_Medico = dataReader.GetInt32(Cod_Medico);
            if (dataReader.IsDBNull(Observacion) == false)
                observaciones.Observacion = dataReader.GetString(Observacion);
            if (dataReader.IsDBNull(Fecha_Alta) == false)
                observaciones.Fecha_Alta = dataReader.GetDateTime(Fecha_Alta);
            if (dataReader.IsDBNull(Download) == false)
                observaciones.Download = dataReader.GetDateTime(Download);
            if (dataReader.IsDBNull(Action) == false)
                observaciones.Action = dataReader.GetString(Action);
            if (dataReader.IsDBNull(SyncID) == false)
                observaciones.SyncID = dataReader.GetGuid(SyncID);
            if (dataReader.IsDBNull(SyncTimeStamp) == false)
                observaciones.SyncTimeStamp = DateTime.MinValue;

            return observaciones;
        }
コード例 #3
0
ファイル: ObservacionesDb.cs プロジェクト: Avaruz/Artemisa
 public static void Delete(ObservacionesInfo _ObservacionesInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "ObservacionesDelete",
         new SqlParameter("@Cod_Obs", _ObservacionesInfo.Cod_Obs)
     );
 }
コード例 #4
0
ファイル: ObservacionesDb.cs プロジェクト: Avaruz/Artemisa
 public static void Update(ObservacionesInfo _ObservacionesInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "ObservacionesUpdate",
         new SqlParameter("@Cod_Obs", _ObservacionesInfo.Cod_Obs),
         new SqlParameter("@Cod_Medico", _ObservacionesInfo.Cod_Medico),
         new SqlParameter("@Observacion", _ObservacionesInfo.Observacion),
         new SqlParameter("@Fecha_Alta", _ObservacionesInfo.Fecha_Alta),
         new SqlParameter("@Download", _ObservacionesInfo.Download),
         new SqlParameter("@Action", _ObservacionesInfo.Action),
         new SqlParameter("@SyncID", _ObservacionesInfo.SyncID)
     );
 }