コード例 #1
0
ファイル: Tipo_ContactoDb.cs プロジェクト: Avaruz/Artemisa
 public static int Insert(Tipo_ContactoInfo _Tipo_ContactoInfo)
 {
     //Execute the query and return the new Guid
     object retval= _AdoHelper.ExecuteScalar(ConnectionString,"Tipo_ContactoInsert",
         new SqlParameter("@descripcion", _Tipo_ContactoInfo.descripcion),
         new SqlParameter("@Action", _Tipo_ContactoInfo.Action),
         new SqlParameter("@download", _Tipo_ContactoInfo.download),
         new SqlParameter("@SyncID", _Tipo_ContactoInfo.SyncID)
     );
     return Int32.Parse(retval.ToString());
 }
コード例 #2
0
ファイル: Tipo_ContactoDb.cs プロジェクト: Avaruz/Artemisa
 public static void Update(Tipo_ContactoInfo _Tipo_ContactoInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "Tipo_ContactoUpdate",
         new SqlParameter("@cod_tipo", _Tipo_ContactoInfo.cod_tipo),
         new SqlParameter("@descripcion", _Tipo_ContactoInfo.descripcion),
         new SqlParameter("@Action", _Tipo_ContactoInfo.Action),
         new SqlParameter("@download", _Tipo_ContactoInfo.download),
         new SqlParameter("@SyncID", _Tipo_ContactoInfo.SyncID)
     );
 }
コード例 #3
0
ファイル: Tipo_ContactoDb.cs プロジェクト: Avaruz/Artemisa
 public static void Delete(Tipo_ContactoInfo _Tipo_ContactoInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "Tipo_ContactoDelete",
         new SqlParameter("@cod_tipo", _Tipo_ContactoInfo.cod_tipo)
     );
 }
コード例 #4
0
ファイル: Tipo_ContactoDb.cs プロジェクト: Avaruz/Artemisa
        /// <summary>
        /// Creates a new instance of the Tipo_Contacto class and populates it with data from the specified SqlDataReader.
        /// </summary>
        private static Tipo_ContactoInfo MakeTipo_Contacto(SqlDataReader dataReader)
        {
            Tipo_ContactoInfo tipo_Contacto = new Tipo_ContactoInfo();

            if (dataReader.IsDBNull(Cod_tipo) == false)
                tipo_Contacto.cod_tipo = dataReader.GetInt32(Cod_tipo);
            if (dataReader.IsDBNull(Descripcion) == false)
                tipo_Contacto.descripcion = dataReader.GetString(Descripcion);
            if (dataReader.IsDBNull(Action) == false)
                tipo_Contacto.Action = dataReader.GetString(Action);
            if (dataReader.IsDBNull(Download) == false)
                tipo_Contacto.download = dataReader.GetDateTime(Download);
            if (dataReader.IsDBNull(SyncID) == false)
                tipo_Contacto.SyncID = dataReader.GetGuid(SyncID);
            if (dataReader.IsDBNull(SyncTimeStamp) == false)
                tipo_Contacto.SyncTimeStamp = DateTime.MinValue;

            return tipo_Contacto;
        }