예제 #1
0
파일: PlanesDb.cs 프로젝트: Avaruz/Artemisa
 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());
 }
예제 #2
0
파일: PlanesDb.cs 프로젝트: Avaruz/Artemisa
 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)
     );
 }
예제 #3
0
파일: PlanesDb.cs 프로젝트: Avaruz/Artemisa
 public static void Delete(PlanesInfo _PlanesInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "PlanesDelete",
         new SqlParameter("@cod_plan", _PlanesInfo.cod_plan)
     );
 }
예제 #4
0
파일: PlanesDb.cs 프로젝트: Avaruz/Artemisa
        /// <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;
        }