Exemplo n.º 1
0
        public object SaveHcUserlabtestInfo(object param)
        {
            Database db     = DatabaseFactory.CreateDatabase();
            object   retObj = null;

            using (DbConnection connection = db.CreateConnection())
            {
                connection.Open();
                DbTransaction transaction = connection.BeginTransaction();
                try
                {
                    HcUserlabtestEntity hcUserlabtestEntity = (HcUserlabtestEntity)param;
                    HcUserlabtestDAL    hcUserlabtestDAL    = new HcUserlabtestDAL();
                    retObj = (object)hcUserlabtestDAL.SaveHcUserlabtestInfo(hcUserlabtestEntity, db, transaction);
                    transaction.Commit();
                }
                catch
                {
                    transaction.Rollback();
                    throw;
                }
                finally
                {
                    connection.Close();
                }
            }
            return(retObj);
        }