Exemple #1
0
 public static int Insert(PlanesInfo _PlanesInfo)
 {
     //Execute the query and return the new Guid
     object retval= _AdoHelper.ExecuteScalar(ConnectionString,"PlanesInsert",
         new SqlParameter("@descripcion", _PlanesInfo.descripcion),
         new SqlParameter("@Action", _PlanesInfo.Action),
         new SqlParameter("@download", _PlanesInfo.download),
         new SqlParameter("@SyncID", _PlanesInfo.SyncID)
     );
     return Int32.Parse(retval.ToString());
 }
Exemple #2
0
 public static void Update(PlanesInfo _PlanesInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "PlanesUpdate",
         new SqlParameter("@cod_plan", _PlanesInfo.cod_plan),
         new SqlParameter("@descripcion", _PlanesInfo.descripcion),
         new SqlParameter("@Action", _PlanesInfo.Action),
         new SqlParameter("@download", _PlanesInfo.download),
         new SqlParameter("@SyncID", _PlanesInfo.SyncID)
     );
 }
Exemple #3
0
 public static void Delete(PlanesInfo _PlanesInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "PlanesDelete",
         new SqlParameter("@cod_plan", _PlanesInfo.cod_plan)
     );
 }
Exemple #4
0
        /// <summary>
        /// Creates a new instance of the Planes class and populates it with data from the specified SqlDataReader.
        /// </summary>
        private static PlanesInfo MakePlanes(SqlDataReader dataReader)
        {
            PlanesInfo planes = new PlanesInfo();

            if (dataReader.IsDBNull(Cod_plan) == false)
                planes.cod_plan = dataReader.GetInt32(Cod_plan);
            if (dataReader.IsDBNull(Descripcion) == false)
                planes.descripcion = dataReader.GetString(Descripcion);
            if (dataReader.IsDBNull(Action) == false)
                planes.Action = dataReader.GetString(Action);
            if (dataReader.IsDBNull(Download) == false)
                planes.download = dataReader.GetDateTime(Download);
            if (dataReader.IsDBNull(SyncID) == false)
                planes.SyncID = dataReader.GetGuid(SyncID);
            if (dataReader.IsDBNull(SyncTimeStamp) == false)
                planes.SyncTimeStamp = DateTime.MinValue;

            return planes;
        }