Exemplo n.º 1
0
 public static int Insert(PaisesInfo _PaisesInfo)
 {
     //Execute the query and return the new Guid
     object retval= _AdoHelper.ExecuteScalar(ConnectionString,"PaisesInsert",
         new SqlParameter("@Pais", _PaisesInfo.Pais),
         new SqlParameter("@Default", _PaisesInfo.Default),
         new SqlParameter("@Download", _PaisesInfo.Download),
         new SqlParameter("@Action", _PaisesInfo.Action),
         new SqlParameter("@SyncID", _PaisesInfo.SyncID)
     );
     return Int32.Parse(retval.ToString());
 }
Exemplo n.º 2
0
 public static void Update(PaisesInfo _PaisesInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "PaisesUpdate",
         new SqlParameter("@Cod_Pais", _PaisesInfo.Cod_Pais),
         new SqlParameter("@Pais", _PaisesInfo.Pais),
         new SqlParameter("@Default", _PaisesInfo.Default),
         new SqlParameter("@Download", _PaisesInfo.Download),
         new SqlParameter("@Action", _PaisesInfo.Action),
         new SqlParameter("@SyncID", _PaisesInfo.SyncID)
     );
 }
Exemplo n.º 3
0
 public static void Delete(PaisesInfo _PaisesInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "PaisesDelete",
         new SqlParameter("@Cod_Pais", _PaisesInfo.Cod_Pais)
     );
 }
Exemplo n.º 4
0
        /// <summary>
        /// Creates a new instance of the Paises class and populates it with data from the specified SqlDataReader.
        /// </summary>
        private static PaisesInfo MakePaises(SqlDataReader dataReader)
        {
            PaisesInfo paises = new PaisesInfo();

            if (dataReader.IsDBNull(Cod_Pais) == false)
                paises.Cod_Pais = dataReader.GetInt32(Cod_Pais);
            if (dataReader.IsDBNull(Pais) == false)
                paises.Pais = dataReader.GetString(Pais);
            if (dataReader.IsDBNull(Default) == false)
                paises.Default = dataReader.GetBoolean(Default);
            if (dataReader.IsDBNull(Download) == false)
                paises.Download = dataReader.GetDateTime(Download);
            if (dataReader.IsDBNull(Action) == false)
                paises.Action = dataReader.GetString(Action);
            if (dataReader.IsDBNull(SyncID) == false)
                paises.SyncID = dataReader.GetGuid(SyncID);
            if (dataReader.IsDBNull(SyncTimeStamp) == false)
                paises.SyncTimeStamp = DateTime.MinValue;

            return paises;
        }