日期:2014-05-18 浏览次数:20452 次
  public int AddPrepaid(Prepaid p)
        {
            int num = 1;
            using(ITransaction tr = session.BeginTransaction())
            {
                try
                {
                    session.Save(p);                 
                    tr.Commit();
                }
                catch (Exception)
                {
                    num = 0;
                    tr.Rollback();
                    throw;
                }
            }
            return num;
        }