示例#1
0
 public static void InsertMaillAttach(Attach attach, TranscationHelper trans)
 {
     InsertMaillAttach(attach, trans.DataBase, trans.Transaction);
 }
示例#2
0
        private static Attach PopulateAttach(IDataReader dataReader)
        {
            Attach attach = new Attach(dataReader.GetInt32(0), dataReader.GetGuid(1),
                dataReader.IsDBNull(2) ? null : dataReader.GetString(2),
                dataReader.GetString(3), dataReader.GetString(4));

            return attach;
        }
示例#3
0
 public static void InsertMaillAttach(Attach attach)
 {
     InsertMaillAttach(attach, DBHelper.GetDatabase(), null);
 }
示例#4
0
 private static void InsertMaillAttach(Attach attach, Database db, DbTransaction trans)
 {
     DbCommand dbCommand = db.GetStoredProcCommand("Usp_InsertMailAttach",
         attach.MailID, attach.ContentID, attach.Title, attach.Path);
     try
     {
         if (trans == null)
             db.ExecuteNonQuery(dbCommand);
         else
             db.ExecuteNonQuery(dbCommand, trans);
     }
     catch (System.Data.SqlClient.SqlException sex)      // 只捕获SqlException,其余抛出继续传播
     {
         DBHelper.ParseSqlException(sex, false);
     }
 }